texts: How to turn off URL rewrites for products not visible individually in Magento 2?

texts:
I have configurable products which in visible on the website. All it's associated simple/virtual products are not visible individually on the site.

How I can turn off url_rewrites of these simple/virtual products which is not visible individually ?


texts: Magento 2.4.1 Elastic Search critical error failed to create query "all shards failed"

texts:
I updated my site to Magento 2.4.1 after that in my exception.log i continueously get folllowing error :
main.CRITICAL: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"failed to create query: For input string: "10-19-459-1090-1788-1973-2061-2196-2344-2360-2431-2851"","index_uuid":"I3R3qrSMRd2ez0BKKOMduQ","index":"magento2_product_1_v35"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v35","node":"NQce1OBCTMKf0HQwsXBjyg","reason":{"type":"query_shard_exception","reason":"failed to create query: For input string: "10-19-459-1090-1788-1973-2061-2196-2344-2360-2431-2851"","index_uuid":"I3R3qrSMRd2ez0BKKOMduQ","index":"magento2_product_1_v35","caused_by":{"type":"number_format_exception","reason":"For input string: "10-19-459-1090-1788-1973-2061-2196-2344-2360-2431-2851""}}}]},"status":400} {"report_id":"3e2c9f4c0d0d1bd840f9c76a0d00a0acd7e1775ed0bc8c69ad0afb32dd14f8f7","exception":"[object] (Elasticsearch\Common\Exceptions\BadRequest400Exception(code: 400): {"error":{"root_cause":[{"type":"query_shard_exception","reason":"failed to create query: For input string: \"10-19-459-1090-1788-1973-2061-2196-2344-2360-2431-2851\"","index_uuid":"I3R3qrSMRd2ez0BKKOMduQ","index":"magento2_product_1_v35"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_product_1_v35","node":"NQce1OBCTMKf0HQwsXBjyg","reason":{"type":"query_shard_exception","reason":"failed to create query: For input string: \"10-19-459-1090-1788-1973-2061-2196-2344-2360-2431-2851\"","index_uuid":"I3R3qrSMRd2ez0BKKOMduQ","index":"magento2_product_1_v35","caused_by":{"type":"number_format_exception","reason":"For input string: \"10-19-459-1090-1788-1973-2061-2196-2344-2360-2431-2851\""}}}]},"status":400} at /public_html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632)"} []
Need help to sort this thing out.


texts: Add CMS static-block in attribute text area?

texts:
I have some share-buttons in a static-block. I control some content on product-level by custom attributes. Is it possible to add a static block in a attribute text area. I tried with {{block type="cms/block" block_id="your_block_id"}} but it's not working?

Thanks

UPDATE:

On this page, look for the text "Famke (en Joost) – Deventer". This content is added at Manage product > product in an Attribute text-area. Below this alinea (in the same text-area i want to add the static-block (with its content, the share buttons). I have to do it like this because of some CSS classes.


texts: Magento Configurable Product Page Update Custom Dropdown With Attribute Value

texts:
So I have a configurable product which has a number of associated simple products.

I am trying to obtain functionality on product page where the user can choose a colour for the product, and then this accordingly updates a second dropdown with the set value for the attribute in the simple product. This second dropdown uses the batch attribute which is a text field attribute and applies to simple products only.

Clearly there needs to be some functionality so the batch value is received in relation to the colour selected, which is the stumbling block at the moment. The current code is just displaying a batch value, which turns out to be the one for the last colour.

At the moment as you can see from the below code, I can get the last batch to be visible in the dropdown, but as described earlier this is not the required functionality. Ideally I need this value to change to the correct batch value which is assigned in the simple products options in the magento admin panel.

<select name="super_attribute[<?php echo $_product->getAttributeText('brand') ?>]"
"class="required-entry"
optitle="<?php echo strtolower($_product->getLabel()); ?>">
<option><?php echo $simple_product->getBatch();?></option>
</select>

This code is in the configurable.phtml file, all of which can be seen below

<?php

$_product    = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
?>

<?php if ($_product->isSaleable() && count($_attributes)):?>
<?php foreach($_attributes as $_attribute): ?>

<label for="attribute<?php echo $_attribute->getAttributeId() ?>"><?php echo $_attribute->getLabel() ?>

<dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>
<select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]"
 id="attribute<?php echo $_attribute->getAttributeId() ?>"
class="required-entry super-attribute-select"
optitle="<?php echo strtolower($_attribute->getLabel()); ?>">
<option><?php echo $this->__('Choose an Option...') ?></option>
</select>

<?php

$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($_product);
$simple_collection = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions();

foreach($simple_collection as $simple_product)
{

echo  $simple_product->getName() .  "
" . $simple_product->getId() . "
" . $simple_product->getBatch() . "
" ;

}

?>

<select name="super_attribute[<?php echo $_product->getAttributeText('brand') ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>"
"class="required-entry" optitle="<?php echo strtolower($_product->getLabel()); ?>">

<option><?php echo $simple_product->getBatch(); ?></option>

</select>

<?php endforeach; ?>

<?php endif;?>


texts: Change the order of attribute options after creating a lot of configurable products?

texts:
Let's say you have 3 attributes. Size, Color and Texture.

The Size attributes has attribute options like this.

M
L
XXL
40
S
XL
45

Meaning they are not in their correct order. Also meaning I cannot not on the frontend of the application sort these, since they "S" does not come before "M" in the alpabet.

I know Magento has it's sorting when you create attributes. But here has been created maybe 15-20 attributes, with around 200-600 attribute options.

And around 1000 products has been created using these attributes.

Is it possible, to change the sorting of the attribute values now, afterwards? Without breaking any connections between simple products and configurable products?


texts: Call a Shipping field from front end to backend Magento 2 Layout processor

texts:
I have added a custom delivery date option in shipping method on front end using layout processor and it is showing and working fine. Is there any way to merge or call the same method in backend order creation page. i.e same layout processor for admin order page to select the delivery date.

  di.xml

    <type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
    <plugin name="my_checkout_layout_processor_add_delivery_block"
            type="Vendoor\Module\Plugin\Checkout\Block\LayoutProcessor" sortOrder="1"/>
</type>

  LayoutProcessor.php

    <?php
namespace Vendoor\Module\Plugin\Checkout\Block;

class LayoutProcessor
{

    /**
     * @param \Magento\Checkout\Block\Checkout\LayoutProcessor $subject
     * @param array $jsLayout
     * @return array
     */
    public function afterProcess(
        \Magento\Checkout\Block\Checkout\LayoutProcessor $subject,
        array $jsLayout
    ) {

        $requiredDeliveryDate =  false;
        $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
        ['shippingAddress']['children']['shippingAdditional'] = [
            'component' => 'uiComponent',
            'displayArea' => 'shippingAdditional',
            'children' => [
                'delivery_date' => [
                    'component' => 'Vendoor_module/js/view/delivery-date-block',
                    'displayArea' => 'delivery-date-block',
                    'deps' => 'checkoutProvider',
                    'dataScopePrefix' => 'delivery_date',
                    'children' => [
                        'form-fields' => [
                            'component' => 'uiComponent',
                            'displayArea' => 'delivery-date-block',
                            'children' => [
                                'delivery_date' => [
                                    'component' => 'Vendoor_module/js/view/delivery-date',
                                    'config' => [
                                        'customScope' => 'delivery_date',
                                        'template' => 'ui/form/field',
                                        'elementTmpl' => 'Vendoor_module/fields/delivery-date',
                                        'options' => [],
                                        'id' => 'delivery_date',
                                        'data-bind' => ['datetimepicker' => true]
                                    ],
                                    'dataScope' => 'delivery_date.delivery_date',
                                    'label' => 'Delivery Date',
                                    'provider' => 'checkoutProvider',
                                    'visible' => true,
                                    'validation' => [
                                        'required-entry' => $requiredDeliveryDate
                                    ],
                                    'sortOrder' => 10,
                                    'id' => 'delivery_date'
                                ]
                            ],
                        ],
                    ]
                ]
            ]
        ];

        return $jsLayout;
    }
}


texts: Magento 2 - Customize Customer Grid Collection Data

texts:
I want to add a where clause in customer grid collection.
e.g.

$currentCollection->getSelect()->where('custom condition');

I tried to google it but got no success.
I have also tried to implement customization methods used for product and order grid but it seems that di.xml and ui component xml files are different.

e.g when I try to add code

<argument name="addFieldStrategies" xsi:type="array">
        <item name="title" xsi:type="object">Namespace\Module\Ui\DataProvider\Test\AddTitleFieldToCollection</item>
</argument>

in file /app/code/Namespace/Module/view/adminhtml/ui_component/customer_listing.xml

I get

Element 'arguments': This element is not expected. Expected is ( argument ).

I have also tried modifying collection through observer but it seems event customer_grid_collection_load_before does not exist.

I don't want to modify core code and I have no clue from where to start. Please comment if any other information needed.


texts: Difference between '_' and '/' when loading classes?

texts:
Can someone please explain to me what is the difference? Or if they're equals, but one is "righter" than the other one?

For example: I've seen something like namespace_module/helper


texts: How to publish my module in magento Marketplace?

texts:
I have developed a module for magento 2. In particular is a custom shipping method, I would like anybody could be able to use my shipping method.
How can I do to put my module downloable.
I tried on https://packagist.org but is saying to me that "URLs with user@host are not supported, use a read-only public URL", I have my repo in bitbucket but I dont know how to solve that.
I am not getting the relation between Magento MAarketPlace and Packagist.
Thanks!!


texts: Disable Coupon Code - After delete discount code block from magento cart, delete a product on cart broke the block

texts:
I don't want to use coupon code block on cart page so I delete the code on this file

/app/design/frontend/base/default/layout/checkout.xml

"block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"

This update works, there is no coupon code on my cart page, but if there is two or more items and I delete one of them, the discount code block show again and looks weird

Normal

https://www.dropbox.com/s/g4y9azefnyv5n2y/Cap%202014-10-05%2000-27-33-613.png?dl=0

After delete product

https://www.dropbox.com/s/qbgc3r5jdg7dknq/Cap%202014-10-05%2000-28-07-066.png?dl=0

What should I do the cart page work well after delete product?

or is there any other way to disable coupon code which don't make this problem?


texts: Javascript function if subtotal is lower than 50 or 0

texts:
So I wrote a javascript function to display a message if the cart subtotal is less than 50. It works but I noticed that if the cart subtotal is 0 the javascript doesn't work and the message isn't displayed. I assume this is because the subtotal is NaN rather than 0. Not sure how to fix this though?

