texts: Magento error "Currency 'USD' not found"

texts:
This is happening only when I save, for a store view, the Romanian locale.
On this shop, the allowed currencies are US$, Romanian Leu and EURO.
I set Currency Rates for each allowed currency: if US$ is default currency then I have a specific currency rate, if Romanian Leu is default currency another specific currency rate and exactly the same thing for EURO.

I searched on google about this error but the only solution that I founded was to clear var/cache and var/session ... Well, that isn't a solution.

  a:5:{i:0;s:24:"Currency 'USD' not found";i:1;s:5065:"#0
  /app/code/core/Mage/Core/Model/Locale.php(576):
  Zend_Currency->__construct('USD', Object(Zend_Locale))
  /app/code/core/Mage/Directory/Model/Currency.php(233):
  Mage_Core_Model_Locale->currency('RON')
  /app/code/core/Mage/Directory/Model/Currency.php(238):
  Mage_Directory_Model_Currency->formatTxt(0)
  /app/code/core/Mage/Core/Model/Locale.php(682):
  Mage_Directory_Model_Currency->getOutputFormat()
  /app/code/core/Mage/Catalog/Block/Product/View.php(168):
  Mage_Core_Model_Locale->getJsPriceFormat()
  /app/design/frontend/magento-boilerplate/default/template/catalog/product/view.phtml(69):
  Mage_Catalog_Block_Product_View->getJsonConfig()
  /app/code/core/Mage/Core/Block/Template.php(241):
  include('/home/mediaswit...')
  /app/code/core/Mage/Core/Block/Template.php(272):
  Mage_Core_Block_Template->fetchView('frontend/magent...')
  /app/code/core/Mage/Core/Block/Template.php(286):
  Mage_Core_Block_Template->renderView()
  /app/code/core/Mage/Core/Block/Abstract.php(863):
  Mage_Core_Block_Template->_toHtml()
  /app/code/core/Mage/Core/Block/Text/List.php(43):
  Mage_Core_Block_Abstract->toHtml()
  /app/code/core/Mage/Core/Block/Abstract.php(863):
  Mage_Core_Block_Text_List->_toHtml()
  /app/code/core/Mage/Core/Block/Abstract.php(582):
  Mage_Core_Block_Abstract->toHtml()
  /app/code/core/Mage/Core/Block/Abstract.php(526):
  Mage_Core_Block_Abstract->_getChildHtml('content', true)
  /app/design/frontend/magento-boilerplate/default/template/page/2columns-right.phtml(51):
  Mage_Core_Block_Abstract->getChildHtml('content')
  /app/code/core/Mage/Core/Block/Template.php(241):
  include('/home/mediaswit...')
  /app/code/core/Mage/Core/Block/Template.php(272):
  Mage_Core_Block_Template->fetchView('frontend/magent...')
  app/code/core/Mage/Core/Block/Template.php(286):
  Mage_Core_Block_Template->renderView()
  /app/code/core/Mage/Core/Block/Abstract.php(863):
  Mage_Core_Block_Template->_toHtml()
  /app/code/core/Mage/Core/Model/Layout.php(555):
  Mage_Core_Block_Abstract->toHtml()
  /app/code/core/Mage/Core/Controller/Varien/Action.php(390):
  Mage_Core_Model_Layout->getOutput()
  /app/code/core/Mage/Cms/Helper/Page.php(137):
  Mage_Core_Controller_Varien_Action->renderLayout()
  /app/code/core/Mage/Cms/Helper/Page.php(52):
  Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController),
  'no-route')
  /app/code/core/Mage/Cms/controllers/IndexController.php(75):
  Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController),
  'no-route')
  /app/code/core/Mage/Core/Controller/Varien/Action.php(419):
  Mage_Cms_IndexController->noRouteAction()
  /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250):
  Mage_Core_Controller_Varien_Action->dispatch('noRoute')
  /app/code/core/Mage/Core/Controller/Varien/Front.php(176):
  Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) /app/code/core/Mage/Core/Model/App.php(354):
  Mage_Core_Controller_Varien_Front->dispatch() /app/Mage.php(683):
  Mage_Core_Model_App->run(Array) /index.php(87): Mage::run('',
  'store')

Please help. Thank you.


texts: Custom email sent with template empty in observer after order

texts:
I have an observer that sends an email after order is placed to another email adress depending on a custom attribute.
I have the following in config.php

  <checkout_onepage_controller_success_action> <!-- identifier of the event we want to catch -->
      <observers>
        <checkout_onepage_controller_success_action_handler> <!-- identifier of the event handler -->
        <type>singleton</type> <!-- class method call type; valid are model, object and singleton -->
        <class>email/observer</class> <!-- observers class alias -->
        <method>ccMyEmail</method>  <!-- observer's method to be called -->
        <args></args> <!-- additional arguments passed to observer -->
      </checkout_onepage_controller_success_action_handler>
    </observers>
  </checkout_onepage_controller_success_action>

and in observer.php