This is my js

function minus_number() {

    var amount = <?php echo $carttotal; ?>;

    if (amount < 50){
        var a  = document.querySelector("#spend");
        var first_number = 50.00;
        var second_number = <?php echo $carttotal; ?>;
        var result = (first_number).toFixed(2) - (second_number).toFixed(2);
        a.innerHTML = "Spend an extra £" + result.toFixed(2) + " for free delivery over £50!";
    }

    if (amount >= 50){
    var a = document.querySelector("#spend");
    var delivery_message = "YOUR ORDER QUALIFIES FOR FREE DELIVERY!";
    a.innerHTML = delivery_message;
    }

}
window.addEventListener("load",minus_number());


texts:
HOW to remove reviews date in magento
I tried this

.box-reviews dl dd small.date {
    display:none;
}

and also removed code

<small class="date"><?php echo $this->__('(Posted on %s)', $this->formatDate($_review->getCreatedAt()), 'long') ?></small>


texts: Magento 1.x or 2.x DB connection with MSSQL

texts:
My application is going to be developed either in Magento 1.x or 2.x as per the business requirements and approvals. What they are insisting is to host the application in Azure environment and to use MSSQL server (or Azure Cosmos DB) to connect to Magento.

I want to know is it technically possible and if yes, which specific version and do I need to write multiple custom queries (as read more and more in certain articles and which can degrade my site performance and can be stuck in future also) also will Magento wont provide further support for this?

Thanks,
Vishal


texts:
Recently I setup Magento. I tried signing up as an user and buying a product, however, I see no emails are coming through to the customer when the order gets processed or when a user tries to reset a password. I have cron setup, however, no idea why emails aren't going through. I've checked settings and 'Disable Email Communications' is set to 'No'.

Is there anything I could possibly be missing?


texts: Configurable items: how to hide combinations not in stock?

texts:
I have this to handle:
On our clothing store, we have the classic "color" and "size" attributes and often happens that we create new variations of color for a sku.
The problem is that this new color is added directly on the frontend even if the variations are "out of stock". So the customers will see that there is a new color but if they click on that color, it's unavaliable and this is not good, I need to show ONLY the available colors according to the stock qty.
I.E.
T-shirt exists on different sizes, and with "red" and "blue" color variation.
If a customer enter on the item page will see the possibility to choose between sizes, and colors blue and red. And until here all it is as expected.
Now if I create a new color variation "yellow" with qty=0 --> "out of stock", the yellow color will appears with the blue and the red even if all the yellow tshirts are not available and this should be avoid.
How we can show only "in stock" variations?


texts: Magento 1.9.2.1 test emails sending, but order emails not

texts:
I'm using magento to set up a webstore. I'm using Aschroder SMTP Pro, and wiring it through Zoho to send emails.

(The zoho email is myname@projectname.com, and I have it set up as the email for all the different fields in the settings customer support, sales, etc)

I did a test transaction using paypal sandbox, and that was succesful. Then I used the magento "ship" and "invoice" options to update the order. Here's where it gets wonky. The first time I did it (this morning) it worked. The second time I did it (about 8 hours after) it no longer sent the email.

I don't remember changing any settings so I am at a loss. I've been reading around and I have checked my cron jobs and done a test email.

The test email I got, and the cron job was working from my cPanel.

The cronjob looks like this:

php -f /home/projectname/public_html/cron.php > /dev/null

and it is set to run every 5 minutes.

I've heard there can be some issues with the cron jobs from reading up, but mine should be working. Not only that but I manually went to the cron.php in my browser and nothing changed)


texts: Magento 2 Customer Balance module new column

texts:
Version : Magento cloud commerce 2.3.2

In magento_customerbalance I've added new column date and I'm trying to save it in following way

/*Obj for testing purpose only */
$balance = $obj->get('\Magento\CustomerBalance\Model\BalanceFactory')->create();
$balance = $balance
        ->setCustomer($customer)
        ->setWebsiteId($customer->getWebsiteId())
        ->setAmountDelta('5293')
        ->setNotifyByEmail(false)
        ->setData('mydate','1388951999');
$balance->save();

It is saving the above details but it is not updating mydate column value.

It is saving mydate only 1st time, After that I'm not able to update it.

I want to update that date multiple times. So how do I do that?


texts:
My email template:

    {{template config_path="design/email/header_template"}}