public function ccMyEmail(Varien_Event_Observer $observer)
        {
            $order_ids = $observer->getData('order_ids');

if(isset($order_ids)) {
    foreach ($order_ids as $order_id) :

    $sendToMe = false;

    $order = Mage::getModel('sales/order')->load($order_id);
        if (isset($order)) {

             $orderItems = $order->getAllItems();
             foreach ($orderItems as $_item) {

                 $product = Mage::getModel('catalog/product')->load($_item->getData('product_id'));

                 $attrValue = $product->getResource()->getAttribute(
$product->getId(),
'email_card',
Mage::app()->getStore()
);

$emailadress = $product->getData('email_adress');
       if($attrValue == ('Yes' || '1')) {

                          $sendToMe = true;
                 }

             }
         }

     if($sendToMe) {

$emailTemplate  = Mage::getModel('core/email_template');
$templateId = 1;
$emailTemplate = Mage::getModel('core/email_template')->load($templateId);

    //$emailTemplate->loadDefault('order_new');
    $emailTemplate->setTemplateSubject('Your order was holded');

    // Get General email address (Admin->Configuration->General->Store Email Addresses)
    $salesData['email'] = Mage::getStoreConfig('trans_email/ident_general/email');
    $salesData['name'] = Mage::getStoreConfig('trans_email/ident_general/name');

    $emailTemplate->setSenderName($salesData['name']);
    $emailTemplate->setSenderEmail($salesData['email']);

    $emailTemplateVariables['username']  = $order->getCustomerFirstname() . ' ' . $order->getCustomerLastname();
    $emailTemplateVariables['order_id'] = $order->getIncrementId();
    $emailTemplateVariables['store_name'] = $order->getStoreName();
    $emailTemplateVariables['store_url'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
    $emailTemplate->send('example@gmail.com', $order->getStoreName(), $emailTemplateVariables);

The email gets sent but the template doesnt have the data of the order. What is wrong?

UPDATE I realize now that i have to put in all the email template variables in order to retrieve a full template with the data but is there noway to get the all data just by giving the id of the order?


texts: How to add check box in system configuration

texts:
How do you add a check box in the system configuration & how do you save that check box value in Database?

<terms translate="label">
    <class>terms-conditions</class>
    <frontend_type>checkboxes</frontend_type>
    <validate>required-entry</validate>
    <frontend_model>mymodule/system_config_form_terms</frontend_model>
    <sort_order>15</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>0</show_in_website>
    <show_in_store>0</show_in_store>
</terms>

Terms.php

<?php
/**
 * Adminhtml customer grid block
 *
 * @category   Mage
 * @package    Mage_Adminhtml
 * @author      Magento Core Team <core@magentocommerce.com>
 */
class NameSpace_Mymodule_Block_System_Config_Form_Terms extends Mage_Adminhtml_Block_System_Config_Form_Field
{
    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
    {
        $html = "
       <input type='checkbox' class='required-entry' name='terms' value='1'> Terms and Conditions (Click Here)";
        return $html;
    }
}
?>


texts:
on my ubuntu 16 server i have installed php and it show version

  PHP 7.1.30-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: May 31 2019
  11:43:14) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine
  v3.1.0, Copyright (c) 1998-2018 Zend Technologies
      with Zend OPcache v7.1.30-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

but when I run phpinfo() it show

  PHP Version 7.0.33-8+ubuntu16.04.1+deb.sury.org+1


texts:
I created a custom.css file and i added this code:

#search_mini_form .search-button {
  text-indent: -9999px;
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border: 0;
  background: #F62817;
}

but the color won't change. What else do i need to do?

local.xml

<action method="addItem"><type>skin_css</type><name>css/custom.css</name></action>


texts: Magento 2 Admin panel - Cart Price Rule view hangs (spinning wheel), JS Error

texts:
How do I resolve this issue? The Marketing -> Cart Price Rules keeps spinning and not loading. Following is the error message from chrome

/pub/static/version1544579836/adminhtml/Magento/backend/en_US/Magento_SalesRule/js/form/element/coupon-type.js:1 Failed to load resource: the server responded with a status of 500 ()
    /pub/static/version1544579836/adminhtml/Magento/backend/en_US/Magento_SalesRule/js/form/element/manage-coupon-codes.js:1 Failed to load resource: the server responded with a status of 500 ()
    /pub/static/version1544579836/adminhtml/Magento/backend/en_US/Magento_Ui/js/form/element/single-checkbox-toggle-notice.js:1 Failed to load resource: the server responded with a status of 500 ()
    console-output-handler.js:34 [2018-12-20 09:32:29] [ERROR] Failed to load the "Magento_SalesRule/js/form/element/coupon-type" component.
    ConsoleOutputHandler.show @ console-output-handler.js:34
    console-output-handler.js:34 [2018-12-20 09:32:29] [ERROR] Failed to load the "Magento_SalesRule/js/form/element/manage-coupon-codes" component.
    ConsoleOutputHandler.show @ console-output-handler.js:34
    console-output-handler.js:34 [2018-12-20 09:32:29] [ERROR] Failed to load the "Magento_Ui/js/form/element/single-checkbox-toggle-notice" component.
    ConsoleOutputHandler.show @ console-output-handler.js:34
    /pub/static/version1544579836/adminhtml/Magento/backend/en_US/Magento_Ui/templates/form/element/helper/tooltip.html:1 Failed to load resource: the server responded with a status of 500 ()
    console-output-handler.js:34 [2018-12-20 09:32:29] [ERROR] Failed to load the "ui/form/element/helper/tooltip" template requested by "sales_rule_form.sales_rule_form.rule_information.website_ids".


texts:
How do I remove a block from a group?

In catalog.xml there are (around line 210) actions like:

<block type="catalog/product_view_description" name="product.description" as="description" template="catalog/product/view/description.phtml">
    <action method="addToParentGroup"><group>detailed_info</group></action>
</block>

So product.info gets a group called detailed_info with the blocks product.description and product.attributes.

As far as I know I can remove a whole block with

<action method="unsetChild"><name>NAME</name></action>

But that does not work for groups.

In app/code/core/Mage/Core/Block/Abstract.php there are the implementations for these actions. Methods like addToParentGroup() and addToChildGroup() as well as setChild() and unsetChild(). But there are no methods like removeFromParentGroup() or removeFromChildGroup().

How do I remove a block from such a group?

Ideas:

Copy the whole catalog.xml to my theme and delete that line from it.
Make a rewrite for app/code/core/Mage/Core/Block/Abstract.php in an own module to add methods to remove blocks from a group

The first idea is the least I would want to do and I would be reluctant to do the second.

Is there any standard magento way to do this?


texts: How to move a Magento from production to development

texts:
I've been asking by a friend to develop his Magento site. His site is already up and running. And he is going to give me the access to the server that hosting his Magento site.

In order to develop some new features, I need to somehow clone his running Magento to a development environment.

Usually, I hosted all my Magento instance on Amazon AWS and I'll just clone the instance and then launch another instance for development. Its easy to do it in AWS...

Anyone have any guidelines here that can help me? Maybe some blog teaching me how to clone an running Magento into a development environment?

thank you guys. Here Let me make the case more clear:

Is the code under version control?
-- no
Has the Magento site any modifications?
-- Maybe
Does it use third-party modules?
-- Pretty sure it does,
Do you know how to create a database backup?
-- I have full access to the db and certainly I can create a backup.


texts:
I'm trying to find out how I can modify the PDF invoice layout on Magento. All I need to do is shift the 'SHIP TO:' box a little to the right so that it prints correctly on the labels that we use.

Can anyone help with this?


texts: something went wrong with your request. please try again later - Magento 2.3.4

texts:
I have installed the stripe payment. And after I fill the payment details and try to place the order then I can see this error "something went wrong with your request. please try again later" When I check in admin then order is placed.
Can anyone help me to resolve this?


texts: Compare products has moved to right side in sidebar, Magento2

texts:
How to bring the Compare products option to the left side from my custom module.

Where is it being called?

In my custom module, it is appearing to the right side.


texts: Topmenu - hide and display certain categories

texts:
After reading the following post Magento 2: How can I add External URL in top menu

I was hoping to do something similiar .

We have a category attribute and want to display categories depending on a users logged in state. I was hoping that each of the children elements would have a canShow() function or similiar but it doesn't seem the case.

I don't really want to wrap around or replace the _getHtml function, but I don't see clean way of doing it.

Thanks in advance


texts: After login i got insecure message in magento checkout page?

texts: i Get Waring message in my site  The information you have entered on this page will be sent over an insecure connection and could be read by a third party


texts: Disabling Custom module Overriding Adminhtml Block

texts:
I'm Overriding Block. In module Config.xml

<config>
<global>
    <blocks>
        <modification>
            <class>Local_Modification_Block</class>
        </modification>
        <adminhtml>
            <rewrite>
                <customer_group_edit_form>Local_Modification_Block_Customer_Group_Edit_Form</customer_group_edit_form>
            </rewrite>
        </adminhtml>
    </blocks>
</global>

In Local/Modification/Block/Customer/Group/Edit/Form.php file content:

class Local_Modification_Block_Customer_Group_Edit_Form
    extends Mage_Adminhtml_Block_Customer_Group_Edit_Form
{
    protected function _prepareLayout()
    {
        parent::_prepareLayout();
    }
}

All is working, but, if I disable this module from System -> Configuration -> Advanced "Local_Modification".
I'm not get any form...

Have ideas, what is wrong?


texts:
I'm trying to set up my shipping rates to be free for products over 150lbs and calculate the shipping rates for products that are below 150lbs - per product, not on the order total.

  Scenario: I have product 1 that weighs 25lbs in my cart: calculate the shipping rate with FedEx, for example, $25.

  Scenario: I have product 2 that weighs 200lbs in my cart: Give free shipping.

  Scenario: I have both product 1 (25lbs) and product 2 (200lbs) in my cart: calculate the shipping rate with FedEx for
  product 1 ($25) and give free shipping for product 2.

The problem is that both the free shipping method and the 'Enable free shipping' option in the FedEx shipping setting offer free shipping by order price only, how can do the same with product weight?


texts: The website with id 1 that was requested wasn't found error when migrate data using migration tool

texts:
During migration i face this error
i have run the following command

sudo php bin/magento migrate:data vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.0.1/config.xml


texts: Accessing product category attributes in Mage_Catalog_Block_Navigation

texts:
I am completely new to Magento and have just now installed Magento Community Edition 1.8.1.0.  I have created a few product categories from the admin console.  I would like to customize the top menu based on some attributes of individual product categories.  I have figured out that the changes I need to make will be in a class that overrides Mage_Catalog_Block_Navigation.

The method _renderCategoryMenuItemHtml in this class is invoked with a category.  Specifically, I need Is Anchor, Description and Page Title attributes of the category in this method besides the usual ID, name and URL.  I can see that the category passed to this method is an instance of Varien_Data_Tree_Node but this instance does not contain the three attributes I need.

I know that I can use the category ID available inside this method to run queries on the database to get the information I need, but I do not want to do this due to performance reasons.  I am assuming that there is some code that is fetching category information from the database and is setting that information in Varien_Data_Tree_Node instances.  I would like to enhance that code to include the additional attributes I need.  However, I have been unable to find that code even after spending 2 days on this.

Can someone point me to the code where I can set the additional attributes in the Varien_Data_Tree_Node instance?  Any alternate way of getting category attributes in the Navigation Block would also be helpful, as long as they do not affect performance.


texts: eav_attributes not adding to database with setup:upgrade

texts:
I am trying to add some custom attributes to my Category page, without success. I created a custom module with its own setup script, after running:

  php bin/magento setup:upgrade

There are no attributes added to my databsase.
Here are are my module files:

app/code/Forza/CategoriesBanner/registration.php

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

app/code/Forza/CategoriesBanner/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Forza_CategoriesBanner" setup_version="1.0.0">
    </module>
</config>

app/code/Forza/CategoriesBanner/Setup/InstallData.php

<?php
namespace Forza\CategoriesBanner\Setup;

use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\InstallDataInterface;

class InstallData implements InstallDataInterface
{
    private $eavSetupFactory;

    public function __construct(EavSetupFactory $eavSetupFactory)
    {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
            $setup->startSetup();

            $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

            $eavSetup->addAttribute(
                    \Magento\Catalog\Model\Category::ENTITY,
                    'banner_image',
                    [
                        'type'          => 'varchar',
                        'label'         => 'Banner Image',
                        'input'         => 'image',
                        'required'      => false,
                        'sort_order'    => 6,
                        'backend'       => 'Forza\CategoriesBanner\Model\Category\Attribute\Backend\CategoryBannerImage',
                        'global'        => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
                        'group'         => 'General Information',
                    ]
                );
            $setup->endSetup();
    }
}

?>

I am not getting errors on setup:upgrade, so don't really know where to look. What could be the cause of this?


texts: Mulitple store: Same CMS and static pages but loads different content for different stores

texts:
Multiple stores (version 1.9): I can add category description individually for each store and it will display individually for specific stores.

Requirement: I want same functionality for CMS and Static pages. If i change content of any cms or static page then it should reflect in specific site not on all sub-stores.
Note: I want to use single and same page for all stores but changes should reflect individually like it happened for categories description.

Urgent help required.


texts: Show list of all categories with links, on all pages

texts:
There's a few posts regarding how to get a list of categories in Magento 2, but they all seem to require getting the current category.

I'm looking for a php solution to show a list of all categories on every page, so I need a solution that doesn't require checking the current category. My goal is to create a custom navigation menu with 3 layers of sub-category depth.

Is there anyway I can get these lists with a foreach statement in a custom template block?

EDIT:

This is the error I am receiving with the answer:

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): The "is_enable_attribute11" attribute name is invalid. Reset the name and try again.

Exception #0 (Magento\Framework\Exception\LocalizedException): The "is_enable_attribute11" attribute name is invalid. Reset the name and try again.


texts:
last night some products where deleted around 100 items.
I have the last backup of the database, is there a way to export only products from old backup and import them?
Every help is appreciated


texts: Custom checkout and SSL secure on every elements

texts:
My Magento store has a custom checkout.
We are currently trying to turn this checkout in https.
Everythings' gone well, but the fact that non checkout specific elements (such as menu and footer pictures) are not turned in https, so that the browsers send alerts.
Is there a specific base URL method or something that would turn all elements of the page in https ? It seems that Magento does it seamlessly on the standard theme...


texts:
I like to send emails for my sales order.

If the order is placed status as "Processing". (email send automatically) it's okay
Processing to "Dispatch" (not having the option to set dispatch)
Dispatch to "Shipments" (this too I assigned email with tracking details)
Shipments to "Delivered" (not having option to set delivered)
For all this order I need to send emails to customers.


texts: Moving an order from one customer to another in Magento 1.7.0.1

texts: We have a few orders that were done by a customer, but we need to move these into another account (same store). What's the best way of doing this - can it be done by editing the database directly or through a script? We don't have root access to the server.


texts: How to resend double opt-in e-mail for newsletter subscriptions

texts:
How does one resend the newsletter confirmation (double opt-in) emails to unconfirmed subscribers. Using mage 1.9.0

We recently had a problem resulting in about 400 people signing up for the newsletter without receiving a confirmation email.


texts: Magento2, where can I see the file equivalent to 2-columns-left.phtml as in magento1

texts:
In magento one, I could easily add class to below structure in 2-columns-left.phtml, how can I do the same in magento2?

                    ....

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

Update (what we have in magento2):

How can I add class to <container name="main.content" htmlTag="main" htmlId="maincontent" htmlClass="page-main"> in 2columns-left.xml

<update handle="1column"/>
<referenceContainer name="columns">
    <container name="div.sidebar.main" htmlTag="div" htmlClass="sidebar sidebar-main col-sm-3 col-md-3" 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>


texts: Redirect while moving item from wishlist to cart

texts:
I need to change the default action after adding item to cart from wishlist. By default when you hit "Add to basket" button you will be redirected to the cart. I want user to be redirected back to wishlist.

I also know that going to Admin > System > Configuration > Default Config > Sales > Checkout > Shopping Cart > “After adding a product redirect to shopping cart”: Yes or No fixes my problem but I want to be able to do this only for wishlist and not globally, for one store only!


texts:
I am trying to upgrade a local magento site from v1.9.2.2 to v1.9.3.1.

However, after copying the files from the v1.9.3.1 to my root folder I get this error when trying to access the site :

Fatal error: Class 'Mage_Adminhtml_Helper_Help_Mapping' not found in app/code/core/Mage/Adminhtml/Helper/Data.php on line 35

Any idea where it comes from and what I can do to fix it ?


texts:
I am trying to update whole minicart content but my ajax call is not working

$.ajax({
    url: "my_controller_url",
    type: "POST",
    success: function (result) {
        $(".minicart").html(result);
    }
});


texts: How to use Customer Account menu on custom page

texts:
I am rebuilding an old 1.x module for Magento 2, adding a "customer invoices" page to the Customer Account section of the site, which brings in PDF invoices from a proprietary external source.

I have accomplished:

respond to the request at /my_invoices/invoices/index with an action controller and serve the appropriate view, template, etc
add a link to that page in the customer_account_navigation links block

With these I can "make it work" but I would like to tie the UI together to make it look like the customer is still in the Customer Account section.

What I need to do is bring that customer_account_navigation menu to my custom page at /my_invoices/invoices/index.

In the app/code/MyNamespace/CustomerInvoices/view/frontend/layout/my_invoices_invoices_index.xml file I attempted to reference the sidebar.main container and add a customer_account_navigation block:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <referenceBlock name="content">
        <block
            template="invoices/index/content.phtml"
            class="MyNamespace\CustomerInvoices\Block\Invoices"
            name="my_customerinvoices"/>
    </referenceBlock>

    <body>
        <referenceContainer name="sidebar.main">
            <block class="Magento\Framework\View\Element\Html\Links" name="customer_account_navigation" before="-" template="Magento_Customer::account/navigation.phtml">
                <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-invoices-link">
                    <arguments>
                        <argument name="label" xsi:type="string" translate="true">Invoices</argument>
                        <argument name="path" xsi:type="string">my_invoices/invoices</argument>
                    </arguments>
                </block>
            </block>
        </referenceContainer>
    </body>
</page>

But this results in only the explicitly defined link to my invoices page appears in the menu. I would like to have all of the links that normally appear on the sidebar menu in the customer account area to also appear here.

Is there a way to tell the XML to simply inherit the links from all the other modules that populate that menu?


texts: Magento 2 Inject UI component(s) via ajax into adminhtml form

texts:
I've build a regular adminhtml form via UI component(s) including multiple fieldsets, input and select fields. All working like they should.

Now I've created a so called 'Event' select field within fieldset #1, who is responsible for hiding and displaying containers within fieldset #2. These containers correspond with the options within the select. This way they can be selected based on the option(s) value. Using this construction enables me to bundle specific fields who belong to the selected 'Event' select option.

This mechanism is required but create two problems;

Hidden 'required' fields are still required when you remove it's parent container from the fieldset/form
When the Events, containers and fields, including there own Source Models, start to grow... this form will become unnecessary heavy to load

Now I'm planning to load the Event container when selected. This way the UI component only loads the Source Model when required. If you switch, the previous container will be destroyed and a new one injected into the form.

This creates two questions;

How to generate a UI component on the fly from within a Controller Action
How to inject these component after a ajax-load

Just to be clear... everything is in place to make this possible. The only thing I need is an example who can answer those two questions.

define([
  'jquery',
  'uiComponent'
], function ($, Component) {
  'use strict';
  return Component.extend({
    defaults: {
      imports: {
        toggleEventContainer: '{event option}:value'
      }
    },

    /*
     * @param event
     * @return {exports}
     */
    toggleEventContainer: function (event)
    {
      // Ajax load here...
      return this;
    }
  });
});

Thanks in advance!


texts: Filter category collection with nested OR/AND statements

texts:
So I want to filter a category collection with two attributes. The first attribute attribute_1 must be like a given value. The other attribute may either be like another given value or empty (NULL).

In SQL you would write:

[...] WHERE
    (
        attribute_1 LIKE '%foo%'
        AND
        attribute_2 LIKE '%bar%'
    )
    OR
    (
        attribute_1 LIKE '%foo%'
        AND
        attribute_2 is NULL
    )

Trying to replicate this in Magento after having investigated how nested filtering should work, I came up with this:

$categories = Mage::getModel('catalog/category')
    ->getCollection()
    ->addAttributeToSelect('*')
    ->addAttributeToFilter(
        array(
            array(
                array(
                    'attribute' => 'attribute_1',
                    'like' => '%foo%'
                ),
                array(
                    'attribute' => 'attribute_2',
                    'like' => '%bar%'
                ),
            ),
            array(
                array(
                    'attribute' => 'attribute_1',
                    'like' => '%foo%'
                ),
                array(
                    'attribute' => 'attribute_2',
                    'null' => true
                ),
            ),
        )
    );

But unfortunately this results in the following error:

  PHP Fatal error:  Call to a member function getBackend() on boolean in /path/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 816
  Fatal error: Call to a member function getBackend() on boolean in /path/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 816

I'm hoping that anyone here may see my error. Many thanks!


texts: How can bind jQuery to current document in Magento 2 When template load by ajax

texts:
In Controller File

$block = $page->getLayout()
            ->createBlock('Magento\Catalog\Block\Product\ListProduct')
            ->setTemplate('Magento_Catalog::product/list.phtml')
            ->toHtml();
        echo $block;

But when i append response in current Document then jQuery funtion not Working.

So what i do for append ajax response jQuery.

More Explain

by url request
http://localhost/magento2/category.html  load complete layout with filter

but when i send request to ajax on this http://localhost/magento2/category.html?color=23
only need product list and filter but when i get response jQuery not work.

Actually i want to run add to cart without page refresh this is working before call ajax but after when i click add to cart then page reload.


texts:
In a Magento 2.2.5 installation we are currently having the problem that we cannot change the country of a customer - who was imported from a Magento 1.x installation.

The customer is assigned to a store where the countries AT and DE are enabled. The customer got the wrong country in his one and only address and thus we want to change it from AT (Austria) to DE (Germany). These are the only choices due to the store configuration. However, when we click on "Save Customer", we are not redirected back to the customer list. Instead we are redirected to the customer edit view again.

There is no error message or anything else. When we go back to the list, we can see that the country did not actually change. We can edit everything else in the customer's address (like name, region, zip code etc.). But changing the country from AT to DE is impossible.

Since the click on "Save Customer" actually redirects back to the edit view instead of the list view, I assume that Magento actually recognized that something went wrong and the edited information is not saved. However, there is no visible error message.

What could be the problem? How could we find out why Magento cannot save the changed country of the customer's address?

UPDATE:

There is actually an error message:

[2018-09-18 09:11:21] main.CRITICAL: Invalid value of "DE" provided for the countryId field. {"exception":"[object] (Magento\Framework\Exception\InputException(code: 0): Invalid value of "DE" provided for the countryId field. at /home/myproabr/www.myproduct.at/shop/vendor/magento/module-customer/Model/ResourceModel/AddressRepository.php:129)"} []

But how can this be? "AT" and "DE" should be valid country IDs. They are also the only options provided in the select, due to the store configuration of the customer's store.


texts: Export daily sales report via command line

texts:
I was curious if there is a way to export sales reports to a CSV via the command line. I can handle the cron setup to make it run daily, I'm just curious how you would go about doing this in the shell.

If would be fantastic if I could also filter this CSV to only include certain dates or certain columns but just getting the CSV itself would be a great start.


texts: Setting magento voucher rules on the admin backend

texts:
basically if a user has added two products on cart he is allowed to add two vouchers, and i've done that part but when a product that was added on basket has been removed by the user the voucher still exist on cart. can i use voucher rules to solve this problem?

 public function deleteAction()
{

    $products = 2;
    // $vouchers_added = 2;
    $quote_id = (int)$this->getRequest()->getParam('id');
    $voucher = Mage::getModel('healthystart/voucher')->load($quote_id);
    if ($quote_id) {
        if  ($products === $voucher){
            $this->addErrorMessage('good.');
            return;
        }
        else {
            if($voucher < $products){
                $this->addErrorMessage('Remove a voucher please.');
                $this->_goBack();
            }
        }

        parent::deleteAction();
    }
}


texts: Magento CLI options to check Security patch applied or not?

texts:
Is there any CLI options to check security patch is applied or not ? How many are pending.

I have tried with online tool magereport and many of patch status is unknown. That is why am asking for a CLI option , that can check better.


texts: How to add my table in database and save the table?

texts: I am new to magento.I had created the table with the button "save Form" in form.phtml.I am unable to save the table data to database.Please help me.


texts: Add CMS Static Block underneath categories in left sidebar

texts:
Because my category pages are quite empty, I wanted to fill up some space with a Static Block on the left sidebar of the page. I've created a Static Block in the CMS of Magento, and I'm able to place them on the category pages and other pages. I did this by going to Pages in CMS Management in Magento and under "layout" pasting the following code:

<reference name="left">
<block type="cms/block" name="left_block" before="-">
<action method="setBlockId"><block_id>left_block</block_id></action>
</block>
</reference>

Now my Static Block is showing perfectly, but it's appearing above the 'Shop By' menu on the same left sidebar.

Can anybody help me out with placing my new Static Block underneath the 'Shop By' (Blader Door) block?

Thanks!


texts:
First, sorry for my mistakes, I am a new Magento developer.
So I made a litle module to make some social share buttons (Facebook, twitter, etc...) and so I have to add in the head some meta (for Open Graph).
I search everywhere on the internet and no answers are solving my problems.

How can I override the head ?

Everywhere I see "search for head.phtml..." but I search everywhere and I don't have any head.phtml.

I use Magento 2.2.5, and I have Infortis Ultimo theme.


texts: Why I'm not receiving any output from the Magento CLI?

texts:
When I run bin/magento in my server I'm not receiving any output, so I'm not able to see any possible issue.

How could I solve it?


texts: Correct products show on Shopping cart page without upload images on variants/Child products

texts: Without upload images on Variants/Child products at Magento Configurable products, how to show correct product image(Which products selected from products page) on card pages?


texts: How can I display multiple UI grid in admin panel with different database in magento 2? here I have attached screenshot also

texts: Here is the picture where I have created one module and I have added 2 menu now when I open second menu that time UI grid should be open which should be different from 1st menu grid


texts: Easier way to loop through attribute array?

texts:
Is there an easier way for me to code a template file to loop through certain product attributes using an array rather than specifying each attribute and testing for content?

As you can see from the code below I have several attributes names sequentially (setup_instructions1, setup_instructions2 etc...)

I'd much rather specify an array then have a simpler for each loop

Thanks

<?php
    $_helper = $this->helper('catalog/output');
    $_product = $this->getProduct()
?>
<?php if($_additional = $this->getAdditionalData()): ?>

<?php echo $this->__('Product Instructions') ?>

    <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('block_setups_tab')->toHtml() ?>

        <col width="25%" />
        <col />

                Download Setup Instructions

            <?php if($_product->hasSetupInstructions1()):?>

                <a href=
                <?php echo Mage::getBaseUrl('web',true). "pdf/{$_product->getSetupInstructions1()}"; ?>
                <?php echo " target=\"_blank\">" ?>

                <?php echo $_product->getResource()->getAttribute('setup_instructions1')->getFrontend()->getValue($_product) ?>

            <?php endif ; ?>

            <?php if($_product->hasSetupInstructions2()):?>

                <a href=
                <?php echo Mage::getBaseUrl('web',true). "pdf/{$_product->getSetupInstructions2()}"; ?>
                <?php echo " target=\"_blank\">" ?>
                <?php echo $_product->getResource()->getAttribute('setup_instructions2')->getFrontend()->getValue($_product) ?>

            <?php endif ; ?>

            <?php if($_product->hasSetupInstructions3()):?>

                <a href=
                <?php echo Mage::getBaseUrl('web',true). "pdf/{$_product->getSetupInstructions3()}"; ?>
                <?php echo " target=\"_blank\">" ?>
                <?php echo $_product->getResource()->getAttribute('setup_instructions3')->getFrontend()->getValue($_product) ?>

            <?php endif ; ?>

            <?php if($_product->hasSetupInstructions4()):?>

                <a href=
                <?php echo Mage::getBaseUrl('web',true). "pdf/{$_product->getSetupInstructions4()}"; ?>
                <?php echo " target=\"_blank\">" ?>

                <?php echo $_product->getResource()->getAttribute('setup_instructions4')->getFrontend()->getValue($_product) ?>

            <?php endif ; ?>

            <?php if($_product->hasSetupInstructions5()):?>

                <a href=
                <?php echo Mage::getBaseUrl('web',true). "pdf/{$_product->getSetupInstructions5()}"; ?>
                <?php echo " target=\"_blank\">" ?>

                <?php echo $_product->getResource()->getAttribute('setup_instructions5')->getFrontend()->getValue($_product) ?>

            <?php endif ; ?>

<?php endif;?>


texts: getting Fatal error: Class 'IntlDateFormatter' not found in magento 2.1.8

texts:
When I deployed my magento store from local host to server then I am getting

  Fatal error: Class 'IntlDateFormatter' not found in
  vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php on
  line 93`

After uploading it on server I not seeing my magento home page. when I hit the URL only this error display.


texts: How to do apply filter of custom field value in Sales Order in Admin Magento 2?

texts:
I have created some fields and save data in quote and sales_order table on my order success.
I have successfully display the data in Admin Sales Order but it doesn't apply filter on it as it will search in sales_order_grid table.
How to search data with using quote and sales_order table only.
Any Help is appreciated.


texts: Is there a way in magneto for a product to have different variants but also share the same quantity? I would like to have different pricing options for the same product.


texts: How to save data to custom table using custom model in magento2

texts:
I have a custom table and I have written a custom model for it too, but I am not able to understand how can I perform something like Mage::getModel('')->setData(). I have followed the required structure, created the Model class and specified the resource model and defined the collection class, I can retrieve the data in the admin grid. But, still I am not able to understand how can I make use of my model to setData() and getData(). Here is my controller, to which I am making an AJAX call and I want to save my data to my custom table.

Rent.php

<?php

namespace Mofosys\Fastcure\Controller\Index;

use Magento\Framework\Controller\ResultFactory;
use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Vendor\Module\Model\ModuleFactory;

class Rent extends Action {

    protected $request;
    protected $_moduleFactory;

    public function __construct(Context $context, moduleFactory $moduleFactory) {
        $this->_moduleFactory = $moduleFactory;
        parent::__construct($context);
    }

    public function execute() {
        $model = $this->_moduleFactory->create();
        $data = $this->getRequest()->getPost();
        $model->setName($data['name']);
        $resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON);
        $resultJson->setData($data['name']);
        return $resultJson;
    }
}

My models are in the following structure:

|-Model
   |-ResourceModel
   |    |-Module
   |    |    |-Collection.php
   |    |-Module.php
   |-Module.php

Now, I am not able to understand that how can I insert this data in the table from my controller using my custom model.

Module/Model/Module.php

<?php
namespace Vendor\Module\Model;

use Magento\Framework\Exception\LocalizedException as CoreException;

class Fastcure extends \Magento\Framework\Model\AbstractModel {

    public function _construct() {
        $this->_init('Vendor\Module\Model\ResourceModel\Module');
    }

    public function getName() {
        return $this->getData(self::name);
    }

    public function setName($name) {
        return $this->setData(self::name, $name);
    }
}

All of this, doesn't seem to work, please help me out here guys.


texts:
I'm developing an extension, in which I need to create a tab in all products containing 9 new attributes. What would be the best way to do it?

My attributes are:
Seller ID, Resale Price, Resale Price without ST, Available, Estq, Active and AvailableEstq


texts: how to add extra fee to minimum cart total in magento

texts:
I need to charge some extra fee if order subtotal lessthan or equal to 100$ in my magento site. i found a solutions to changing core files. but is there any chance to write code in local folder without touching the core files.

Thanks,
murali.


texts: Does CMS variable whitelisting apply to EE as well?

texts: After recent patches and versions it is now mandatory to whitelist new (udefined by an extension) variables. Does this apply to EE version as well, or to CE only?


texts: No show customers in Customers section table

texts:
I have a problem after upgrade from 2.3 to 2.4.
After correctly upgrate I don't see customers inside the table customers.
In particular, I'm seeing only the first row on the table while all other rows are empty.
If I select any row I note that the javascritp correcty load that customer.
I attach an image to explain as better as possible...

thanks a lot!!


texts:
I've created a custom widget with a popup on homepage loading, now i need a function to close the popup but i'm not able to include a javascript file in the widget. I've tried the solution that i read in other post but i haven't find the solution yet.

Magento version: 2.1.7

Hope someone can help me, thank you in advance.


texts:
When I try to run an update of the filesystem in Shell I get the following message:

  Warning: stat(): stat failed for
  /data/web/magento2/vendor/magento/module-captch
  a/view/frontend/web/js/view/checkout/defaultCaptcha.j in
  /data/web/magento2/vend
  or/magento/framework/Archive/Tar.php on line 324

What is wrong and what can I do to solve this problem?

I.m running Magento 2.1 CE


texts: Display Magebuzz Category Sidebar Navigation only on home menu

texts: I am currently using the Magebuzz Category Sidebar Navigation with the free classics theme on Magento CE 1.9. I would like to display the sidebar only on the homepage. How can I make this happen. I have been searching for days, but wasn't able to find a solution.


texts: How can we create getMyFormData function like getFormData in magento for mysession

texts:
I need to Create Form for Register. I don,t want to use Customer Block..
I need To store customer form data ... So i used customer session...
Now I want create my session function ...

public function getFormData()
    {
        $data = $this->getData('form_data');
        if (is_null($data)) {
            $formData = Mage::getSingleton('customer/session')->getCustomerFormData(true);
            $data = new Varien_Object();
            if ($formData) {
                $data->addData($formData);
                $data->setCustomerData(1);
            }
            if (isset($data['region_id'])) {
                $data['region_id'] = (int)$data['region_id'];
            }
            $this->setData('form_data', $data);
        }
        return $data;
    }

So i want to modify this code to  myFormData how ..this is possible for my custom Extention


texts:
I am trying to get the image label of a custom product image attribute, i have added options but i am unable to get the label for each type.

The code i am using to pull the labels is

<img src="<?php echo $this->helper('catalog/image')->init($_item, 'bundle_image_1')->resize(100) ?>" alt="<?php echo $this->getImageLabel($_item, 'bundle_image_1') ?>" class="float-left" />

<?php echo $this->getImageLabel($_item, 'bundle_image_1') ?>


texts: Magento 2: How to get current category id in admin controller

texts: I have made a custom button on category edit page in admin. The button redirects to custom admin controller. I need to fetch the current category id in the controller.


texts: Get product attribute by attribute group code in magento 2

texts:
Please help.
I want get attribute by [attribute_group_code]. Please help me. My code is as follows:

<?php
$product = $this->getProduct();
$attributeSetId = $product->getAttributeSetId();
$groupCollection = $this->groupCollectionFactory->create()
    ->setAttributeSetFilter($attributeSetId)
    ->setSortOrder()
    ->load();
foreach ($groupCollection as $group) :
    $attributes = $product->getAttributes();
    echo "<pre>";
    print_r ($group->getData());
    echo "</pre>";
    ?>
    Return :
        Array
        (
            [attribute_group_id] => 21
            [attribute_set_id] => 4
            [attribute_group_name] => Operate
            [sort_order] => 3
            [default_id] => 0
            [attribute_group_code] => operate
            [tab_group_code] =>
        )

    // Get attribute value , label
<?php endforeach; ?>

I just want to get these attribute groups (operate) values based on ['attribute_group_code']. Because when creating the attribute group in admin, I will not know the id of the attribute group, so I only rely on the attribute_group_code.
Thank you.


texts: How do I create a shipment via REST API?

texts:
I'm trying to create a shipment via the REST API. I'm able to edit existing shipments via /rest/V1/shipment, but I can't seem to figure out how to add one. I consistently get a "Could not save shipment" response from the API.

Here are the parameters I'm posting to the endpoint:

        $post = ['entity' => ['customerId' => 3,
                          'billingAddressId' => 16,
                          'orderId' => 8,
                          'shippingAddressId' => 15,
                          'storeId' => 5,
                          'totalQty' => 1,
                          'packages' => [],
                          'items' => [],
                          'tracks' => [],
                          'comments' => [],
                         ]
            ];

For this given order, those are definitely the right address entity_id's, the order_id is correct, etc, etc. If I post similar parameters to another order and include that order's shipment's entity_id, I can update that existing shipment. I just can't seem to create a new shipment for an order that doesn't have a shipment yet.

Help! :-)

Thanks....


texts: Backend doesn't work after uploading registration.php

texts:
I want to build my first theme for Magento but get stuck at the setup. I made a directory in the app -> design -> frontend -> called myfirsttheme and in this folder I made one called myfirsttheme.

Here I created the files theme.xml:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>MyFirstTheme</title>
<parent>Magento/Luma</parent>
<media>
    <preview_image>media/theme-image.jpg</preview_image>
</media>

composer.json :

 {
  "name": "myfirsttheme/myfirsttheme",
  "description": "N/A",
  "require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "myfirsttheme/myfirsttheme": "100.0.*",
    "magento/framework": "100.0.*"
  },
  "type": "magento2-theme",
  "version": "100.0.1",
  "license": [
    "OSL-3.0",
    "AFL-3.0"
  ],
  "autoload": {
    "files": [
      "registration.php"
    ]
  }
}

and registration.php

 <?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/myfirsttheme/myfirsttheme',
    __DIR__
);

When I open the backend I get the message:

  There has been an error processing your request

  Exception printing is disabled by default for security reasons.

  Error log record number: 98616252

After removing the registration.php the message is gone and I can login.
But I can't install the theme. What's going wrong?


texts: Magento 1.9 - How to write script for bulk update values in table using csv?

texts:
Try to bulk update label name in catalog_product_entity_media_gallery_value,

CSV formate :

Workout:

<?php
require_once 'app/Mage.php';
umask("0");
Mage::app();

ini_set('display_errors',"1");
ini_set('display_startup_errors', "1");
error_reporting(E_ALL);

    if (($handle = fopen("inputs.csv", "r")) !== FALSE)
    {
        while (($data = fgetcsv($handle, '1000', ",")) !== FALSE)
        {
            $sql='UPDATE catalog_product_entity_media_gallery_value SET label='.$data['2'].' WHERE value_id = '.$data['0'].'';
            echo $sql.'<br/>';
            mysqli_query($sql);

        }
        fclose($handle);
    }
?>

How to alter my script for Magento 1.9?


texts: How to replace load jquery.js form local to link web CDN in require.js

texts:
When my page load require.js required jquery.js from local

  https://mypage/pub/static/frontend/../../en_US/jquery/jquery.min.js

And I want to change required from link web CDN

  https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js


texts: How to get multiple stores to share invoices numbers

texts:
I'm new to this posting business so please be patient.

I have 6 stores set up in magento 1.9 representing the 6 different departments of the charity, they have individual order number prefixes, however what I really need is the ability for the 6 stores to share invoice numbers. Allowing the accounted to see one long list of invoices from all the stores.

When I have tried to set this up however I get conflicts 'invoice can't save' because another store has already used the invoice number. If I have not been clear or if you require more information please ask.

Does any one know of a way to implement this, I would be very grateful


texts: Different Default Sort_by for Search & Category Listing

texts:
We can set a <default_sort_by> which might be something like "Best Seller" but with Search results, I would rather the Default_sort be Relevance.

First of all, is it possible to setting options like this though Magento's current configuration?

If Not, where would we look at implementing logic that would check to see if relevance (in this case) is available.. IF so, make relevance the default sort. ELSE use bestseller.


texts: Installing a SSL and SEO Strategy with Magento

texts:
I now manage a Magento 1.9 site and it never had an SSL. Now it needs one.

What sort of internal tools within Magento are there for managing 301 redirects?

Are there any best practices I should know about when transitioning a site to using an SSL when it has been around for 5 years with insecure links.

The site is not used for e-commerce but is simply a catalog.


texts: Which is better to use, Magento's new responsive design or Waterlee boilerplate?

texts:
I would like to know, when building a responsive theme for Magento, which is a better choice to go with, Magento's new default responsive-design theme or Waterlee, a Foundation-based Magento boilerplate theme?

Thanks!


texts: Where do you put modified WSDL files for the API to override the core definitions?

texts:
We've updated the standard WSDL definitions to support bundled product attributes for sku_type and price_type.  I've tried putting the updated WSDL and WSI files in app/code/local/Mage/Catalog/etc/, but Magento doesn't load them. I don't want to leave them in the core area, but that seems to be the only place I can get Magento to find them.

Any suggestions?


texts:
I'm running a Magento 1.9.0.1 build with the 'Tax Calculation Method Based On' setting set to Total but running into the issue of tax and total prices coming out at 1 pence less than it should be. I wondered if someone could help with figuring how to correct this. I have already changed all of the default rounding and precision in various files from 2 to 4.

As an example,
Placing an order for 79 of a product with a Unit Price of £2.46 (Ex Tax) the Total (Ex Tax) price is correctly coming out at £194.34. However, the Tax line is coming out at £38.86 and Magento is rounding this from £38.868.

My client would prefer this rounded to £38.87 - since this is how the HMRC and Sage Accounts round these figures. The Order Total would then be £194.34 (Ex Tax) + £38.87 (Tax) = £233.21 (Inc Tax).

Because Magento is currently placing the tax at £38.86 (1p out), the Order Total is also 1p out at £233.20 instead of £233.21 from what Sage Accounts calculates.

This would place a Unit Price inclusive of tax of £2.952 instead of £2.95 (which is also how Sage Accounts would handle this).

We still need the site to display the price as £2.95 in this instance but the customer would need to be charged £233.21 instead of the £233.20 that Magento is currently displaying.

Thank you.


texts: M2 - Previous & Next product from category

texts:
I have this code below to show the Previous & Next buttons on the product detail page, but the next en previous product are based on the position in the category.

How can this be modified so the original view will used like the way that they are shown in the category view, because I don't make use of the position numbering in Magento admin.

On the frontend it's also possible to change the sorting, is it possible to use that also for the next & previous buttons?

<?php

    $productId = $block->getProduct()->getId();
    $cat_ids = $block->getProduct()->getCategoryIds();

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

    $product = $objectManager->create('Magento\Catalog\Model\Product');
    $productt = $objectManager->create('Magento\Catalog\Model\Product');

    $category = $objectManager->create('Magento\Catalog\Model\Category')->load($cat_ids[0]);
    // print_r($category->getUrl());
    $category_product = $category->getProductCollection()->addAttributeToSort('position', 'asc');
    $category_product->addAttributeToFilter('status',1);
    $category_product->addAttributeToFilter('visibility',4);

    $cat_prod_ids = $category_product->getAllIds();

    $_pos = array_search($productId, $cat_prod_ids); // get position of current product
    $_next_pos = $_pos+1;
    $_prev_pos = $_pos-1;
    $keys = array_keys($cat_prod_ids);

    if(in_array($_next_pos, $keys)){
        $_next_prod = $product->load($cat_prod_ids[$_next_pos]);
    }
    if(in_array($_prev_pos, $keys)){
        $_prev_prod = $productt->load($cat_prod_ids[$_prev_pos]);
    }

?>

    <?php if(in_array($_prev_pos, $keys)): ?>
        <a href="<?php print_r($_prev_prod->getProductUrl()); ?>">PREVIOUS
    <?php endif; ?>

    <?php if(in_array($_next_pos, $keys)): ?>
        <a href="<?php print_r($_next_prod->getProductUrl()); ?>">NEXT
    <?php endif; ?>

Regards,


texts: Magento 2.1.8: SMTP - Configured store email addresses are not reflecting in the email

texts: I'm using Mageplaza SMTP extension to send the emails from my Magento store. I've configured Email Addresses for my Store and also updated sales email configuration. However, when email send upon order placement, it send as Sales (User name is the name I mentioned in my SMTP configuration). The same happening for shipment and other emails. How can I change the from address from username to configured email ID? What am I doing wrong?


texts: Magento1 Product Attribute PDP Page Slow

texts:
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($currentProduct);
    $childProducts = $conf->getUsedProductCollection()
    ->addAttributeToSelect('id')
    ->addAttributeToSelect('size')
    ->addAttributeToSelect('color')
    ->addAttributeToSelect('millship')
    ->addAttributeToSelect('closeout')
    ->addAttributeToSelect('msrp')
    ->addAttributeToSelect('price')
    ->addAttributeToSelect('soldby_caseqty')
    ->addAttributeToSelect('case_qty')
    ->addAttributeToSort('size_value')
    ->addAttributeToSort('color_value')
    ->joinField(
        'qty',
        'cataloginventory/stock_item',
        'qty',
        'product_id=entity_id',
        '{{table}}.stock_id=1',
        'left'
    );

This is My Query its make my pdp page slow


texts:
I am currently trying to integrate Magento with an already existing ERP system. It is going well so far except I have a problem when I am trying to ship an order.

I need Magento to ignore quantity when I am Shipping order via Rest API as quantity is getting an update from ERP system and not on Magento itself.

Does anyone have an idea how I could do that?

Thanks in advance!
Eddie


texts: How can I see the controller class (which one is it) for a page URL?

texts:
I need to find which controller is in charge of a URL

  http://127.0.0.1/mysite/index.php/sales/order/history/

I am working on a website, and I want to know which controller is controlling this URL. How can I do this? The core/Mage/Sales/controllers/OrderController is not controlling it.


texts:
Is it possible if I use multiple translate files in locale directory in my themes instead of only one file translate.csv ?

Manage a huge file with 100k+ lines is a nightmare to me.


texts:
I am creating custom footer to show the 5 Columns footer with 2 Rows. In first row to showing the CMS links and second row like copyrights and logs. for that I have written below code. But it is not showing. Even though I have executed php bin/magento cache:clean and php bin/magento cache:flush.

CustomFooter/view/frontend/layout/default.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="store.settings.language" remove="true"/>

        <referenceBlock name="logo">
            <arguments>
                <argument name="logo_file" xsi:type="string">images/logo.png</argument>
                <argument name="logo_img_width" xsi:type="number">100</argument>
                <argument name="logo_img_height" xsi:type="number">40</argument>
            </arguments>
        </referenceBlock>

        <referenceContainer name="footer-container">
            <container name="footer-top" label="Footer Top" htmlTag="div" htmlClass="footer-top page-main">
                <block class="Magento\Cms\Block\Block" name="block-footertop">
                    <arguments>
                        <argument name="block_id" xsi:type="string">block-footertop</argument>
                    </arguments>
                </block>
            </container>

            <container name="footer" as="footer" label="Page Footer" htmlTag="div" htmlClass="footer container">
                <remove name="form.subscribe"/>
                <block class="Magento\Theme\Block\Html\Footer" name="copyright" template="html/copyright.phtml"/>
                <block class="Magento\Framework\View\Element\Template" name="report.bugs" template="Magento_Theme::html/bugreport.phtml" />
            </container>

        </referenceContainer>

        <referenceBlock name="report.bugs" remove="true"/>
        <move element="copyright" destination="before.body.end"/>
    </body>
</page>

But it is not showing. Any help on this?


texts: How to add a button on the Product page / How to add size-chart in magento /

texts:
Website URL- niraame.com

This is our website URL. We want to add size-chart option in our cloth section.
I have little knowledge of JavaScript and HTML so i have created a button which does exactly what i wanted to do.

JavaScript and HTML code which i stored as a Static block in Magento-

Size Chart

This code displays a button on the screen and after clicking it we gets the sizechart loaded on a popup window.

I am not able to figure out how to put this button on the Product page.
I tried finding an answer on the Community page.

Can anyone please tell me how to add a button on Product page.


texts: 'Refund Online' missing on Credit Memos for Paypal Express Checkout

texts:
I'm trying to refund an order that was made from through PayPal Express but whilst on the 'Credit Memo' page the only available option is 'Refund Offline'. This means the refund is only logged on the Magento and not refunded from PayPal.

Are there some settings that need to be in place for this to work? I wasn't able to find any on the Magento 2.1 documentation.


texts: Possible to using SQL query to get last 30 minutes created account from Magento?

texts:
Possible using SQL query to get last 30 minutes created customer account from Magento? I want to run a cron job that it can get the last 30 minutes created customer account id. so base on ID, I can use Magento object manager to get last name, first name ...etc
Please help.


texts: Magento 2 Add Datetime picker in system.xml

texts:
I want to add date picker with time in configuration section in my custom module.

I followed Webkul link

webkul link

But from this I can only able to see date picker time picker is not appearing.
How I will add time picker?


texts: Magento Enterprise constantly goes to installation, even though I set the DB from the dump

texts:
I have a database dump from an old development machine for my Magento Enterprise (version 1.14.1.0), and I set the secure and unsecured URL correctly in the database so that it points to my files correctly.

I am constantly being redirected to the installation process.

How can I skip this and what is causing Magento to try to do the installation from the beginning?

I am a Magento Enterprise total noob though.


texts: One click subscription purchase with no shopping cart?

texts:
I'm looking to do something fairly specific but I'm not entirely sure it's possible with out a huge amount of effort. Basically, after a user has created an account they can add or remove subscriptions (reoccurring profiles) from their account with out having to go through the checkout experience. Think one click shopping on amazon but, but with no shopping cart.

Users can manage subscriptions via their dashboard (remove, suspend) but we would like to skip the whole shopping cart experience to add new subscriptions to their account.

Is this asking too much of Magento?


texts: How to change sort order of image gallery in Magento 2?

texts:
i'm using magento 2 defualt image gallery. I'm trying to change to sort order of image.

I need this active image to come first in the left image sidebar.

public function getGalleryImagesJson()
    {
        $imagesItems = [];
        foreach ($this->getGalleryImages() as $image) {
            $imagesItems[] = [
                'thumb' => $image->getData('small_image_url'),
                'img' => $image->getData('medium_image_url'),
                'full' => $image->getData('large_image_url'),
                'caption' => $image->getLabel(),
                'position' => '500',
                'isMain' => $this->isMainImage($image),
            ];
        }
        if (empty($imagesItems)) {
            $imagesItems[] = [
                'thumb' => $this->_imageHelper->getDefaultPlaceholderUrl('thumbnail'),
                'img' => $this->_imageHelper->getDefaultPlaceholderUrl('image'),
                'full' => $this->_imageHelper->getDefaultPlaceholderUrl('image'),
                'caption' => '',
                'position' => '0',
                'isMain' => true,
            ];
        }

        return json_encode($imagesItems);
    }

This is the default code. where to change the order of image. thanks in advanced


texts: Magento2 - How to reduce Logout to homepage redirect time from 5 seconds to 2 seconds?

texts:
After Logout it is taking 5 seconds to redirect to Homepage.

I want to reduce those time to 2 seconds.

How can I achieve this one ?

Thanks.


texts:
I want to modify the product image gallery on Magento 2 item details page.
First I resized the fotorama display to appr. 80% of the display area by adding css in gallery.less:
.fotorama--fullscreen {
    top: 12% !important;
    left: 12% !important;
    width: 76% !important;
    height: 76% !important;
}

This is because I don't want to hide the rest of the site totally and it works as expected. Now I want to have some more modifications:

clicking or tapping outside the fotorama div should close it like clicking the "X"-close-icon.


texts: Set all categories Use Parent Category Settings to yes

texts:
I need to set all categories Use Parent Category Settings to "Yes" from mysql

I have done this sql query:

SELECT * FROM eav_attribute where attribute_code = 'custom_use_parent_settings';

wich give me attribute_id = 68

if i do

UPDATE catalog_category_entity_int set value = 1 where attribute_id = 68;

only 103 rows are affected but i have 3000 categories

I am missing someting ?
only level 1 categories are affected by the query


texts: How do I get the price of product in the base currency?

texts:
I have a block on Magento where I would like to display the price of the current product in the default display currency. This store has multiple currencies.

When I invoke $product->getPrice(), I get the price of the product converted into the current currency. I can convert this into the the default display currency using this method:

public function convertToBaseCurrency(StoreInterface $store, $amount)
{
    $rateToBase = $this->currencyFactory->create()->load($store->getCurrentCurrencyCode())->getAnyRate($store->getDefaultCurrencyCode());
    return $amount * $rateToBase;
}

The above sort-of works but leads to rounding and calculation discrepancies.

I have a product that is 22.00 EUR in the database. When viewing the product under CHF, I get a price of 23.50 CHF. The multiplier in the directory_currency_rate table for EUR > CHF is 1.068200000000, which means the product's price should be 23.5004 but somehow it gets rounded down. This basically means that I cannot convert back the price back to EUR wihout some minor discrepancies. I've vardumped the product and it indeed is 23.5 internally.

Having dug in deeper, I can see that the conversion happens and gets rounded. There's a constant that defines the rounding in PriceCurrencyInterface called DEFAULT_PRECISION

How should I get around this?


texts:
Today I found a weird error with our Magento installation. Before the weekend but today I am getting weird random redirects to homepage/index.php. I first noticed it when using the Backend, when clicking something I was redirected to homepage/index.php.

After this I began investigating. I noticed that it also happend in the frontend. Completly random in my eyes I was redirect tot homepage/index.php. There aren't real specific pages on wich it happens but just random.

I could click the Magento logo in the topleft in the backend for ten times and the next click it would redirect to homepage/index.php. The second time it only took a couple of clicks, so like I said completly random.

Do you guys have a suggestion?


texts: Custom Block Product List Injection failed

texts:
I have to display a list of product on the product view, depending on its sku.

In order to do that, i have simply pasted the Random.php list example of Magento_Catalog.

But in order to find the proper product, i need to find the attribut_set_id of a specific attribute_set_name

So i injected an object:

<?php

namespace Extranet\Catalog\Block\Product\ProductList;

use Magento\Catalog\Api\CategoryRepositoryInterface;

class Echantillon extends \Magento\Catalog\Block\Product\ListProduct
{

    protected $_productCollectionFactory;

    protected $categoryRepository;

    protected $_attributeSetOptions;

    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,
        \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
        \Magento\Catalog\Model\Product\AttributeSet\Options $attributeSetOptions,
        array $data = []
    )
    {
        $this->_attributeSetOptions = $attributeSetOptions;
        $this->_productCollectionFactory = $productCollectionFactory;
        parent::__construct(
            $context,
            $postDataHelper,
            $layerResolver,
            $categoryRepository,
            $urlHelper,
            $data
        );
    }

    protected function _getProductCollection()
    {
        if ($this->_productCollection === null) {
            $product = $this->_coreRegistry->registry('product');

            $sku = $product->getSku();

            /** @var \Magento\Catalog\Model\ResourceModel\Product\Collection $collection */
            $collection = $this->_productCollectionFactory->create();
            $this->_catalogLayer->prepareProductCollection($collection);
            $collection->addAttributeToFilter('entity_id', 100);
            $collection->addStoreFilter();
            $collection->setPage(1, 1);
            $this->_productCollection = $collection;
        }
        return $this->_productCollection;
    }

}

But it tells me :

Fatal error: Uncaught TypeError: Argument 7 passed to Extranet\Catalog\Block\Product\ProductList\Echantillon::__construct() must be an instance of Magento\Catalog\Model\Product\AttributeSet\Options, array given,

I really don't understand that. I tried several different object, I even tried through the  di.xml to inject an object in the $data , and nop...

Edit: Note if i remove the $attributeSetOptions injection, my block works.

Final edit :

As everyone responded, it has something to do with var/

I tried my project on another server, and everything was ok. Weirdly, it came from my virtual machine: some classes were properly generated, other were not... Just restarted it this morning, and everything works... So sorry, not trully a Magento 2 PB, but i will know now that this kind of pb probably come from /var


texts: How to change programmatically product stock status when product sku doesn't appears in provider data feed?

texts:
I'm using Magento CE 1.9.1
I made an import script to import products from a provider xml feed.
This feed is update everyday at 3 a.m .
My profider send me in his xml only products where are in stock in his shop.

So how can I update my product stock statut to out of stock (by product sku) when the product sku doesn't exist in the xml feed ?

I put an example to explain what I want, data provided in the xml  :

Monday :        Tuesday :

Sku   qty       Sku    qty

ABC   22        ABC    12
BDE   30        FGH    4
FGH   15

What I have to do :
Tuesday I have to set programmatically my product BDE to "out of stock" because it doesn't appear in the xml.

There is my import script :

    $file = 'feed.xml';

    $feed = simplexml_load_file($file);

    foreach($feed as $product){

        //some datas in xml feed
        $sku = $product->identifiant_unique;
        $prix = $product->prix;
        $titre = $product->categorie3;
        $quantiteStock = $product->quantiteStock;
        $poid = $product->poids_net;

        //Setters
        $produit = Mage::getModel('catalog/product');
        $produit->setName($titre.' '.$sku);
        $produit->setSku($sku);
        $produit->setWeight($poid);
        $produit->setAttributeSetId(4);
        $produit->setDescription($titre.' '.$sku);
        $produit->setShortDescription($titre.' '.$sku);
        $produit->setTypeId($product['type_id'])->setWebsiteIds(array(1))->setStatus(Mage_Catalog_Model_Product_Status::STATUS_ENABLED)->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
        $produit->setPrice($prix);

        $produit->setIsMassupdate(true);
        $produit->setExcludeUrlRewrite(true);
        $produit->save();

        // For Inventory Management
        $stockItem = Mage::getModel('cataloginventory/stock_item');
        $stockItem->assignProduct($produit);
        $stockItem->setData('is_in_stock', 1);
        $stockItem->setData('stock_id', 1);
        $stockItem->setData('store_id', 1);
        $stockItem->setData('manage_stock', 1);
        $stockItem->setData('use_config_manage_stock', 0);
        $stockItem->setData('min_sale_qty', 1);
        $stockItem->setData('use_config_min_sale_qty', 0);
        $stockItem->setData('max_sale_qty', 1000);
        $stockItem->setData('use_config_max_sale_qty', 0);
        $stockItem->setData('qty', $quantiteStock);
        $stockItem->save();
    }

Thanks


texts: Can't update products and attributes in Magento 1.9.2.2

texts:
We just recently moved our Magento 1.9.2.2 site to a new server. We tried a few tests and noticed that we can't update products and attributes in the backend. The page refreshes but there is no success message. We checked our error_logs and this is the error:

2016-04-08T09:01:33+00:00 ERR (3): Warning: array_key_exists() expects parameter 2 to be array, null given  in /var/www/vhosts/xxx/xxx/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 507
2016-04-08T09:01:33+00:00 ERR (3): Warning: array_key_exists() expects parameter 2 to be array, null given  in /var/www/vhosts/xxx/xxx/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 507
2016-04-08T09:01:33+00:00 ERR (3): Warning: array_key_exists() expects parameter 2 to be array, null given  in /var/www/vhosts/xxx/xxx/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 507
2016-04-08T09:01:33+00:00 ERR (3): Warning: array_key_exists() expects parameter 2 to be array, null given  in /var/www/vhosts/xxx/xxx/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 507
2016-04-08T09:01:33+00:00 ERR (3): Warning: array_key_exists() expects parameter 2 to be array, null given  in /var/www/vhosts/xxx/xxx/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 507
2016-04-08T09:01:33+00:00 ERR (3): Warning: array_key_exists() expects parameter 2 to be array, null given  in /var/www/vhosts/xxx/xxx/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 507
2016-04-08T09:01:33+00:00 ERR (3): Recoverable Error: Argument 1 passed to Varien_Object::addData() must be of the type array, null given, called in /var/www/vhosts/xxx/xxx/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 514 and defined  in /var/www/vhosts/xxx/xxx/lib/Varien/Object.php on line 243
2016-04-08T09:01:33+00:00 ERR (3): Warning: Invalid argument supplied for foreach()  in /var/www/vhosts/xxx/xxx/lib/Varien/Object.php on line 245

We have tried running the compiler as well as clearing the cache but it didn't work.

Anyone that can help me out with this is much, much appreciated.

Thanks!


texts:
I am using the ever popular Ultimo theme in 1.8.10. With 'Merge CSS' enabled in the Magento config, all site files are being merged into one file - perfect.

However, I have some important CSS3 properties which are not being included, the custom selector is included, but is empty. Example as below:-

In custommenu.css

.brands img {
  filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale");
  filter: gray;
  -webkit-filter: grayscale(100%);
}
.brands img: hover {
  filter: none;
  -webkit-filter: grayscale(0%);
}

You guessed it, this will allow images to be shown in the menu as grayscale and in full colour when hovered over. Working perfectly in Firebug and Chrome.

However, the generated CSS file completely omits the properties and generates as so:-

.brands img {
}
.brands img:hover {
}

My question is - why? Is this a known problem for CSS3 in Magento 1.8.10? Is there a solution to this? I wondered if there was a way to 'override' what is and is not merged?

As a possible solution, I have removed the filter properties and just put something simple like 'background: red;' and these changes do merge and display as expected in the frontend, even just 'filter: none;' does not. I have checked my filter code over and over again and cannot foresee any problem with it.


texts: Magento 2 fail to add a plugin to the Model class - Customer.php

texts:
I wrote a plugin to Customer.php, for testing purpose, I added the error_log statement, but it had not been executed when I do the login action.
Customer.php in my plugin:

<?php
namespace Vendor\PluginTest\Model\Plugin;

class Customer
{
    public function afterValidatePassword(\Magento\Customer\Model\Customer $subject,$result)
    {
        error_log('afterValidatePassword');
        return $result;
    }
}

di.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Customer\Model\Customer">
        <plugin name="customer-test-module" type="Vendor\PluginTest\Model\Plugin\Customer" sortOrder="1"/>
    </type>
</config>

I can't figure out where's wrong. Anyone can help? Anything I forgot to set? Thanks


texts: Add column to "Sales Order" history content in customer account

texts:
Hello Magento's,

How we can add column to Sales order history content into customer account.

can anyone help me please?


texts:
I am trying to cut some code to speed up the site and found aclendar.phtml + js and just wondering, what do they do?

My site's home page does not have any of calendar code but if you were to open inner pages, like https://www.airyhair.com/tape-in-hair-extensions.html

it has this:

'DHTML Date/Time Selector\n' +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
'For latest version visit: http://www.dynarch.com/projects/calendar/\n' +
'Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details.' +
'\n\n' +
'Date selection:\n' +
'- Use the \xab, \xbb buttons to select year\n' +
'- Use the \u2039 buttons to select month\n' +
'- Hold mouse button on any of the above buttons for faster selection.';
Calendar._TT["ABOUT_TIME"] = '\n\n' +
'Time selection:\n' +
'- Click on any of the time parts to increase it\n' +
'- or Shift-click to decrease it\n' +
'- or click and drag for faster selection.';

Calendar._TT["PREV_YEAR"] = 'Prev. year (hold for menu)';
Calendar._TT["PREV_MONTH"] = 'Prev. month (hold for menu)';
Calendar._TT["GO_TODAY"] = 'Go Today';
Calendar._TT["NEXT_MONTH"] = 'Next month (hold for menu)';
Calendar._TT["NEXT_YEAR"] = 'Next year (hold for menu)';
Calendar._TT["SEL_DATE"] = 'Select date';
Calendar._TT["DRAG_TO_MOVE"] = 'Drag to move';
Calendar._TT["PART_TODAY"] = ' (' + "today" + ')';

// the following is to inform that "%s" is to be the first day of week
Calendar._TT["DAY_FIRST"] = 'Display %s first';

// This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "0,6";

Calendar._TT["CLOSE"] = 'Close';
Calendar._TT["TODAY"] = "today";
Calendar._TT["TIME_PART"] = '(Shift-)Click or drag to change value';

// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%b %e, %Y";
Calendar._TT["TT_DATE_FORMAT"] = "%B %e, %Y";

Calendar._TT["WK"] = "Week";
Calendar._TT["TIME"] = 'Time:';
//]]>

Is this needed for retail products? I never once seen a calendar on my site


texts: Change default homepage Magento ver. 2.1.1

texts:
I have installed sample data on magento(Madison Island), It has default homepage set. I have created new page called test (cms>pages>create page).

When I open my localhost, test page should appear first rather than homepage of madison island. How can i do it?


texts: Change Magento 2 Paypal Logo on Checkout Step 2

texts:
I want to change the Paypal logo on Magento 2 Checkout second step.
I have found that file to do the modification is,

  vendor/magento/module-paypal/view/frontend/web/template/payment/paypal-express.html

I don't want to modify core files and i have done the override inside

  design/frontend/Vendor/mytheme/Magento_Paypal/web/template/payment/paypal-express.html

but it doesn't do any effect on frontend.

Which is the correct way to override Paypal module?


texts: what is the table of products in magento 2?

texts: I want to know what is the table in the magento 2 database, which stores the product information as the description. I found a table called "quote_item" but there are a lot less products than I have in the store.


texts: Magento image resize returns only last image

texts:
I'm trying to build mobile image gallery for product using Magento resize function.

Everything works fine -  code displays 4 pictures (there is 4 pictures for this product in backend), but all 4 displayed pictures are last image of a product.

Example:

In admin I have

Image 1
Image 2
Image 3
Image 4

Result I get is:

Image 4
Image 4
Image 4
Image 4

Result I want to achieve should be:

Image 1
Image 2
Image 3
Image 4

Any pointers would be more than appreciate.

Please see code below:

<?php
$product_id = $this->getProduct()->getId();
$product = Mage::getModel('catalog/product')->load($product_id);//product id here
$galeries = array();

foreach($product->getMediaGalleryImages() as $image){

    $image_path = $image->getPath();
        if(!file_exists($image_path)) continue;
        $galeries[$image->getLabel()]['images'][]['url']=$image->url;
        $correctURL = $this->helper('catalog/image')->init($this->getProduct(), 'small_image', $image->getFile())->resize(750,750);
            if( $image->associated_attributes != ''){

                $idForSlider = explode('-',$image->associated_attributes);
                $idForSlider = $idForSlider[1];
                $idForSlider = 'swatches_option_value_'.$idForSlider;
                $galeries[$image->getLabel()]['idForSlider']=$idForSlider;

            }

}

    foreach ($galeries as $galery){
        $idForOwl = $n;
        $n++;

        ?>
        <div class="v-slider<?php echo ($idForOwl+1)?>">
        <div id="owl-demo<?php echo ($idForOwl+1)?>" class="owl-carousel" style="">

        <?php

        foreach ($galery['images'] as $image) {
            ?>

            <img src="<?php echo $correctURL?>" width="750" height="750">

            <?php
         }

         ?>

    <?php
    }
    ?>


texts: Change the width of Field Ui Component Magento 2

texts:
How do i change Field With in UI Component Form in Admin Side. I used id to change the width but didn't worked.

<field name="percentage">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="additionalClasses" xsi:type="array">
                    <item name="admin__field-my-custom-class" xsi:type="boolean">true</item>
                </item>
                <item name="resizeEnabled" xsi:type="boolean">true</item>
                <item name="resizeDefaultWidth" xsi:type="string">60</item>
                <item name="label" xsi:type="string">Percentage:</item>
                <item name="visible" xsi:type="boolean">true</item>
                <item name="dataType" xsi:type="string">price</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">flashsalespro</item>
                <item name="validation" xsi:type="array">
                    <item name="required-entry" xsi:type="boolean">true</item>
                </item>
            </item>
        </argument>
    </field>


texts:
I am having a hard time trying to fully understand Composition with Magento. I am hoping you could help me with it.
From what I gather, we no longer should use inheritance, so my classes should not extend another and all of my code should be put in to classes that have a single purpose.
So is it right that I should do the following to implement a function?
• Create an interface
• Create a class and implement the interface
• Create a preference for that interface in the di.xml
• Pass the interface to another class, where it is to be used, using dependency injection
• Call the function on my interface

Thanks.


texts:
SOAP API not working in Magento-2.3.2. It's showing below error

  https://domain.com/soap/?wsdl&services=integrationAdminTokenServiceV1

env:Receiver The "decimal" class doesn't exist and the namespace must be specified. Verify and try again. <![CDATA[#0 /var/www/html/c/vendor/magento/framework/Reflection/TypeProcessor.php(219): Magento\Framework\Reflection\TypeProcessor->register('decimal') #1 /var/www/html/c/vendor/magento/framework/Reflection/TypeProcessor.php(188): Magento\Framework\Reflection\TypeProcessor->_processMethod(Object(Zend\Code\Reflection\MethodReflection), 'CheckoutDataShi...') #2 /var/www/html/c/vendor/magento/framework/Reflection/TypeProcessor.php(152): Magento\Framework\Reflection\TypeProcessor->_processComplexType('\\Magento\\Checko...') #3 /var/www/html/c/vendor/magento/framework/Reflection/TypeProcessor.php(219): Magento\Framework\Reflection\TypeProcessor->register('\\Magento\\Checko...')


texts: Looking for store names, admin and "distro" in Mage_Core_Model_App

texts:
So, my first problem was involving putting a custom price on a product. Upon many searches, I've discovered that Ben Gribaudo has a great tutorial that I'm looking for in order to programmatically change a price when entering an object into the store.  The only thing that I am not understanding is understanding where to get the _STORE_ID for the "Admin" and "Distro" that he speaks of.  Please take a look at the following code:

$product = Mage::getModel('catalog/product');
$product->load($productId);
$product->setSpecialPrice($price);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$product->save();
Mage::app()->setCurrentStore(Mage_Core_Model_App::DISTRO_STORE_ID);
$cart = Mage::getSingleton('checkout/cart');
$cart->addProduct($product, array('qty' => $quantity));
$cart->save();

For reference, here is the link to explain what he's talking about: http://bengribaudo.com/blog/2011/07/29/1514/programmatically-setting-m-items-price-when-adding-to-cart

So, my BIG QUESTION is this: How does one ascertain the ADMIN_STORE_ID and DISTRO_STORE_ID to be plugged into the 4th and 6th lines of this code?


texts: How Can I have a shared inventory for my store views but alter product status for each view

texts:
I am creating some multiple country stores, the inventory is managed from one location.

All stores will have the some of the products in common but not all stores will have all of the products for sale.

For example the UK store will have 100% of products sold but the FR store will have 40% of the products sold

I need to stop the other 60% of the UK products showing up in the FR store.

I would like to keep a common inventory hence the use of the store views otherwise I would run into complications managing the total inventory.

Is there a way to do this?


texts: Sales order grid not loading for restricted roles in magento2

texts:
I have created a new resource with limited access for only dashboard and sales.

System >> User Roles

then created the new user and assigned the above Role.

If i login with the new user which is created recently.

I can access all the resource set for the particular user in admin.

But When i navigate to Sales > Orders

Grid is not loading where i have several orders in the database.

This shows when i login with admin user.

I have made a research on this. Someone suggested to disable asynchronous indexing. But that is already disabled in my case.

I am getting one javascript console error like below.

   Uncaught TypeError: Cannot read property 'items' of null

This is a strange issue, Can anyone look into this and update me Please.

Thanks in Advance


texts:
When i delete products from admin it give error message

SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in '(`ponicosmetics`.`tag_summary`.`products` - 1)'

query was:

UPDATE `tag_summary` SET `products` = products - 1 WHERE (tag_id IN ('7', '8', '30', '60', '61', '65', '86', '87', '88', '210'))

this.

I already follow following steps:

Go into your database using PhpMyAdmin.
Do a backup (always a good practice to back-up first).
Select the Magento database you’re using.
Select table sales_flat_quote (on second page).
Select structure tab
Select ‘change‘ on row called ‘items_count‘
Go to the drop-down on the column named ‘Attributes‘ and change value to the very top value which is blank ‘(no value)‘, as opposed to the default selection ‘UNSIGNED‘ .
Click save, and you’re good to go!

But this error "SQLSTATE[22003]:

Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in '(`ponicosmetics`.`tag_summary`.`products` - 1)', query was: UPDATE `tag_summary` SET `products` = products - 1 WHERE (tag_id IN ('7', '8', '30', '60', '61', '65', '86', '87', '88', '210')) "

has comes .
Please suggest me any solution.


texts: Product Attribute Filters All Returning 0 Products In Layered Navigation After Magmi Import

texts:
I have recently used Magmi to import all of my product data. The data imports fine and is visible in the frontend, however the layered navigation does not mirror the product data that is visible inside the admin. The attributes that are not working are multiselect and select product attributes.

I have tried reindexing all indexes multiple times and clearing all caches but it doesnt seem to have any effect. It seems as though if I view the product inside the admin and save it with changes to the filterable attribute, then the layered navigation appears reflecting these changes. Magento seems to ignore any data imported from Magmi.

Does anyone know how to ensure the layered navigation reflects the product data stored in the database?


texts: Display custom template file in Magento 2.2

texts:
I want create a template file for sales->order->create new order.

In layout file(Xxx/Order/view/adminhtml/layout/sales_order_create_index.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">

            <referenceContainer name="billing_method">
                <block class="Magento\Backend\Block\Template" template="Xxx_Order::order/create/billing/method/form.phtml" name="order_create_billing_form" as="form" />
            </referenceContainer>

    </page>

This is my core file Sales-module/view/adminhtml/layout/sales_order_create_index.xml

<block class="Magento\Sales\Block\Adminhtml\Order\Create\Billing\Method" template="Magento_Sales::order/create/abstract.phtml" name="billing_method">
                            <block class="Magento\Sales\Block\Adminhtml\Order\Create\Billing\Method\Form" template="Magento_Sales::order/create/billing/method/form.phtml" name="order_create_billing_form" as="form"/>
                        </block>rm" as="form"/>
                        </block>

form.phtml:

        <?= /* @noEscape */ __('Additional Comment') ?>

        <textarea  rows="3"
                   cols="5"
                   id="order-comment"
                   name="order[order_comment]"
                   class="admin__control-textarea"></textarea>

My template file isn't showing after reloading page.


texts: Compatible MariDB version for Magento 2.4

texts:
We are upgrading from magento 2.3 to 2.4. Would like to know the compatible MariaDB version to be used for the upgraded magento version. As per official magento site, it mentions MySQL8.0 for on premise. And there is no mapping/compatibility available for this particular MySQL version from mariaDB.
Reference - https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/
Could you please suggest on the recommended MariaDB version to be used for magento2.4?


texts: How To Add Custom Notices to Page Top in Magento 2

texts:
I'm just started Magento and recently have some issues. So, this is what I want to do: I want to display Notices at the top of the site as following Image.

Eg: I want to show some Discount Coupons on the Top of the site, I want to add that message in backend side and the it will show the customers.


texts:
below shows that the code contain method get_categories that reload the category by ID after loading the category collection.

    public function  get_categories($categories)
{ //This is the recursive function created and here we pass the a collection of categories.
  //$array is a variable to store all the category detail .
    $array = array();
    foreach($categories as $category) {

            $cat = $this->getCategoryModel()->load($category->getId());
            $array[$category->getLevel()][$cat->getId()]= array('id' => $cat->getId(), 'level' => $cat->getLevel(), 'name' => $cat->getName(), 'url' => $cat->getUrl(), 'display_mode' => $cat->getDisplayMode(), 'image' => $cat->getImageUrl('wizard_icon'), 'description' => $cat->getWizardQuestion(), 'categories' => [] ); //In this line we get an a link for the product and product count of that category
            if($category->hasChildren()) {  //if category has children or not. If yes then it proceed in inside loop.
                 $children = $category->getChildrenCategories(); // $children get a list of all subcategories
                $array[$category->getLevel()][$cat->getId()]['categories']=  $this->get_categories($children); //recursive call the get_categories function again.
                }

        }
    return  $array;
}

how can i do other way need guidance .


texts: How to turn off/disable Skrill/Moneybookers in Magento

texts:
now I don't want Skrill/Moneybookers, this payment method in Magento.
but I can't find where to turn it off or disable.

the website still show this payment link in payment page.
some customer still click and turn to their page for payment.

Can anybody help me?

Thanks