{{trans "%name," name=$order.getBillingAddress().getName()}}

                {{trans "Thank you for your order from %store_name." store_name=$store.getFrontendName()}}
                {{trans "Once your package ships we will send an email with a link to track your order."}}
                {{trans 'If you have questions about your order, you can email us at %store_email' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at %store_phone' store_phone=$store_phone |raw}}{{/depend}}.
                {{depend store_hours}}
                    {{trans 'Our hours are %store_hours.' store_hours=$store_hours |raw}}
                {{/depend}}

{{trans 'Your Order #%increment_id' increment_id=$order.increment_id |raw}}

{{trans 'Placed on %created_at' created_at=$order.getCreatedAtFormatted(2) |raw}}

            {{depend order.getEmailCustomerNote()}}

                        {{var order.getEmailCustomerNote()|escape|nl2br}}

            {{/depend}}

{{trans "Billing Info"}}

{{var formattedBillingAddress|raw}}

                    {{depend order.getIsNotVirtual()}}

{{trans "Shipping Info"}}

{{var formattedShippingAddress|raw}}

                    {{/depend}}

{{trans "Payment Method"}}

                        {{var payment_html|raw}}

                    {{depend order.getIsNotVirtual()}}

{{trans "Shipping Method"}}

{{var order.getShippingDescription()}}

                        {{if shipping_msg}}

{{var shipping_msg}}

                        {{/if}}

                    {{/depend}}

            {{layout handle="sales_email_order_items" order=$order}}

{{template config_path="design/email/footer_template"}}

I add next css to template styles section:

td{background-color:white;}
table{background-color:white;}
tr th{text-align:left;}
tr td{text-align:left;}

And nothing happens.

I tried to insert

but still no result.

On email, some text added to classes, something like m_4018269044376677402address-details


texts: I have a javascript that I need to add to a static block. Could anyone explain it step by step?


texts: Magento Developer Certification for Magento 1 or 2

texts: I am a Magento 1.x developer and preparing for Magento certification. I may appear in exam for certification in next 5 to 6 months. If Magento 2.x is released before my exam then will i have to prepare for Magento 2.x also?


texts: Magento 2: Get custom category attributes by category id

texts:
I have category ID and need to get all custom attribute for example thumbnail image.

my code does not return all attributes

$category = $this->categoryRepository->get($childId, $this->_storeManager->getStore()->getId());
$category->getData();


texts:
After clear/setting/configuring so many errors & configurations installed the Magento V2.4.1 successfully, now getting below errors.

Type Error occurred when creating object:
Magento\Framework\Session\Generic\Interceptor, setcookie() expects
parameter 3 to be integer, array given

and

Type Error occurred when creating object:
Magento\Backend\Model\Auth\Session\Interceptor, setcookie() expects
parameter 3 to be integer, array given

I have ran the instance both PHP7.3 and PHP7.4 but getting same error. First time in the browser showing website, If I navigate any other page getting error continuously.

Continuously getting error and unable to open the backend and store front.

Help on this?


texts: Notification, sudden error: Warning: include(): Filename cannot be empty

texts:
Since this evening we are seeing this error.

First we see this in error log

2013-08-11T18:46:59+00:00 ERR (3): Warning: include(): Filename cannot be empty  in app/code/core/Mage/Core/Block/Template.php on line 241
2013-08-11T18:46:59+00:00 ERR (3): Warning: include(): Filename cannot be empty  in app/code/core/Mage/Core/Block/Template.php on line 241
2013-08-11T18:46:59+00:00 ERR (3): Warning: include(): Failed opening '' for inclusion (include_path='lib/minify:app/code/local:app/code/community:app/code/core:lib:.')  in app/code/core/Mage/Core/Block/Template.php on line 241

and with full exception printing we see the following.

I tried disabling notifications, but don't know where to start (and how this suddenly occurs)

Warning: include(): Filename cannot be empty  in app/code/core/Mage/Core/Block/Template.php on line 241

#0 app/code/core/Mage/Core/Block/Template.php(241): mageCoreErrorHandler(2, 'include(): Filename cannot be empty', 'app/code/core/Mage/Core/Block/Template.php', 241, Array)
#1 app/code/core/Mage/Core/Block/Template.php(241): Mage_Core_Block_Template->fetchView()
#2 app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/base/default/template/system/cache/notifications.phtml')
#3 app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#4 app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#5 app/code/core/Mage/Adminhtml/Block/Cache/Notifications.php(62): Mage_Adminhtml_Block_Template->_toHtml()
#6 app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Cache_Notifications->_toHtml()
#7 app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#8 app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#9 app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#10 app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('notifications', true)
#11 app/design/adminhtml/default/default/template/page.phtml(55): Mage_Core_Block_Abstract->getChildHtml('notifications')
#12 app/code/core/Mage/Core/Block/Template.php(241): include('app/design/adminhtml/default/default/template/page.phtml')
#13 app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/default/default/template/page.phtml')
#14 app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#15 app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#16 app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Template->_toHtml()
#17 app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#18 app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#19 app/code/core/Mage/Adminhtml/controllers/DashboardController.php(43): Mage_Core_Controller_Varien_Action->renderLayout()
#20 app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Adminhtml_DashboardController->indexAction()
#21 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#22 app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Mage_Core_Controller_Request_Http)
#23 app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#24 app/Mage.php(683): Mage_Core_Model_App->run(Array)
#25 index.php(88): Mage->run('default', 'store')


texts:
I am using SoapUi to send a product to save changes the price per website for example here I am using the default website but it isn't working:
the Request:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
 xmlns:def="http://magento2/soap/default?
 services=catalogProductRepositoryV1">
 <soap:Header/>
  <soap:Body>
  <def:catalogProductRepositoryV1SaveRequest>
     <product>
     <sku>I00204_SI-00</sku>
     <price>25.99</price>
     </product>
  </def:catalogProductRepositoryV1SaveRequest>
</soap:Body>

the Response:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
  <env:Body>
    <env:Fault>
     <env:Code>
        <env:Value>rpc:ProcedureNotPresent</env:Value>
     </env:Code>
     <env:Reason>
        <env:Text>Procedure not present</env:Text>
     </env:Reason>
  </env:Fault>
  </env:Body>

Can anyone help please?


texts: File Upload as Category Attribute - Magento2

texts:
I want to create a custom attribute for Category, which is File Attribute.

I want to upload any kind of documents in it.
Like PDF,txt, doc, etc,.

Anyone helps me to do that via setup Upgrade?

Same like this, in Magento 2

Magento Custom Category Attribute File


texts:
I am creating a custom theme for Magento 2.

I have a header block defined this way (in Magento_Theme/layout/default.xml file):

<move element="catalog.topnav" destination="header-wrapper"/>
<move element="header.panel" destination="header-wrapper"/>
<referenceContainer name="header-wrapper" label="Page Header" as="header-wrapper" htmlTag="div" htmlClass="header-content">
</referenceContainer>

With above definition, the base header-wrapper is used, which is in module-theme/view/frontend/layout/default.xml

<container name="header-wrapper" label="Page Header" as="header-wrapper" htmlTag="div" htmlClass="header content">
    <block class="Magento\Theme\Block\Html\Header\Logo" name="logo">
        <arguments>
            <argument name="logo_img_width" xsi:type="number">189</argument>
            <argument name="logo_img_height" xsi:type="number">64</argument>
        </arguments>
    </block>
    <block class="Magento\Framework\View\Element\Html\Links" name="top.links">
        <arguments>
            <argument name="css_class" xsi:type="string">header links</argument>
        </arguments>
    </block>
</container>

As you see, block order is:

logo
top.links
cataog.topnav
header.panel

However, when rendering, this HTML is shown:

Ordering is different from defined in layout. How can I change it?


texts:
I have created an event called sales_order_place_after.

$order = $observer->getEvent()->getOrder();
 foreach($order->getAllVisibleItems() as $item){
     $ProdustIds[]= $item->getProductId();
 $Price[]= $item->getPrice();
  $QuoteIds[]= $item->getQuoteItemId();
  $ItemIds[]= $item->getItemId();
 }

Here i am getting price, product id, quote id. But Unable to get Item id , Item id is returning null .

Is there any way to get Item Id ?


texts:
Ho can i add a text to my too menu? http://www.benedicto.ro/

I search this question but i did not find something to help me

I want to add a text "free delivery" after "contul meu"


texts: Magento 1.9.0.1 Grouped Product Drop Down problem with sub-products quantity

texts:
I replaced the table view with a drop down view. Now, the file "template/catalog/product/view/type/grouped.phtml" looks like this:

..

<form action="<?php echo $this->getAddToCartUrl($_product) ?>" method="post" class="add-to-cart" id="product_addtocart_form_<?php echo $_product->getId()?>"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>

    <?php if($_product->isGrouped()): ?>
        <?php $_subAssociatedProducts = $_product->getTypeInstance(true)->getAssociatedProducts($_product); ?>
        <?php if(count($_subAssociatedProducts)){?>

            <select id="grouped_products" name="grouped_products" onchange="addSuperQty('<?php echo $_product->getId()?>',this.value);">
                <?php foreach ($_subAssociatedProducts as $_item) {?>
                <option value="<?php echo $_item->getId()?>" id="<?php echo number_format($_item->getFinalPrice(),2); ?>"><?php echo $this->htmlEscape($_item->getName())?></option>
                <?php } ?>
            </select>
        <?php }?>
        <span id="span_<?php echo $this->getId()?>">
        <input type="button" value="-" id="minus1" class="minus" />
        <input type="text" size="3" name="qty" onchange="changeQty(this.value,'<?php echo $_product->getId()?>');" id="<?php echo $_product->getId()?>_qty" maxlength="12" value="<?php echo $_product->getProductDefaultQty() * 1 ?>" class="input-text qty" />
        <input type="button" value="+" id="add1" class="plus" />
    <?php else:?>
        <input type="button" value="-" id="minus1" class="minus" />
        <input type="text" size="3" name="qty" id="qty" maxlength="12" value="<?php echo $_product->getProductDefaultQty() * 1 ?>" class="input-text qty" />
        <input type="button" value="+" id="add1" class="plus" />

    <?php endif; ?>
    <button type="button" class="button btn-cart" onclick="this.form.submit()"><?php echo $this->__('Add to Cart') ?></button>

</form>

..

For all my grouped products, the default value is 0. So this:

<?php echo $_product->getProductDefaultQty() * 1 ?>

Displays 0 for the quantity each time. What is wrong? On older Magento versions it worked.

When I set a bigger product quantity and try to add the product (sub product) into my account, I receive this error: Please specify the quantity of product(s).

Please help me to fix the problem. Thanks!


texts: Prevent applying Jquery to one particular select dropdown element

texts:
I am applying the custom Jquery to all my select dropdown in the whole site.but for one select dropdown.I don't want this select Jquery to apply.

please help me.


texts: Make link in navigation bar open in new window

texts:
I added page links to my top navigation bar by creating subcategories and creating url rewrites and it's working perfectly.
My question is: How do I make the link open in a new tab or new window?
I have one item in the navigation that is linked to an external site and would like it to open in a new tab rather than take the user away from my site.
Is this possible?
My site's address is http://hi-schoolworld.com/ and the page is titled Life Pics

Thank you!!


texts: can't figure out how to make iframe full width

texts:
our site has a max width that i cannot figure out how to override.  i'm guessing because of a div/container.  i'm not a developer so i'm not sure where to look.  i've tried !important but that hasn't worked.  i created a block and inserted that block on a category page.

here's the page

I've tried this solution but didn't work since it's limited by the container?

...

Try using .main.col1-layout {float:none; width:100%; padding-top:0px;}


texts: On editing the newsletter from the customer dashboard, it goes to a blank page

texts:
When i click on the edit link in the newsletter section of my account page. it goes to a blank page, also when i check the ManageController in the newsletter section,

if ($block = $this->getLayout()->getBlock('customer_newsletter')) {
        $block->setRefererUrl($this->_getRefererUrl());

    }

above section is not working.


texts:
I have some shirts that the client can choose the size, color and also add a custom text and choose the color of the text. My problem is that I'm not sure if I have a photo of each shirt color without text, in addition to a photo for each color with each text in the different colors (the photo of the shirt with text would be an example text since the you can customize it)

Is there any way to do this? or should I have a picture for each shirt color and text color?


texts: Magento 2: How to call CMS Block in email templates?

texts:
In Magento 1, we can call CMS Block in email templates like that:

{{block type="cms/block" block_id="mail_include_header"}}

I try above code for Magento 2, but it does not work.

How can we call CMS Block in email templates?


texts: Magento 2: Cannot load my library using composer

texts:
Sorry for the lengthy message.  I just wanted to provide as much information as possible.  I am writing a new module. I have a custom library that I need to load to use in my module.  I have the library classes in vendor/easyask/easyask_search/lib/EasyAsk/Impl.  The module is in app/code/EasyAsk/Search.

When I try to invoke EasyAsk\Impl\RemoteFactory, I get a class does not exist error.  I know the lib files are not autoloaded as I don't see them referenced in vendor/composer/autoload_namespaces.php file.

Can somebody tell me what I'm doing wrong?

Here is the composer.json in my module

{
"name": "easyask/module-search",
"description": "A better search module from EasyAsk",
"require": {
    "php": "~5.5.0|~5.6.0",
    "magento/module-store": "1.0.0-beta",
    "magento/module-catalog": "1.0.0-beta",
    "magento/module-catalog-search": "1.0.0-beta",
    "magento/module-backend": "1.0.0-beta",
    "magento/module-theme": "1.0.0-beta",
    "magento/framework": "1.0.0-beta",
"easyask/easyask_search": "2.0.0",
    "magento/magento-composer-installer": "*"
},
"type": "magento2-module",
"version": "1.0.0-beta",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"extra": {
    "map": [
        [
            "*",
            "EasyAsk/Search"
        ]
    ]
}

}

Here is the composer.json from vendor/easyask/easyask_search directory

{
"name": "easyask/easyask_search",
"type": "magento2-library",
"description": "EasyAsk Search PHP Client Library",
"license": "N/A",
"authors": [
    {
        "name": "EasyAsk",
        "homepage": "http://www.easyask.com"
    }
],
"require": {
    "php": ">=5.2.1",
    "ext-curl": "*",
    "ext-dom": "*",
    "ext-hash": "*",
    "ext-openssl": "*",
    "ext-simplexml": "*",
    "ext-xmlwriter": "*"
},
"require-dev": {
    "phpunit/phpunit": "3.7.*"
},
"autoload": {
    "psr-0": {
        "EasyAsk": "lib"
    }
}

}

Part of controller class where I'm trying to inject RemoteFactory

use Magento\Framework\Event\Manager;
use EasyAsk\Impl\RemoteFactory;

class Index extends \Magento\CatalogSearch\Controller\Result\Index
{
    /**
     * @var QueryFactory
     */
    private $_queryFactory;

    /**
     * Catalog Layer Resolver
     *
     * @var Resolver
     */
    private $layerResolver;

    protected $scopeConfig;

    protected $_eventManager;

    protected $_remoteFactory;

     /**
     * @param Context $context
     * @param Session $catalogSession
     * @param StoreManagerInterface $storeManager
     * @param QueryFactory $queryFactory
     * @param Resolver $layerResolver
     * @param ScopeConfigInterface $scopeConfig
     */
    public function __construct(
        Context $context,
        Session $catalogSession,
        StoreManagerInterface $storeManager,
        QueryFactory $queryFactory,
        Resolver $layerResolver,
        ScopeConfigInterface $scopeConfig,
        Manager $eventManager,
        RemoteFactory $remoteFactory
    ) {
        parent::__construct($context, $catalogSession, $storeManager, $queryFactory, $layerResolver);
        $this->_storeManager = $storeManager;
        $this->_catalogSession = $catalogSession;
        $this->_queryFactory = $queryFactory;
        $this->layerResolver = $layerResolver;
        $this->scopeConfig = $scopeConfig;
        $this->_eventManager = $eventManager;
        $this->_remoteFactory = $remoteFactory;
    }

Let me know if you need any more information.


texts:
On the shipping step in checkout I want to add a class to a form field if the validation of that field is successful but i'm not sure in what JS file I need to add this or where I should add a custom JS file. Can anyone point me in the right direction.

I'm trying to do something like this:


texts: How to merge different magento installed websites to one installation as multiple store

texts:
I have 4 different magento websites domain1.com, domain2.com, domain3.com, domain4.com with different installation having different themes, catlog , etc.
Now need to merge all 4 installations with having same theme, catalog, CMS pages/block they have to one installation to domain1.com as a multiple stores with multi domain
What is the best way to do that?
Thanks in advance for help


texts:
Magento has released a SUPEE-11295 patch.

Description of vulnerabilities here:
https://helpx.adobe.com/security/products/magento/apsb20-02.html

Can be downloaded here: https://magento.com/tech-resources/download

Please share any issue that you have found with this patch!


texts: Issue in PostNord Delivery Checkout Magento 2

texts:
I am using PostNord Delivery Checkout module downloaded from https://marketplace.magento.com/vconnect-module-allinone.html.

I have configured all required settings in backend and i can see Postnord in Shipping methods list in checkout page working properly. but i cannot find anyway to see tracking information as they have shown in below image

I have already contacted support of this module but there is no answer yet so just looking for somebody who have used this module and can help me out in this!


texts: Special price products custom page magento2

texts:
How can I show products with special price (or discounted products) in a separate page in Magento 2 ?

Thanks.!


texts: How to get the ordered size of a product In Magento 2

texts:
I tried to get the size of a product/products that was ordered.

So let's say a product has 5 sizes: S, M, L, XL,XLL and when i made the order the product x was bought with the size M.

When i load the order i want to get this "M" size in my code.

This is how i load my order:

$order = $_objectManager->create('Magento\Sales\Model\Order')->load($orderID);

 foreach ($order->getAllItems() as $item) {
      $product = $_objectManager->create('Magento\Catalog\Model\Product')->load($item->getProductId());
... here i want to get the size
}

Does anyone know how to do that? because i didn't find nothing relevant.

Thank you!


texts: How to change paypal payment text from order confirmation in magento 1.9

texts:
I need to paypal payment text from order confirmation mail.
How can I change text ?
Please help me.
see here


texts: Magento 2 Discount sales_quote_collect_totals_after

texts:
How to use this observer ?

sales_quote_collect_totals_after

to make a discount of $10 in the checkout page


texts: Get attribute value/id from attribute text/label

texts:
I've a requirement to show attribute labels in URL to filter products. I'm able to generate Url with attribute labels. Now all I've to do is convert attribute label to attribute id/value (ex: 1,2), so that code behind the scene works as it is (based on attribute value/id).

Within apply() function of app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php I'm getting attribute label in $filter = $request->getParam($this->_requestVar); (ex: Blue).

How I can convert this attribute label to attribute id (say for green it's 2), so that I can pass it to  $this->_getResource()->applyFilterToCollection($this, $filter); and backend functionality will work as it is?
I've tried $filter->getId(), $filter->getValue() but it doesn't work.

Is it possible to get attribute value/id from attribute label?


texts:
I am using it in my code to get the cookie in a simple PHP way. But need to get in Magento 2 standard format.

Here is my code:

if(isset($_COOKIE['getCookie'])){
     .................
}

How to get in Magento standard format?

Thanks


texts:
I want to avoid having the same category several times. I'll start with an example to make things easier to explain. Let's take a store that sells, for example, sports goods (e.g. www.sportsshoes.com). You have a gender based root category (or two - mens/womens), but you also have gender as a subcategory of "running" or "shoes", etc. You also need to have a gender attribute, in case the user comes from a different category entirely (like choosing a brand), but still wants to filter by gender.
In the end you have one root category, one attribute and a couple of subcategories all for gender. Of course, it's the same for the other root categories. You end up with 80-90 different categories/attributes for what are essentially different combinations of 9-10 actual categories.
This solves the problem, but leads to a lot of duplicate content, which means:

more work to create and maintain the catalog
easier to make mistakes like listing a product in some, but not all of the correct categories

Note: While my background is web development, I'm fairly new to e-commerce in particular, so let me know if I'm making the wrong assumptions here or if my explanation is not clear.


texts:
It cant find any information about this, but when I share my products on Facebook, my picture is not the correct one. How can I "force" it to take the product image?

I want it to use the picture of the product.

Here is a product http://www.ifp.dk/lederkonferencen-2016-ledelse-pa-topniveau.html

Hope you can help me!


texts:
I have custom attributes, such as "Carats" - these are whole numbers, I want to avoid storing the data as a text field like "14 Cts" or "14 Ct" due to the ease of the data becoming de-normalized over time.

Ideally I would like them to be stored as number columns, but how can I add "Cts" to the displaying of these columns everywhere on the frontend with ease?


texts: Site moved between servers, url now has /default in them

texts:
The magento site been moved with all files from Server A to Server B, everything working fine until we noticed a small change with the URLs.

Before the move the url would be domain.com/category-a

After the move the url is now domain.com/default/category-a

Checking the URL rewrites, Base URL and the nginx conf file I see now sign of were the default is coming from.


texts:
For now, I'm not able to find any guide for this. If I need to get all collection say for Example all Orders List

so I will go to Vendor Magento Folder, Particular Module's di.xml file & checking one by one for the valid path, which can give me a result.

$objectManagerOrder = \Magento\Framework\App\ObjectManager::getInstance();
$orderCollection = $objectManagerOrder->create('Magento\Sales\Model\ResourceModel\Order\Grid\Collection');
$orderCollection->load();
//echo $orderCollection->printlogquery(true);

foreach ($orderCollection as $orders) {
    echo "<pre>";
    echo $orders->getId();
}

So above will Print All Orders. What i need is Orders with their All Items, Shipping & Billing Info of ordered Customers, Customer Detail, Payment Method, Shipping Method. If i need to check for Order Customer then may be i need to use Magento\Sales\Model\ResourceModel\Order\Customer\Collection

So do we have any kind of list of all if go by Admin's List Sales, Products, Customers, Marketing, Content, Reports, Stores. Main Menu & All Sub Menus.

It will help if you need this use this path. Or any other method to bring all things.

It's gonna really helpful for development.


texts:
I am unable to see paging on my category view products.
By default 12 products show and when I add a query string ?p=2 then other page products show.
Here is my setting inside admin panel

I have checked the file.
app/design/frontend/vendor/theme/Magento_Catalog/templates/product/list.phtml
these two methods also exist responsible to print paging
<?= $block->getToolbarHtml() ?>
<?= $block->getAdditionalHtml() ?>


texts: Tried everything to get index.php out of the URL and everything returns Not Found error

texts:
Things I've confirmed:

Site is on Ubuntu 13.10 server at /var/www/mysite.com/htdocs/

Uncommented: /var/www/mysite.com/htdocs/.htaccess

RewriteBase /
Catalog URL Key = phones
Desired URL for this category = http://mysite.com/phones.html
Added the following in /etc/apache2/sites-enabled/000-default.conf:

<VirtualHost *:80>
...
<Directory /var/www/>
    AllowOverride All
</Directory>
</VirtualHost>
Restarted apache
Cleared Magento Cache
Cleared Magento Indexing
System -> Configuration -> Web -> Use Web Server Rewrites = Yes
System -> Configuration -> Web -> Secure -> Use Secure URLs in Frontend = Yes

Tried adding the AllowOverride All directory code to /etc/apache2/sites-enabled/mysite.com.conf as well and the result is the same. I've tried <Directory /var/www/mysite.com/htdocs/> and <Directory /var/www/mysite.com/> along with the version I put above. No dice.

The only thing the options above does is remove index.php from the links paths and breaks all the links. Trying to use url http://mysite.com/index.php/phones.html still works, but has been removed from all links.


texts: Get the next order increment id during checkout?

texts:
I am developing a custom payment gateway. It uses OrderIncrementID to identify which Order was the payment made for. I have every functionality running after the Order has been placed, i.e. after checkout, except one in the checkout page itself.

In the checkout page, Order was not created, getting an OrderIncrementID seems very difficult. We have to overwrite the order creation in the checkout such that it will be created after the payment method selection which sounds very complicated and dangerous to overwrite the flow. An alternative is to use QuoteID, but the tradeoff is that I have to implement a convertion from QuoteID to OrderIncrementID.

What can I do in this case to get an OrderIncrementID in the checkout page? especially after the payment method selection

Update

Thanks for @AmitBera answer, I will now emphasis that consistency and integrity on overlapping request is very important in this payment system. User A load the checkout page first, followed by user B. But User B complete the checkout first, followed by User A. The correct payment for correct users should be made.


texts:
I need help!!!

I am creating a module that integrates with another platform via API. I already got the Observer or Event for customer registration (customer_register_success), purchase completed (checkout_onepage_controller_success_action).

The help I need is how I can get the Observer to abandoned carts?, or what would be the best method to obtain that information and send it via API.


texts: After Migration the Web server getting Fatal error Interface 'Monolog\ResettableInterface' not found

texts:
After Migration the Web server, I am getting this error

PHP Fatal error:  Interface 'Monolog\ResettableInterface' not found in /var/www/html/vendor/monolog/monolog/src/Monolog/Logger.php on line 28

when running the following command

php bin/magento s:up


texts: pure magento - can not log in and register on localhost

texts:
I moved my online store and full database to localhost, everything works fine but I can not log in and set up a new account.

So I installed a second, clean magento. Unfortunately, the problem is still the same even on pure magento. What to do ?

When I try log in, the page only refreshes and does not go to the account panel.


texts: How does Magento 2 sku generated automatically?

texts:
I want to know how does Magento 2 sku generated automaticlly.

I wonder when I type product name while creating new product in admin then its sku is automatically typed in sku field.

I researched much and found that there is a functionality called "Modifier" in Magento 2 in which product edit section can be added/edited with some extra features.

Also found that there are two methods in modifier class, "modifyMeta" & "modifyData" that can be used to add/edit product edit fields.

But I am totally dumb that how sku is generated automatically and which file I will have to override to make sku in our own way.

Right now sku is generated based on product name but I want to make it something like somedigits+autogenerated_sku eg: 00000testsku.

Is there anyone who can hints at it and give some light on it?


texts: How to debug error "Unable to get content for ..."?

texts:
How to find error in this file? I can't find error and fix it.
I has moved to production mode and merge all js/css file.


texts:
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

checking file app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php
checking file app/locale/en_US/Mage_Usa.csv
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored


texts:
My product pages show 404 page. There is something wrong with the catalog URL rewrites. Screenshot below. The error message I see is Invalid backend model specified: enterprise_catalog/product_attribute_backend_urlkey

  Error in system.log:

ERR (3): Warning: include(): Failed opening 'Mage/Enterprise/Catalog/Model/Product/Attribute/Backend/Urlkey.php'

  for inclusion
  (include_path='/home/theking1/public_html/si/app/code/local:/home/theking1/public_html/si/app/code/community:/home/theking1/public_html/si/app/code/core:/home/theking1/public_html/si/lib:.:/usr/lib/php:/usr/local/lib/php:/usr/local/php54/lib/php')
  in /home/theking1/public_html/si/lib/Varien/Autoload.php on line 94

  Error in exception.log:

  exception 'Mage_Eav_Exception' with message 'Invalid backend model
  specified: enterprise_catalog/product_attribute_backend_urlkey' in
  /home/theking1/public_html/si/app/Mage.php:580

  Description Image


texts: Magento 1.9 - How to Stop my checkout page from asking for card details?

texts:
My website is based on Magento 1.9.3 and Im using the IWD one page checkout extension for a 1 page checkout.

Normal Order Flow:

Enter customer details
Select online payment or cash
If online payment is selected, a line appears below it saying you'll
be directed the payment gateway to complete the payment.
Click place order now button and get directed to gateway, etc.

Error happening now:

Enter customer details
If online payment is selected, text fields are appearing below the payment options buttons asking for card details. These are totally useless and any data entered here is lost after clicking place order now.
After clicking place order, you do get redirected to the payment gateway though.

We havent configured this module and just want the customer to be directed to the payment gateway instead of asking for any card details on the page.

Screenshot below.

Please suggest any good way to get this sorted. Sorry if this is a layman question but Ive googled it and cant find a good solution.


texts: Magento 1 Updated with php 7.2 does not show products in beckend

texts:
I updated magento 1 to the latest version 1.9.3.10 and then set the php on the server to version 7.2, I also tested version 7.1, and find that with these versions of php the list of products in the backend is not visible.

I add an image.

How can I solve this problem?

Thank you


texts:
I have created a attribute called »size«, it is of type Dropdown and my client would like to insert Fractions (1/3, 2/3 and so on) as values.

I have tried to insert the values using basic html syntax like this:

1&frasl;10

With the result that the size displayed correctly in the backend, but does not appear in the frontend.

So I am searching for a way to make the client enter the fractions in an easy manner and would prefer a solution where he has to write something shorter, like:

${1/3}

what I could process before it is send to the browser.

Any Ideas how this could be done, or where I could preprocess the attribute?

Thanks in ahead!


texts: Magento Enterprise Catalog Price Rules (rule based on custom attribute)

texts:
We would like to give a discount on a product in the cart, IF the customer has exceeded a specific quantity of that product in the cart.  The complex part is, the specific quantity is custom per product - and set in a custom attribute.

Example:

widget custom field for sale-threshold is 5 units
If a customer has 4 widgets in cart, no discount is given
If the customer has 5 or more in the cart, then they get a discount configured in the rule

(I tried using the code for the custom attribute in the rule itself "if quantity in cart equals or is greater than sale_threshold" - but that didn't work)

Is this possible?


texts: Magento's default USPS module only serving up real-time data half the time during checkout

texts:
I'm pulling the little hair I have left out!

On my server (CentOS 6) I have the default installation of Magento CE 1.8.1 and everything functions fine except for the USPS real-time shipping quotes in checkout.  Half the time they appear and the other half the time there's nothing.  I have debugging enabled and the times it doesn't return anything it's making the exact same request, but the response is NULL.  I've even traced it all the way down into the code of Usps.php where the Zend_Http_Client is making the call.  I simply cannot figure out why it's only USPS.  Others, like UPS, grab the real-time quotes every time--but not USPS.

At first I thought it was my USPS account and I've tried three others since.  It makes no difference.  Now I'm starting to think it's something with my server but I have no idea what it could be.  There aren't any scripting errors or timeouts but maybe my nginx and php-fpm don't like the Zend_Http_Client?

I'm completely stumped.  Any ideas or suggestions I could try to narrow it down further?


texts:
Why SKU field in product table

(catalog_product_entity.sku - VARCHAR(64))

does not have UNIQUE index (just simple INDEX for searching) and uniqueness is provided by PHP code? Postfix "-1" is added to the SKU when I update data for existing products and type duplicate values.

001San
001San-1
001San-1-1

OK, naming rule does not work good but why does the table structure contain simple INDEX instead of UNIQUE INDEX?

CREATE TABLE catalog_product_entity (
  entity_id int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  ...
  sku varchar(64) NOT NULL COMMENT 'SKU',
  ...
  PRIMARY KEY (entity_id),
  ...
  UNIQUE INDEX CATALOG_PRODUCT_ENTITY_SKU (sku),
  ...
)


texts:
I need to show a message such as "call us" for certain products.

I cannot find any extension that works nicely with grouped products (which I use) - so making my own hack seems to be the only solution.

I saw this thread: Hiding Price if 0

and using that, we get the code:

<?php if ($_product->getFinalPrice() == 0) : ?>

Call  To Order

<?php else: ?>
    <?php echo $this->getPriceHtml($_product); ?>
<?php endif; ?>

But maybe I don't put it in correctly, but it shows the call to order message for me + prices for all items in the list. Here is my code:

                <?php if ($this->getCanShowProductPrice($_item)): ?>
                <?php echo $this->getPriceHtml($_item, true) ?>

                <?php //new hide price function ?>
                <?php if ($_product->getFinalPrice() == 0) : ?>

Call  To Order

                <?php else: ?>
                <?php echo $this->getPriceHtml($_product); ?>
                <?php endif; ?>
                <?php //end of new hide price function ?>

                <?php echo $this->getTierPriceHtml($_item) ?>
                <?php endif; ?>

Any tips on how to get that working? Thanks!


texts: Magento 1: model rewrite vs event dispatching, best strategy?

texts:
I'm working on a module where I need to modify the behavior of the getTracking() method in a shipping method carrier model. For example let's take this default one:  Mage_Usa_Model_Shipping_Carrier_Dhl

My requirement is to modify the tracking result returned by this method.

I have two solutions in mind but I'm not sure if one is better or the other (or maybe there's a 3rd solution even better )

Solution 1: classic rewrite

Rewrite the model and the method and add my custom modification before the return statement.

The code would look like this:

public function getTracking()
{
    $result = parent::getTracking();
    // My modifications here
    return $result;
}

Solution 2: rewrite and event dispatched

Rewrite the model and the method. Get the original result with parent::getTracking, dispatch a custom event and return the result. Use an observer to modify the results.

The code would look like this:

public function getTracking()
{
    $result = parent::getTracking();
    Mage::dispatchEvent('my_custom_event', array('result' => $result));
    return $result;
}

To me, the second solution is better but I don't feel good using rewrites.

So my questions are:

Which one of those solutions is the best ?
Is there a dynamic event I'm not aware of I could observe instead of doing all this ?
Any other suggestions ?


texts:
We are trying to upgrade Magento version to the latest release of Magento 2, We are getting composer errors kindly refer screenshot https://prnt.sc/tfj1o6 Kindly help me to fix it,
We have followed below post as well,
https://github.com/magento/magento2/issues/27013
Thanks in advance,


texts:
I am using Magento 2.2.5 to create a custom EAV model.

I managed to create the form in the admin panel using UI components, based on the catalog product implementation. However, I have seen that the UI components do not support "datetime" as input type, therefore I set "date" to all my attributes.

The problems is: How can I set the date picker to include time values too (hours and minutes)?
Instead of this

I want this


texts: Remove the image slider in product detail page

texts:
I want to to remove the slider in images

What I want it to be like :


texts: Set Use Default Value for all categories attributes Magento 2

texts:
I have around 1260 categories.If i switch the store view , the all attributes have own value.But i want to set the all attribute values as parent main store view value.
I can not open each category and checked the Use Default Value checkbox.
So can you give me any hint how can i checked this checkbox using programmatically or sql Query.

Please see this screenshot.!


texts: Disable cache of static block Magento 1.9

texts:
How can I disable a widget or static block from being cached inside the Blocks HTML output cache?

The widget loads a specific static block on all CMS pages.
Inside the static block, I load a template by using:

{{block type="core/template" template="/page/navigation.phtml" cache_lifetime=0}}

But, The template is still being cached. When I disable the Blocks HTML output cache, it works fine.

I also tried to load the static block from my local.xml file, with the following. But, the block is still being cached:

<cms_page>
    <reference name="left">
        <action method="unsetData"><key>cache_lifetime</key></action>
        <action method="unsetData"><key>cache_tags</key></action>
        <block type="cms/block" name="service_navigatie">
            <action method="setBlockId">
                <block_id>service_navigatie</block_id>
            </action>
        </block>
    </reference>
</cms_page>


texts:
I can't see URL rewrite index in Magento 2. Can anybody let me know from where URL rewrites can be indexed manually?

Updates

After looking at the code of module "module-catalog-URL-rewrite" and KAndy's comment, it seems that "Magento 2 URL rewrite module does not use Indexer to create rewrites. The rewrite is generated in the process of save/import of product/categories/cms pages".

But I have turned ON setting 'Use Categories Path for Product URLs' and product URL were not generated using category paths. Now URL on front end of my store is like http://local.magento2.com/index.php/catalog/product/view/id/1545/category/21/

So I am just curious to know how can I generate product Url's using category paths.


texts:
I have created an A record to point my domain name to my google compute engine static IP.

I have also updated my core_config_data table with my domain name, but when trying to browse to the domain name, it redirects to the IP address instead.

I disabled cache and have cleared it several times.

I can't figure out what I'm missing. I have reviewed the documentation for the app engine and it does not appear to apply to compute engine. Any help?


texts: order conformation mail not comming in magento , while newsleter - register mail come

texts:
Order confirmation email not coming to a customer in Magento.
But newsletter - register email arrive to the customer.
So what exactly have a problem ?


texts: Magento 2 Configurable product still show even all it's simple product are out of stock

texts:
We are experiencing a weird issue with our Magento 2 website, that the configurable product is still showing on the front-end even all it's simple products related are out of stock. And we have in Stores->Configuration->Catalog->Inventory->Display Out Of stock, set to NO.

Is there anything we have missed in the configuration?


texts: how to remove zipcode text box from magento checkout page

texts: As per the title, you can realize that its a very old and repetitive question, but actually I could not find a solid answer !!.how to remove zipcode from checkout page


texts: Configurable products price text not showing

texts:
Running: Magento 1.9.1.0 Community

Not sure if this is a common problem I just don't know the answer to or not, In my prices.phtml (template/catalog/product/price.phtml) has the word "RRP" and "Price" next to the original price and the special price set in magento admin panel. This works fine until it comes to a simple configurable product which then makes the text before the prices vanish (Shows up for a brief second then loads and removes the text RRP and Price).

Here is my prices.phtml from RWD:
http://pastebin.com/M7zivZmy

Top example is a simple product, bottom is simple configurable:

Does Magento pull the prices for configurable products from a different template? Or would there be a reason its removing the text on load?

Thanks for any help!


texts:
I am trying to Overwrite some function from Magento_Swatches/js/SwatchRenderer.js file

My code is for requirejs-config.js:

var config = {
    config: {
        mixins: {
            'Magento_Swatches/js/SwatchRenderer': {
                'Magento_Swatches/js/SwatchRendererCategory1': true
            }
        }
    }
};

And code for file SwatchRendererCategory1.js

define(function () {
'use strict';

var mixin = {
        updateBaseImage: function (images, context, isProductViewExist) {
            var justAnImage = images[0];

            if (isProductViewExist) {
                context
                    .find('[data-gallery-role=gallery-placeholder]')
                    .data('gallery')
                    .updateData(images);
            } else if (justAnImage && justAnImage.img) {
                context.find('.image-block').css("background-image", "url('"+justAnImage.img+"')");
            }
        }
};

return function (target) {
    return target.extend(mixin);
};});

What I should use for target in this case?
Thank you.


texts: Magento 2 how to set proper file and folder permission in localhost ubuntu 18?

texts:
i'm

using
magento 2 in local setup in ubuntu 18

when every time i run cmds

php bin/magento s:s:d -f
php bin/magento s:up
php bin/magento s:d:c

the file permission changed
how to give proper file permission in ubuntu local setup

i already give permission with

sudo chmod -R 777 /var/wwww/html/myproject/
sudo chmod -R 777 /var/www/html/myproject/pub/

any ideas??


texts: Magento 2 products in cart from other session

texts:
Strange behavior in Magento 2.2.8! When I leave the page for a few minutes and then do a refresh, products from other user sessions are in my cart! 20 minutes refreshing and there are 17 products in my cart and I didn't do anything. I do not use SID in the URL.

Update:
Disabling full page cache didn't work, added my env.php. The problem occurs on 2 sites, one in magento 2.2.8 and one in 2.3.1. Configuration is Nginx - Apache - Redis - php 7.1

Also, it didn't matter what kind of session caching I use (database, files or Redis)

'resource' => [
    'default_setup' => [
        'connection' => 'default'
    ]
],
'x-frame-options' => 'SAMEORIGIN',
'MAGE_MODE' => 'production',
'session' => [
    'save' => 'redis',
    'redis' => [
        'host' => '127.0.0.1',
        'port' => '6379',
        'password' => '',
        'timeout' => '2.5',
        'persistent_identifier' => '',
        'database' => '2',
        'compression_threshold' => '2048',
        'compression_library' => 'gzip',
        'log_level' => '3',
        'max_concurrency' => '6',
        'break_after_frontend' => '5',
        'break_after_adminhtml' => '30',
        'first_lifetime' => '600',
        'bot_first_lifetime' => '60',
        'bot_lifetime' => '7200',
        'disable_locking' => '0',
        'min_lifetime' => '60',
        'max_lifetime' => '2592000'
    ]
],
'cache_types' => [
    'config' => 1,
    'layout' => 1,
    'block_html' => 1,
    'collections' => 1,
    'reflection' => 1,
    'db_ddl' => 1,
    'eav' => 1,
    'customer_notification' => 1,
    'config_integration' => 1,
    'config_integration_api' => 1,
    'full_page' => 0,
    'translate' => 1,
    'config_webservice' => 1,
    'compiled_config' => 1,
    'vertex' => 1
],
'install' => [
    'date' => 'Thu, 17 May 2018 11:30:44 +0000'
],
'cache' => [
    'frontend' => [
        'default' => [
            'backend' => 'Cm_Cache_Backend_Redis',
            'backend_options' => [
                'server' => '127.0.0.1',
                'database' => '0',
                'port' => '6379'
            ]
        ],
        'page_cache' => [
            'backend' => 'Cm_Cache_Backend_Redis',
            'backend_options' => [
                'server' => '127.0.0.1',
                'port' => '6379',
                'database' => '1',
                'compress_data' => '0'
            ]
        ]
    ]
]
];


texts: How do i add some html code after an element in the homepage?

texts:
What i want to achieve is that I have some html code in the cms/homepage/design, which I want to insert after a certain element in the homepage.
This is the xml code:

<cms_index_index translate="label">
        <reference name="content">
            <block type="sama_productblocks/list" name="sama_productblocks_newproducts" after="call_to_actions" template="sama_productblocks/list.phtml">
                <action method="setIdentifier"><id>homepage-latest</id></action>
            </block>

            <block type="core/template" name="top_banners" before="-" template="homepage/topbanners.phtml">
                <block type="experius_linkmanager/link_list" name="homepage_banner">
                    <action method="setIdentifier"><key>hoesjesoutlet-homepage_banner</key></action>
                </block>
                <block type="experius_linkmanager/link_list" name="homepage_small">
                    <action method="setIdentifier"><key>hoesjesoutlet-homepage_small</key></action>
                </block>
            </block>
            <block type="core/template" name="cta_banners" after="modelfilter_search" template="homepage/cta.phtml">
                <block type="experius_linkmanager/link_list" name="homepage_cta">
                    <action method="setIdentifier"><key>hoesjesoutlet-homepage_cta</key></action>
                </block>
            </block>
            <block type="core/template" name="home_text" after="modelfilter_search" template="homepage/text.phtml">
                <!-- Here should I call the html code -->
            </block>
        </reference>
    </cms_index_index>

and the content of the text.phtml should be the html code from the design tab. Well I do not want to remove it from design and put it all of the html code. Is there a function or method  to call the content of design from the homepage ?
This is the content of the template/homepage/text.phtml

<div class="cta_row">
    <?php // echo $this->getChildHtml('homepage_text');
    // here i want to put the html code from the design tab from homepage
    ?>
</div>


texts: Magento 2 Product save event with Rest API

texts:
We are using rest API for fetching product of Magento 2 website to our software. This is working fine.

We have connected our software and Magento website with website URL and rest API key of Magento user.

Is there any way to call our software add product page when any product gets added to Magento? Is there any event which will work in rest API, like product save after?

We want to add Magento website product to our software at the same time when the new product gets added to Magento.

Thank you.


texts: When I select year in dropdown list the years are getting repeated after selecting why?

texts:
I had created the date of birth field with a drop down list after selecting the year drop down the years are getting repeated

I am attaching my code and image file.

Can u please suggest me.


texts: How to update qty minicart by ajax without clicking "Update" button

texts:
I'm trying to make shopping cart get updated automatically when a customer/user changes the qty of an item in the minicart without having to click the "update" button.
I was thinking of this solution.
vendor/magento/Module_Checkout/view/frontend/web/js/sidebar.js:
/**
         * @param {jQuery.Event} event
         */
        events['change ' + this.options.item.qty] = function (event) {
            self._showItemButton($(event.target));
        };

        /**
         * @param {jQuery.Event} event
         */
        events['click ' + this.options.item.button] = function (event) {
            event.stopPropagation();
            self._updateItemQty($(event.currentTarget));
        };

Edit it to
/**
         * @param {jQuery.Event} event
         */
        events['change ' + this.options.item.qty] = function (event) {
            event.stopPropagation();
            self._updateItemQty($(event.currentTarget));
        };

Would this solution work?
Edit: I copy sidebar.js from vendor folder to app/design/frontend/Learning/default/Magento_checkout/web/js/sidebar.js and made code change to it.
But my changes are not being reflected in the browser. Help or suggestions would be appreciated.
Thank you


texts: calling cms static block on product detail page

texts:
I want to call my cms static block on product detail page above price ,

I have added  the below code via admin category > custom design .

{{block type="cms/block" block_id="my_block_here"}}

Can anyone help me ,Where i goes to wrong.


texts: How to Filter Order History on Customer Account?

texts:
I have added a Column on Order Table is_hidden, If an Order is set is_hidden = 1 then I want to hide that order from Customer Order List in Customer Account on Frontend.

How can I add aditional filter on the Order Collection without updating Core File.


texts: How to disable showing uncought exceptions in developer mode?

texts:
I switched to developer mode and I see nothing but uncought exceptions log instead of storefront. Something like this:

Can I disable it somehow? To show my storefront in developer mode?

I have already commented out

    #ini_set('display_errors', 1);

in app/bootstrap.php

and renamed local.xml to local.xml.sample
in pub/errors.


texts: Magento 1.9.2.0 Password Reset Page is blank

texts:
I have an issue with a Magento installation which is causing the Password Reset page (the page immediately following the form POST on the Forgot Password page) is the White Screen of Death. The issue is an old one (several years), as this is based on the files and DB dump of an existing site, and the Password Reset page is broken there, too.

Searching Stack Overflow and Google suggests that the most common cause of this behaviour is an upgrade to 1.6 some time in the past when the customer.xml file was extended. Following the advice in that and many other threads, I checked my customer.xml file and the required configuration is there (I diff'd it with the customer.xml file from a fresh Magento download to be sure).

I'm at a loss as to how to proceed. The Apache error log shows the following (URL is redacted):

  PHP Fatal error:  Call to a member function getBackend() on a non-object in /var/www/html/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 1548, referer: https://dev.example.com/customer/account/forgotpassword/

Would anyone have any guidance on how to proceed from here?

Thanks,


texts:
I exported product csv, then added prices and tried to re-import them. This is giving me an error. Per someone's suggestion I deleted the products in admin and now I can't add them back.

Here is error message:
Following Error(s) has been occurred during importing process:
Only the first 100 errors are shown. Download full report
1. Invalid option value for attribute "design" in row(s): 654, 656
2. Attribute with code "000" is not super in row(s): 654, 656
3. Please make sure attribute "name" is not empty. in row(s): 655
4. This name is already being used for custom option. Please enter a different name. in row(s): 654, 655

Also, trying to import unaltered export file shows the same errors.


texts:
I'm uploading images labels using a CSV file contains the following columns (store,sku,image_label,small_image_label,thumbnail_label) and that's worked perfectly.

The problem is when i have a product contains many images,Only the main image label is changed.But the rest of images labels is not changed.Is there anything i must change in the CSV file to apply labels to all products images?

Thanks


texts: I'm looking through index.php in the root directory of Magento and there is a Constant name BP which is defined in app/autoload.php. I can't see how index.php can see this Constant as there is no link between index.php or app/autoload.php?


texts: Magento 2.3.2 Autoscaling and User Sessions

texts: We have magento running on AWS Fargate behind a load balancer. It works great when it is not scaled(i.e only one task is running), however when it scales to 2 or more tasks I am not able to login as a customer or administrator and we aren't getting any login errors, it just redirects to itself. I can only login successfully when only one task is running. We're running magento 2.3.2 on AWS Fargate behind a load balancer. Any ideas why this might be happening?


texts: How to add column in sales_order_grid also want to get that attribute from sales_order collection?

texts:
I want to a column in sales_order_grid I successfully did that but I also want to get my custom attribute from sales_order collection because I want to set value on some action, my problem is a can't get that attribute...

Thanks.


texts:
I have a live webshop and imported user from the old webshop. The amount of accounts is around 6500. The was something wrong with the import so everyone has a wrong address in their account. So I made a new import with the correct addresses, but now all the accounts has multiple addresses, the wrong address and the correct address.

Is there a way to remove the wrong addresses from the accounts?

Regards,
Robert


texts: Issue after upgrade from 1.8 to 1.9.4 : Numeric value out of range

texts:
I just upgraded magento from 1.8 to 1.9.4, but I get this error below. I tried to change the type of attribute_id from smallint to bigint but then I get this error "Error on rename of './magento/#sql-65cb_4e6d' to './magento/eav_attribute' (errno: 150)".

Appreciate any help. Thanks.

    a:5:{i:0;s:567:"Error in file: "/home/xxxx/public_html/app/code/core/Mage/Customer/sql/customer_setup/upgrade-1.6.2.0.5-1.6.2.0.6.php" - SQLSTATE[22003]: Numeric value out of range: 167 Out of range value for column 'attribute_id' at row 1, query was: INSERT INTO `eav_attribute` (`entity_type_id`, `attribute_code`, `backend_model`, `backend_type`, `backend_table`, `frontend_model`, `frontend_input`, `frontend_label`, `frontend_class`, `source_model`, `is_required`, `is_user_defined`, `default_value`, `is_unique`, `note`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";i:1;s:994:"#0 /home/xxxxx/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(644): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/xxxxx/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.6.2.0.1', '1.6.2.0.7')
#2 /home/xxxxx/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.6.2.0.1', '1.6.2.0.7')
#3 /home/xxxxxx/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/xxxxx/public_html/app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/xxxxx/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules()
#6 /home/xxxxxx/public_html/app/Mage.php(687): Mage_Core_Model_App->run(Array)
#7 /home/xxxxx/public_html/index.php(83): Mage::run('', 'store')


texts:
After looking at the log files of my Magento site, I noticed that a URL ending .co.uk/no-route was getting a significant number of events.

What is this URL?


texts: magento2 checkout billing address updated but not change in shipping information

texts:
Updated the billing address in magento2 checkout page but not change in shipping information block.
can anyone please help me.


texts: All products get original price zero after payment with paypal express in magento 2.1.9

texts:
When payment method is paypal express, the items of the order get original price zero. All the other values ( subtotal, row tota, item status=invoicedl etc. ) remain correct. With any other payment method the orders are as expected.
Two weeks ago I made magento update from 2.1.8 to 2.1.9. At the same time I had to adjust again paypal express because it was disabled. In period before update the paypal behavior was correct.
Is it problem of paypal or magento 2.1.9 ?

I would appreciate any advice.


texts: Product Reviews is redirecting to shopping cart when i click on "Submit Review Button"

texts:
I am using "rwd" theme in new magento installation, i am facing an issue with product reviews tab in this theme.

When i click on "Be the first to review this product." It opens up a form and which i click on "Submit Review" after filling up the form it redirects me to the shopping cart page and adds that product into cart automatically. Where as it should give a message that "Your review is awaiting for moderation" and after admin approves the review it should get displayed on the product details page.


texts: Migration from 1.9.1.0 to 2.0 ignore few tables

texts:
This is the error I am getting while migrating Magento 1.9.1.0 to Magento 2.0

[2016-01-10 17:16:02][ERROR]: Source documents are missing or not mapped:
xmlconnect_application,
xmlconnect_config_data,
xmlconnect_history,
xmlconnect_images,
xmlconnect_notification_template,
xmlconnect_queue

When I look both the Magento databases I understand that these tables are only exist in 1.9.1.0 but not in 2.0 and thats the reason its throwing error.

How can I exclude or ignore these tables?


texts: Magento 2 : Problem Adding Validation Form With Mixin

texts:
I am trying to add a custom validation form with mixin.

I have created simple module Mageplaza_Helloworld.

In \app\code\Mageplaza\HelloWorld\view\frontend\web\js\requirejs-config.js:

<script type="text/javascript">
var config = {
    config: {
        mixins: {
            'mage/validation': {
                'Mageplaza_HelloWorld/js/validation-mixin': true
            }
        }
    }
}
</script>

And in: \app\code\Mageplaza\HelloWorld\view\frontend\web\js\validation-mixin.js:

<script type="text/javascript">
define([
    'jquery'
], function ($) {
    "use strict";

    return function () {
        $.validator.addMethod(
            'validate-jurgis',
            function (value) {
                $.mage.__('Your validation error message');
                return false;
            },

        );
    }
});
</strict>

Im returing false just to see if it works at all (which it doesnt)
And in vendor\magento\module-checkout\view\frontend\layout\checkout_index_index.xml I assign it like:

<item name="telephone" xsi:type="array">
    <item name="config" xsi:type="array">
        <item name="tooltip" xsi:type="array">
            <item name="description" xsi:type="string" translate="true">For delivery questions.</item>
        </item>
    </item>
    <!-- add a validation code at here -->
    <item name="validation" xsi:type="array">
        <item name="validate-jurgis" xsi:type="string">true</item>
    </item>
    <!-- end of validation -->
</item>

(If I replace validate-jurgis with an existing form, it works)

But it doesnt work. I get no errors and am able to proceed...

Attempt nr. 3

\app\code\Mageplaza\HelloWorld\view\base\web\js\requirejs-config.js

<script type="text/javascript">
var config = {
    config: {
        mixins: {
            'Magento_Ui/view/base/web/js/lib/validation/rules': {
                'Mageplaza_HelloWorld/js/validation-mixin': true
            }
        }
    }
}
</script>

\app\code\Mageplaza\HelloWorld\view\base\web\js\validation-mixin.js

<script type="text/javascript">
define([
    'mage/translate'
], function ($t) {
    'use strict';

    return function (rules) {
        rules['validate-jurgis'] = {
            handler: function () {
                return false;
            },
            message: $t('My message')
        };

        return rules;
    };
});
</script>

vendor\magento\module-checkout\view\frontend\layout\checkout_index_index.xml

<item name="validation" xsi:type="array">
<item name="validate-jurgis" xsi:type="string">true</item>
</item>


texts: Getting Error messages when trying to delete CC numbers via phpMyAdmin

texts:
Magento 1.9.1
Porto theme

I am now trying to delete stored credit card numbers from our database using phpMyAdmin as per my question here:
How to purge (delete) credit card numbers stored on Magento 1.9.1.0?
I made me a list of SQL commands to run:
UPDATE sales_flat_order_payment SET cc_number_enc=NULL;
UPDATE sales_flat_order_payment SET cc_type=NULL;
UPDATE sales_flat_order_payment SET cc_last4=NULL;
UPDATE sales_flat_order_payment SET cc_owner=NULL;
UPDATE sales_flat_order_payment SET cc_exp_month=NULL;
UPDATE sales_flat_order_payment SET cc_exp_year=NULL;

UPDATE sales_flat_quote_payment SET cc_number_enc=NULL;
UPDATE sales_flat_quote_payment SET cc_type=NULL;
UPDATE sales_flat_quote_payment SET cc_last4=NULL;
UPDATE sales_flat_quote_payment SET cc_owner=NULL;
UPDATE sales_flat_quote_payment SET cc_exp_month=NULL;
UPDATE sales_flat_quote_payment SET cc_exp_year=NULL;

I think I must be doing something wrong...this is how I go about doing this:
There are 2 databases:

mySITE_mySITE
information schema

I highlight either, click on SQL, and enter the following lines (one at a time):
UPDATE sales_flat_order_payment SET cc_number_enc=NULL;
UPDATE sales_flat_order_payment SET cc_type=NULL;
UPDATE sales_flat_order_payment SET cc_last4=NULL;
UPDATE sales_flat_order_payment SET cc_owner=NULL;
UPDATE sales_flat_order_payment SET cc_exp_month=NULL;
UPDATE sales_flat_order_payment SET cc_exp_year=NULL;

UPDATE sales_flat_quote_payment SET cc_number_enc=NULL;
UPDATE sales_flat_quote_payment SET cc_type=NULL;
UPDATE sales_flat_quote_payment SET cc_last4=NULL;
UPDATE sales_flat_quote_payment SET cc_owner=NULL;
UPDATE sales_flat_quote_payment SET cc_exp_month=NULL;
UPDATE sales_flat_quote_payment SET cc_exp_year=NULL;

But then it gives me the following Errors:

Error SQL query: UPDATE sales_flat_order_payment SET
cc_number_enc=NULL MySQL said:
1146 - Table 'mySITE_mySITE.sales_flat_order_payment' doesn't exist
Error SQL query: UPDATE sales_flat_order_payment SET
cc_number_enc=NULL MySQL said:
1109 - Unknown table 'sales_flat_order_payment' in information_schema

What do I need to do to make this work?


texts: Minicart quantity number not update with full page cache in custom theme

texts:
I'm using Magento CE 2.3.4. I used a custom theme for my website. In my top menu template, I tried this code to show my minicart and mini item quantity number:

$counter = $this->helper('\Magento\Checkout\Helper\Cart');
$total = $counter->getSummaryCount();
...

<?php if($total) : ?>
    <?php echo $total; ?>
<?php endif; ?>

It's work fine when I disable full page cache and block html cache, I added product to cart and it update and show quatity correctly. But when I enable full cache, the quantity number in minicart is not updated.

If I go to cache management and flush cache, refresh page, it show correctly. Here is an image about this problem for clearly:

Hope you can give me a solution for this!

Thank you very much!


texts: Checkout Login form Validation Knockout Js Magento 2

texts:
i have created a form on checkout step.The form is allow user to navigate on the next step even if email pattern is not valid. How i can make this validation so user can not move until he enter the correct email patteren.

any help would be appreciated.

Screenshot is attached for more clarification.  http://prntscr.com/ng3swn

email form html :

    <each args="getRegion('login-methods')" render="" />

    <form data-bind="submit: navigateToNextStep" class="form-next-step" novalidate="novalidate">

                <button data-role="opc-continue" type="submit" class="button action continue primary">

                </button>

    </form>

Js code:

define(
[
    'ko',
    'uiComponent',
    'underscore',
    'Magento_Checkout/js/model/step-navigator',
    'Magento_Customer/js/model/customer'
],
function (
    ko,
    Component,
    _,
    stepNavigator,
    customer
) {
    'use strict';
    /**
     * check-login - is the name of the component's .html template
     */
    return Component.extend({
        defaults: {
            template: 'Magento_Checkout/email'
        },

        //add here your logic to display step,
        isVisible: ko.observable(true),
        isLogedIn: customer.isLoggedIn(),
        //step code will be used as step content id in the component template
        stepCode: 'email',
        //step title value
        stepTitle: 'Email',

        /**
         *
         * @returns {*}
         */
        initialize: function () {
            this._super();
            // register your step
            stepNavigator.registerStep(
                this.stepCode,
                //step alias
                null,
                this.stepTitle,
                //observable property with logic when display step or hide step
                this.isVisible,

                _.bind(this.navigate, this),

                /**
                 * sort order value
                 * 'sort order value' < 10: step displays before shipping step;
                 * 10 < 'sort order value' < 20 : step displays between shipping and payment step
                 * 'sort order value' > 20 : step displays after payment step
                 */
                9
            );

            return this;
        },

        /**
         * The navigate() method is responsible for navigation between checkout step
         * during checkout. You can add custom logic, for example some conditions
         * for switching to your custom step
         */
        navigate: function () {

        },

        /**
         * @returns void
         */
        navigateToNextStep: function () {
            stepNavigator.next();
        }
    });
}

);


texts: I just Started working with magento 2, right now I installed and migrated customers and orders. and I’m trying to migrate some extensions data like Amasty ShopBy. I Installed it in my magento 2 after checking and comparing the tables in both databases they look the same . I’m asking what is the best practice to migrate the data to magento 2?


texts: Show Telephone and Company on Registration form in magento1.9 after showing get validation errors?

texts:
I want to show Telephone and Company field on my Registration form, that is already achieved.
For that I just put the fields out from this condition:

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

in register.phtml

  (/app/design/frontend/base/default/template/customer/form/register.phtml).

After this the fields are visible but the issue is, when I submit my form it shows error for other address fields like city, street, zip etc, which is not on my registration form.


texts: how can I change the category and url structure?

texts:
How can I change the magento 2 url structure ?

For categories I would like:

Bike
Bike/Shoes
Bike/Shoes/Mens
etc....

for products I would like the product name i.e

/etnies-cyprus-scw-x-32-shoes-2018.html

Currently Im adding rewrite rules for categories, but I have 1000's

Can this be done programatically or maybe there is already a module I can purchase?

Thanks.


texts: How to automatically execute commands after setup:install?

texts:
I have the source code of a shop in a git repo and I'd like to automate post-installation steps. For example, I'd like to set the theme after setup:install was executed. So whenever I setup a new shop instance on any machine, the theme is already set after the installation.
I guess there are different solutions to do it. But I'm wondering if Magento offers a special facililty, like composer, which has some hooks for different actions (like post-install-command). Is there something like this or what would you recommend?
Of course I could have a script that executes setup:install and afterwards execute anything else. Might be the simplest solutions.


texts: Magento2: Sub-menu is not appearing in admin

texts:
I'm using below code in adminhtml/menu.xml to show menu/sub-menu in admin. I'm able to see menu Lapisbard in admin but sub-menu Store Locations is not visible when I click on menu named Lapisbard.

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Backend/etc/menu.xsd">
    <menu>
        <add id="lapisbard::base" title="Lapisbard" module="Lapisbard_StoreLocator" sortOrder="90" resource="Lapisbard_StoreLocator::storelocator" />
        <add id="lapisbard_storelocator::locations" title="Store Locations" module="Lapisbard_StoreLocator" sortOrder="10" parent="lapisbard::base" action="lapisbard_storelocator/locations/" resource="Lapisbard_StoreLocator::locations"/>
    </menu>
</config>

If I'm adding it in content section using parent="Magento_Backend::content" it's working fine there.

<menu>
    <add id="Lapisbard_StoreLocator::storelocator" title="Lapisbard" module="Lapisbard_StoreLocator" sortOrder="90" parent="Magento_Backend::content" resource="Lapisbard_StoreLocator::storelocator" />
    <add id="Lapisbard_StoreLocator::locations" title="Store Locations" module="Lapisbard_StoreLocator" sortOrder="10" parent="Lapisbard_StoreLocator::storelocator" action="blog/post" resource="Lapisbard_StoreLocator::locations"/>
</menu>


texts: product attribute front end html not rendering properly

texts:
I created front end model for custom product attribute.but

in the front end output coming like this   pencilval instead of pencilval

namespace Some\Pencil\Model\Entity\Attribute\Frontend;

    class Pencil extends \Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend
    {
        /**
         * Retrieve attribute value
         *
         * @param \Magento\Framework\DataObject $object
         * @return mixed
         */
        public function getValue(\Magento\Framework\DataObject $object)
        {
            $data = '';
            $value = parent::getValue($object);
            if ($value) {
                $data = '' . $value . '';
            }
            return $data;
        }
    }


texts:
Hi i want to override magento admin file below are the details.
Name space: Magento\User\Block\Role\Tab;

File name: Info.php

Class name: class Info extends \Magento\Backend\Block\Widget\Form\Generic implements \Magento\Backend\Block\Widget\Tab\TabInterface

i want to override below function
protected function _initForm()

How to achieve this ??


texts: Android and ios app building extension for magento

texts:
I need to create android and iOS app for my magento store. And with some research Ive managed to find a paid app

http://www.magentocommerce.com/magento-connect/simicart-magento-mobile-shopping-app-builder.html

What i need is a separate app developed in my store name which should be available in play store and apple app store for customers to download. Is there any extension in magento to develop an app using php and magento CMS alone?


texts: Switching languages in Magento doesn't show correct language

texts:
When switching between languages on this page:
http://x5-mail.com/
From Dutch to English. Dutch is the base language.
The buttons on top aren't translated.
Anyone familiar with this problem?


texts: Magento 2: Admin Dashboard is not loading after login

texts: I just observed my admin dashboard isn't loading properly after login. i have cleared cache and still isn't loading fine. Screenshots how its loading below. Will appreciate any tips in identifying the issue and resolution


texts: Changing the selected order status in the order comments section

texts:
When commenting on an order, you can also change the order status at the same time.

For some orders, the drop-down does not have the current order status selected by default, so it's easy(due to human error) to accidentally change the order status when you intend to only create a comment.

For example an order in payment_review(state)/payment_review(status) has processing(state)/awaiting_dispatch(status) selected by default, like so:

My thoughts are to either:
A) Change the drop-down so it always has the current status selected by default.
B) Remove the ability to change the status here altogether. We do all our status changing from the order grid so this is acceptable in our case.

I can't find anything on this issue, so I'm hoping for some advice from someone who knows more about this functionality and the best way to go about it.

I've re-trained the staff to be more aware of this field but the issue continues. I'm currently using magento ce 1.9.3.1


texts: Luma-Icons.woff2 => Ensure text remains visible during webfont load

texts:
I'm trying to get rid of this lighthouse warning:
Ensure text remains visible during webfont load
Leverage the font-display CSS feature to ensure text is user-visible while webfonts are loading. Learn more.:
URL
Potential Savings
…fonts/Luma-Icons.woff2
70 ms
Have found some solutions on GG, but none worked.
Anyone knows how to solve this ?
Many thanks.


texts:
This question concerns the grid in: sales->orders->[select an order]->Information.

At the bottom you can see a grid with the orders. I would like to sort them by SKU.

In: /app/code/core/Mage/Sales/Model/Order.php I found:

public function getItemsCollection($filterByTypes = array(), $nonChildrenOnly = false)
{
    if (is_null($this->_items)) {
        $this->_items = Mage::getResourceModel('sales/order_item_collection')
            ->setOrderFilter($this);

        if ($filterByTypes) {
            $this->_items->filterByTypes($filterByTypes);
        }
        if ($nonChildrenOnly) {
            $this->_items->filterByParent();
        }

        if ($this->getId()) {
            foreach ($this->_items as $item) {

                $item->setOrder($this);
            }
        }
    }
    return $this->_items;
}

This creates the order grid, but how do I sort it by SKU?


texts:
I've recently discovered Magepack. It's a really good tool for Magento 2 JS bundling and it gives us a much better Google Pagespeed score than Baler which I'm using.
I was able to install Magepack on a Magento default instance and I'm planning to use it for my clients, but I'm hesitant to do so as I'm not sure if it's stable to be on production yet.
Has anyone been using Magepack on production? Is that worth using it comparing to Baler?
Thanks


texts:
I m trying to understand how plugins works with M2.

I have created a few plugins for some functions.
Such as:
addProduct
setCustomerDataAsLoggedIn
both taken from examples.
These are working.

The one doesn't work is from ShippingInformationManagement.
The function I m trying to catch is saveAddressInformation.

More or less the code is this:
etc/frontend/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\Checkout\Model\ShippingInformationManagement">
        <plugin name="Vendor_WelcomePlugin::before_shipping" type="Vendor\WelcomePlugin\Plugin\ShippingInformationManagementPlugin" sortOrder="1"/>
    </type>
</config>

and the class:

namespace Vendor\WelcomePlugin\Plugin;

use \Magento\Checkout\Api\ShippingInformationManagementInterface;

class ShippingInformationManagementPlugin
{

    public function afterSaveAddressInformation(
        $cartId,
        \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation
    ){

        $address = $addressInformation->getShippingAddress();
        $billingAddress = $addressInformation->getBillingAddress();
        if($billingAddress->getCountryId() != 'US' || $address->getCountryId() != 'US'){
            throw new StateException(__('You can\'t order this book.'));
        }

        return array($cartId, $addressInformation);
    }

}

On the same topic I wasn't able to understand why I couldn't catch setCustomerAsLoggedIn function but I could make it work for setCustomerDataAsLoggedIn. Both are inside the Customer/Model/Session.php class

I have read the limitations of plugins but maybe I don't understand something.
Thanks