texts: Magento 2: Mini cart product count not updating for current session

texts:
I'm using a live chatbox API which is integrated into Magento 2.

The problem is:
When I add a product from the live chat box, the product counter is not getting updated in the Magento's mini cart. (for the current logged in session)

But when I login to the site in different browsers i.e for a new session, then the mini cart product count is getting incremented.

This is happening only with the chatbox API integration, with default Magento, mini cart updates, but not with this chat box  (I'm not using any module for chatbox, it's only API integration)

Need suggestion on how to debug this counter issue in the mini cart in Magento 2?


texts: Retrieve customers' name in a transactional email template

texts:
In the Magento Front End Developer Certification Test Questions, I found an answer that I didn't understand, precisely the 8.1:
"How would you retrieve the customers' name in a transactional email template?"

{{var customer.name}}
{{var customer_name}}
{{customer name}}
{{var getCustomerName()}}

I thought that the correct answer was the first but it was the 2nd.

You can see the 8.1 test question here.
The answers are here.

Can someone explain to me?

Thank you so much.


texts:
I've been pulling my hair out with this... I've looked at probably 20 different tutorials and StackOverflow posts and I can NOT see what is wrong with my code.

I'm trying to override CartController.php

Here is my config file:

<config>
    <modules>
        <OneGiant_CartRedirect>
            <version>1.0.0</version>
        </OneGiant_CartRedirect>
    </modules>
    <frontend>
        <routers>
            <checkout>
                <args>
                    <modules>
                        <OneGiant_CartRedirect before="Mage_Checkout">OneGiant_Checkout</OneGiant_CartRedirect>
                    </modules>
                </args>
            </checkout>
        </routers>
    </frontend>
</config>

Here is my CartController.php

<?php
require_once 'Mage/Checkout/controllers/CartController.php';
class OneGiant_Checkout_CartController extends Mage_Checkout_CartController
{
    protected function _goBack()
    {
        throw new Mage_Exception('Its working!!!!');
        return $this;
    }
}

Here is my OneGiant_CartRedirect.xml

<?xml version="1.0"?>
<config>
    <modules>
        <OneGiant_CartRedirect>
            <active>true</active>
            <codePool>local</codePool>
            <version>1.0.0</version>
        </OneGiant_CartRedirect>
    </modules>
</config>

Here are the file locations:

app/code/local/OneGiant/CartRedirect/etc/config.xml
app/code/local/OneGiant/CartRedirect/controllers/CartController.php
app/etc/modules/OneGiant_CartRedirect.xml

Please any help would be great.  None of the log files are showing any related errors or warnings.


texts:
Magento 2 vault stored cards deleted in frontend but still displaying in admin.

Enabled Brain tree store cards options in admin,
From frontend when placing order check to save cards options and place the order like this I added two cards and deleted one card from the frontend.
But in admin placing the order for the customer, it's displaying two cards.

In vault_payment_token table is_active is 1, is_visible is 0 and customer_id is 237887.
What scenario it is stored like this I didn't understand there are hundreds of records.

Frontend stored cards

================================================================================

Admin place order

================================================================================

Database records

For Customer Orders 11

in vault_payment_token table is_active is 1, is_visible is 1 and customer_id is 237887.

For Guest Orders 10

in vault_payment_token table is_active is 1, is_visible is 0 and customer_id is NULL.

No Values saved like this 00


texts: How to get bestseller in left column layout in Magento 2.2.0?

texts: I want to display bestseller products just below the compare product list. How can I do that?


texts:
I am new to magento 2, i want to calculate the tax based on the custom field value which will present in customer billing address form. if user enters a value in the field the custom calculation should happen else default tax calculation should happen.
Any help please.
Thanks in advance.


texts:
here is a block file:

<?php
class webhive_ManageUrl_Block_Monblock extends Mage_Core_Block_Template
{
 public function methodblock()
 {
     return 'informations about my block !!' ;
 }
}

view file:

<?php
    echo $this->methodblock();
?>

ERROR:

a:5:{i:0;s:64:"Invalid method Mage_Core_Block_Template::methodblock(Array
(
)
)";i:1;s:3006:"#0       C:\wamp\www\majento\app\design\adminhtml\default\default\template\manageurl\afficher.phtm     l(2): Varien_Object->__call('methodblock', Array)
#1 C:\wamp\www\majento\app\design\adminhtml\default\default\template\manageurl\afficher.phtml(2): Mage_Core_Block_Template->methodblock()
#2 C:\wamp\www\majento\app\code\core\Mage\Core\Block\Template.php(241): include('C:\\wamp\\www\\maj...')
#3 C:\wamp\www\majento\app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml\\defau...')
#4 C:\wamp\www\majento\app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView()
#5 C:\wamp\www\majento\app\code\core\Mage\Core\Block\Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#6 C:\wamp\www\majento\app\code\core\Mage\Core\Block\Text\List.php(43): Mage_Core_Block_Abstract->toHtml()
#7 C:\wamp\www\majento\app\code\core\Mage\Core\Block\Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#8 C:\wamp\www\majento\app\code\core\Mage\Core\Block\Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#9 C:\wamp\www\majento\app\code\core\Mage\Core\Block\Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#10 C:\wamp\www\majento\app\design\adminhtml\default\default\template\page.phtml(74): Mage_Core_Block_Abstract->getChildHtml('content')
#11 C:\wamp\www\majento\app\code\core\Mage\Core\Block\Template.php(241): include('C:\\wamp\\www\\maj...')
#12 C:\wamp\www\majento\app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml\\defau...')
#13 C:\wamp\www\majento\app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView()
#14 C:\wamp\www\majento\app\code\core\Mage\Adminhtml\Block\Template.php(81): Mage_Core_Block_Template->_toHtml()
#15 C:\wamp\www\majento\app\code\core\Mage\Core\Block\Abstract.php(919):  Mage_Adminhtml_Block_Template->_toHtml()
#16 C:\wamp\www\majento\app\code\core\Mage\Core\Model\Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#17 C:\wamp\www\majento\app\code\core\Mage\Core\Controller\Varien\Action.php(390): Mage_Core_Model_Layout->getOutput()
#18 C:\wamp\www\majento\app\code\local\webhive\ManageUrl\controllers\Adminhtml\MyformController.php(7): Mage_Core_Controller_Varien_Action->renderLayout()
#19 C:\wamp\www\majento\app\code\core\Mage\Core\Controller\Varien\Action.php(418): webhive_ManageUrl_Adminhtml_MyformController->indexAction()
#20 C:\wamp\www\majento\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#21 C:\wamp\www\majento\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#22 C:\wamp\www\majento\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#23 C:\wamp\www\majento\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#24 C:\wamp\www\majento\index.php(87): Mage::run('', 'store')
#25  {main}";s:3:"url";s:89:"/majento/index.php/manageurl/adminhtml_myform/index/key/ba22d950a33858b1bb8a1e59938a850b/";s:11:"script_name";s:18:"/majento/index.php";s:4:"skin";s:5:"admin";}


texts: Magento 2 custom php library is not working

texts:
I want to add custom php API library under vender folder and I have added following folder and files under vendor folder.

magento2_root>vendor/abc/
magento2_root>vendor/abc/abc_php/
magento2_root>vendor/abc/abc_php/composer.json
magento2_root>vendor/abc/abc_php/lib/
magento2_root>vendor/abc/abc_php/lib/Test.php

  magento2_root>vendor/abc/abc_php/composer.json

{
    "name": "abc/abc_php",
    "type": "library",
    "description": "ABC PHP Client Library",
    "license": "MIT",
    "authors": [
        {
            "name": "Custom Author",
        }
    ],
    "require": {
        "php": ">=5.4.0"
    },
    "autoload": {
        "psr-4": {
            "CustomApi\\": "lib"
        }
    }
}

  magento2_root>vendor/abc/abc_php/lib/Test.php

<?php

namespace CustomApi;

class Test
{
    public function customMethod(){
    return "abc";
    }
}

When I include this in constructor like following

public function __construct(
...
\CustomApi\Test $testApi,
...
){
// do some logic
}

It gives me Class CustomApi\Test does not exist error.

PS : I have recompiled the composer by using composer dumpautoload command. It does not generate autoload script in autoload_psr4.php under vendor/composer folder.

Can any one tell me that what I did wrong ? Any suggestion would be appreciated.

Thanks


texts: Magento 2 - Remove Fotorama Caption from Product View Page

texts:
I need to remove the image label/name from product view pages, or determine why they're showing up. I cannot seem to find them referenced in the XML for catalog_product_view.xml, nor in the phtml files.

I searched here and google for this but did not find anything substantial. I can't even find anything related. On this install, I am using the Ultimo theme by Infortis and Magento is version 2.2.4.

The attached screenshot displays what I mean. The image file name is displayed under the image and I need to remove that, but have found nothing in the way of assistance.

[EDIT] It's the Fotorama caption I need to remove. The view.xml for Ultimo has these set to false but they're still not being removed. I tried removing it through the CSS .less files but no go. Flushed caches between all changes.


texts: How to show Cross sell products even if the main product isn't in cart?

texts:
I'm using Magento-2.2.6

I am showing cross sell product in product_detailed_info with success.

The only problem is that cross sell product are shown only if the "main" product is in cart.

How can I show cross sell product even if the "main" product isn't in cart ? Do I have to modify Crosssell.php or something like that ?

Thanks in advance !!!


texts: Magento 2.1.0 How to edit admin template of subitem grid of bundle product

texts:
I am trying to make changes in sub item grid details of bundle product.

In magento 1 it was set form __construct method of app\code\core\Mage\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option.php  as $this->setTemplate('bundle/product/edit/bundle/option.phtml');

and when i make any change in app\design\adminhtml\default\default\template\bundle\product\edit\bundle\option.phtml it is reflecting properly.

Please note i am not making changes directly in core files this is just for confirmation i am using it.

But when i look into the _construct method of \vendor\magento\module-bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option.php setting of template is not their.

and when i tried to make changes in \vendor\magento\module-bundle\view\adminhtml\templates\product\edit\bundle\option.phtml no changes being reflected.

If I enable a path hint for admin it shows me that it appears from \vendor\magento\module-ui\view\base\ui_component\templates\form\collapsible.xhtml

but their is no as such code which shows for this grid.

Can any one please tell me from where this details comes in magento2.


texts: Magento2 - How to save custom field under admin_user table in database?

texts: I have created a custom field in admin user creation form ,how to save that field in admin_user table in Magento2?


texts: Uncaught SyntaxError: Unexpected end of JSON input - Add Product in Cart in Page Product

texts:
VM82534:1 Uncaught SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at getData (main.js:58)
    at Array.map (<anonymous>)
    at HTMLDocument.apply (main.js:74)
    at fire (jquery.js:3239)
    at Object.add [as done] (jquery.js:3298)
    at jQuery.fn.init.jQuery.fn.ready (jquery.js:3549)
    at jQuery.fn.init (jquery.js:2974)
    at new jQuery.fn.init (jquery-migrate.js:241)
    at jQuery (jquery.js:80)


texts: Forgot password API is not working in magento 2.x

texts:
I need to reset the password[Forgot Password] using below  REST API,

URL : {{base_url}}/index.php/rest/V1/customers/password

Method : PUT

body :

{
    "email": "test@gmail.com",
    "template": "Forgot Password",
    "websiteId": 0
}

Getting the  below response,

{
  "message": "No such entity with %fieldName = %fieldValue, %field2Name = %field2Value",
  "parameters": {
    "fieldName": "email",
    "fieldValue": "test@gmail.com",
    "field2Name": "websiteId",
    "field2Value": 0
  }
}

Please help me?


texts:
I have a module that imports some 10K shops (addresses, details, etc.) from a remote webservice to Magento. At the end of the import, I need to run a specific indexing.

The import part works fine (takes about 1 minute), but the indexing fails about 50% of the time. I was using the following code:

$process = Mage::getSingleton('index/indexer')->getProcessByCode('shop_indexer');
$process->reindexEverything();

Now I have read about another way to run the indexing. I have removed everything from my module and left only the following code:

$process = Mage::getSingleton('index/indexer')->getProcessByCode('shop_indexer');
$process->walk('reindexAll');

But this fails every time. I get an error on the frontend:

There has been an error processing your request

Edit: the above error was due to another issue in my module. Now I get no error display on the frontend, but still:

I get nothing in the system.log file.

What would be the correct approach to:

Import data to the Magento database
Run a reindex after the import has finished
Log the results of the reindexing (log something if it succeeds or fails)

Edit: What I don't understand is that reindexing fails when ran from my script, but doing it manually from the backend works fine. What am I missing?

Thanks in advance for any help on that!


texts:
I am creating a custom theme and would like to use EE banners. When I use the example from this question: https://stackoverflow.com/questions/22793051/magento-enterprise-banners

Mage::getModel('enterprise_banner/banner')
  ->getResource()
  ->getBannersContent(array(0 => 1), 1);

It works but I have to specify the id of the banner. I have no way of knowing what the id is going to be.

How can I get either the first active banner or all active banners?

Edit

Based on the answer provided by B00MER I am now attempting to use Enterprise Banners via widgets. Following the instructions here: http://docs.magento.com/m1/ce/user_guide/cms/widget-create.html I am able to create and add widgets to my theme. When I use CMS Static Blocks in my widgets and they show up correctly. However when I attempt to use a Banner Rotator nothing shows up on the frontend.

I have also tried putting a banner inside a CMS Static Block like this:

before banner
{{widget type="enterprise_banner/widget_banner" display_mode="fixed" banner_ids="1,2" template="banner/widget/block.phtml" unique_id="xxxxxxxxx"}}
after banner

And this is what is output on the frontend:

before banner
after banner

Based on this question: Magento EE 1.14.1 RWD not displaying Rotating banner widget I thought maybe the problem was my theme parent. So I changed from <parent>rwd/default</parent> to <parent>rwd/enterprise</parent>. Still nothing...

Why are my banners not showing up?


texts: How to implement to display estimated delivery date on product Page in magento1

texts: In magento, how to setup Expected Delivery date option in the product page itself. Choosing this date(Expected Delivery) and then add the product to cart.


texts: How I can make Magento 2 product-info-main sticky like cart sidebar when scroll to down?

texts:
I want to make an upper bar as in https://www.atma.com.ar/molinillo-electrico-atma-mc8141n.html that contains the product info and the "add-to-cart" button, and that appears only when I scroll under the add-to-cart button and remains fixed under the header during the scroll.
Help me please.


texts: Magento 2 email item list add product attributes

texts:
i want to add some product attribute to the ew order email .
I cloned file in template and trying to do changes as below but it is not working

<?php

// @codingStandardsIgnoreFile

/** @var $block \Magento\Sales\Block\Order\Email\Items\DefaultItems */

/** @var $_item \Magento\Sales\Model\Order\Item */
$_item = $block->getItem();
$_order = $_item->getOrder();

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->create('Magento\Catalog\Model\Product')->load($_item->getId());

?>

    <td class="item-info<?php if ($block->getItemOptions()): ?> has-extra<?php endif; ?>">

<?= $block->escapeHtml($_item->getName()) ?>

Add New Attribute : <?php echo $product->getNewAttribute();?>


texts: How to add Product description after product name in catalog list?

texts:
I am working with magento 1.7.0.2. I want to add product description after product name in the catalog list. what i will add to template/catalog/product/list.phtml ?

Tanks


texts: Cannot create an order from the admin with 0 total

texts:
I need to place an order from the Magento admin with a total of 0 (I select the product, then I hit "Custom price" to put the price at 0. But Magento seeing the total is 0 does not show me the payment option, hence I cannot place the order as it tells me to chose a payment method.

This worked in the past as we use it regularly to send missing items of a customer's order, so we have a total of 0 (shipping 0 as well). But strangely it does not work anymore.

Any help please?
Thank you


texts: Magento 2 Type Error occurred when creating object: Magento\Framework\MessageQueue\Consumer\Config\Data

texts:
I've gone through the Megento Message queue process. I learned and tried one sample module in my local. but while run the queue:consumers:list command I am facing the following error.
In AbstractFactory.php line 131:
Type Error occurred when creating object: Magento\Framework\MessageQueue\Consumer\Config\Data
For your further reference here I've added all my consumer related XML files. I hope this information are sufficient to identify the bug from your end. if you need any other info let me know it.
communication.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Communication/etc/communication.xsd">
    <topic name="product_import_topic" request="string"/>
</config>

queue_publisher:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/publisher.xsd">
    <publisher topic="product_import_topic">
        <connection name="amqp" exchange="product_import_exchange" />
    </publisher>
</config>

queue_topology:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/topology.xsd">
    <exchange name="product_import_exchange" type="topic" connection="amqp">
        <binding id="productImportBiding" topic="product_import_topic" destinationType="queue" destination="product_import_queue"/>
    </exchange>
</config>

queue_consumer.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd">
    <consumer name="productImportConsumer" queue="product_import_queue" connection="amqp" handler="Practise\MesssageQueue\Model\Consumer\ImportProductConsumer::productImportProcess"/>
</config>

Thanks in advance for your better support.


texts: EcomDev PHPUnit Translation not Working with Mocked Helper

texts: I noticed that translations are not working with the EcomDev_PHPUnit Unit Test framework if you replace a helper with a mocked helper, using mockHelper() and replaceByMock(). Shouldn't any call to the not-mocked method __() behave the same way than in the original helper?


texts: How to remove simple product from cart by observer programmatically in magento 2.2?

texts:
I'm facing problem, I have added total 5 items in cart where 3 items are different colors of same configurable product and other 2 is simple products.

When i try to remove simple product from cart by observer "checkout_cart_product_add_after" using $cart->removeItem($itemId)->save(); method then its change all the configurable products price to zero(0) but the subtotal calculation is working fine.

Is there any other way to remove simple product from cart by observer ?


texts: Can we import huge amount of data through insert statements in sql queries in magento2?

texts: We need to import huge data to magento database. Can anyone suggest me how can we achieve this through sql queries?or is there any standard approach other than code changes?


texts: Disable or remove Category view on product overview

texts:
Is there a easy way to remove or disable the category view on a product overview page ? I like to keep the filter view below the category view

http://prntscr.com/m83gmm


texts:
I have developed custom import module in my Magento store. It works normally on localhost, but on a server as not expected.  I send csv data sheet using post form and on module backend it should display products of csv sheet in grid. Response status 200 Ok, but grid is not loaded completely (response html also, there is no footer, grid js scripts), for example only 35 percent of grid. See attached image:

I cant figure out this issue related to Magento or PHP/Server configuration. Anybody have some suggestion?
What does import module after uploading csv? It parses csv and stores array of product related data (attribute values, option values) in session. If I test csv data sheet with less data it works normally, fails only when count of products are more.


texts: Color Shift after uploading image to Magento admin

texts: We have a client is complaining they are getting a color shift when uploading an image. If we don't have anything modifying images in the admin section, what could be affecting colors after image upload?


texts:
I want to know how can I add new column order and make use of it in order details view in order view / my custom tab. I'm running magento 2.4.1 version. Lets call this field my_custom_field.
I have add new field tried adding db_schema.xml file with following content:
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="sales_order" resource="sales" engine="innodb" comment="Sales Order">
    <column xsi:type="varchar" length="255" name="my_custom_field" nullable="true" comment="parcel number"/>

</table>

Then I upgraded setup.
Then I tried to set the value of that field for my order in my CustomTab -> execute method:
$order = $this->orderRepository->get($this->_coreRegistry->registry('current_order')->getId());
$order->setCustomAttribute('my_custom_field', 'test');
$this->orderRepository->save($order);

var_dump($order->getCustomAttribute('my_custom_field'));exit; # returns null

Could anyone point what am I doing wrong?


texts: View Magento 1.9 custom attributes in custom block

texts:
I would print just some custom attributes in a custom module block.

I used this code in custom block:

{{block type="core/template" name="attributesView" template="catalog/product/view/short_attributes.phtml"}}

I've created short_attributes.phtml with this code (took by attributes.phtml):

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

DIMENSIONI IMBALLO

        <?php foreach ($_additional as $_data):
            if (($this->htmlEscape($this->__($_data['code'])) == "pesoart")
            ){
                ?>
Peso articolo (kg): <?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>

            <?php
            }
            if (($this->htmlEscape($this->__($_data['code'])) == "volume") ){
            ?>
Volume (mc): <?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>

            <?php
            }
        endforeach; ?>
        <?php foreach ($_additional as $_data):
            if (($this->htmlEscape($this->__($_data['code'])) == "inf01") && $_helper->productAttribute($_product, $_data['value'], $_data['code'])== "3"):
        ?>
Acquistabile in 30 gg

        <?php
            endif;
        endforeach; ?>

<?php endif;
endif;
?>

But I see nothing...


texts: Magento2: How to get simple product color and size?

texts:
I'm editing app\design\frontend\Vendor\theme\Magento_Checkout\templates\cart\item\default.phtml

This is what I'm trying to achieve:

For configurable product, it shows color and size by default, but they doesn't show up for simple product.
The .phtml which I'm editing already have $product:

$product = $_item->getProduct();

I tried this:

data :<?php print_r($product->getData())?>

color :<?php var_dump($product->getColor())?>

options :<?php var_dump($product->getOptions())?>

But it doesnt seem to have color or size value in it. Here's the output:


texts: How do I get the attributes using a group id?

texts:
I want to generate a query, which returns me all of the  attributes from a specific group.
In the image below you can see the wanted result:D

This is my try:

select ea.attribute_code from eav_attribute ea
inner join eav_entity_attribute eav
on ea.entity_type_id = eav.entity_type_id
inner join eav_entity_type t
on ea.entity_type_id = t.entity_type_id
where eav.attribute_group_id = 26
and t.entity_type_code = 'catalog_product'

26 is the General id.

What should i change with my query ?


texts: Magento 2 : Payment Method Title not showing in Order view in admin

texts: I made a custom online payment method. All things are going proper, but in order view page in Admin I am Not getting Payment Method Title. We already set the configuration for title and its same like another payment method also in DB we are getting the payment method code in sales_order_payment table. Also getting payment method in order grid but not in Order View. Please give me some suggestion on this.


texts: I am working on multi store website.I want to add customer store view wise because at present my customres login from any store view but i want to restrict to store views.How it is possible?


texts:
I've over-ridden the validateMinimumAmount function from Mage_Sales_Model_Quote in my own Model file (Quote.php).  Here, I'm applying additional logic for Customer Groups.  On the first order, they have a set minimum order value, and on subsequent orders, they have a different minimum order value.

This appears to be working exactly how I expected, however, it has a knock-on affect that a message is displayed on the cart page.  This message includes the value from the admin system (sales/minimum_order/amount) - but this isn't the value I'm checking against, and sales/minimum_order/active is set to false.

This appears to be coming from app/code/core/Mage/Checkout/controllers/CartController.php line 147.  It doesn't additionally check if sales/minimum_order/active is active or not before adding the message.

Is there any way I can remove this message or change the value passed to it?


texts: How to configure default email system in magento 2.3.4

texts:
In my case, I can't send any email the default email system also no working. For checking, I sent the order confirmation mail it is not sending. it shows the error alert "Unable to send mail: Unknown error"

I had enabled all features but it is not working.

Sales:

Check Stores->Configuration-> Sales->Sales Emails->Order . Enabled is "Yes".

Email Communication:

Check Stores->Configuration-> Advanced->System->Mail Sending Settings. Email Communication is enabled.


texts: How to filter blank product image from catalogsearch and catalog in magento via observer

texts:
I need to filter blank image product in Magento from catalog and catalogsearch.
But it working fine on catalog. bt not fine in catalog search.

I got error when search product in search....

  Column not found: 1054 Unknown column 'e.small_image' in 'where clause'"

config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Nine_Catalog>
            <version>1.0.0</version>
        </Nine_Catalog>
    </modules>
    <global>
        <events>
            <catalog_block_product_list_collection>
                <observers>
                    <filter_blank_image> // unique idrntifer
                        <type>model</type>
                        <class>Nine_Catalog_Model_Observer</class>
                        <method>filterBlankImage</method>
                    </filter_blank_image>
                </observers>
            </catalog_block_product_list_collection>
        </events>
    </global>
</config>

Observer.php

class Nine_Catalog_Model_Observer extends Varien_Event_Observer
{

    public function filterBlankImage(Varien_Event_Observer $observer)
    {
        $collection = $observer->getEvent()->getCollection();
        return  $collection->addAttributeToFilter('small_image',array('neq'=>'no_selection'));
    }

}


texts: How to setup SSO between Wordpress and Magento?

texts: My wordpress and magento is on different server.  Does anyone have idea on how to setup SSO between them both? I tried multiple solutions but those only works if having same domain,not if installed seperately.


texts: how to change the products view from list to grid view in homepage of magento

texts:
I am using the mapple theme for magento i have used this code to show product on home page

{{widget type="catalog/product_widget_new" display_type="all_products" products_count="10"template="catalog/product/widget/new/content/new_grid.phtml"}}

it will show product as list on home page I want to change this view into grid. so anyone can help me, I am new to magento. thanks in advance for help.


texts: How I can change view in catalog magento 2?

texts:
I want put the filters up to catalog when you search a product. How I can do a module that change this apareance?

Thanks


texts:
I am integrating stripe with Magento 2 but the stripe is not working properly. We have multi-website and on the 1st site, the stripe is showing and working properly but on the 2nd site stripe payment gateway is not showing.
Please help me


texts:
How do I change the font color of system emails like "forgot password".

I currently have white font color and white background.

I need this to work in Outlook, Thunderbird an any webmailer.

I tried overriding email.less, email-fonts.less, email-inline.less in my custom theme with no success.


texts: I want to completely change the design of the product detail page. The products that I added from the admin panel should be placed in that design. how can I do it?


texts:
In Magento 2, I want One Category as a static page.

I don't want any products or filter or toolbar in it. Just need to load the content from the static block.

In, short I wanted to make one category as Static Page.

Can anyone suggest me the idea to do so?


texts:
I am using Magento 1.9. How can I allow showing Short Description block on print function? I can edit only the CSS file...
I couldn't find any solutions.
Thank you!


texts: use custom shipping method to calculate shipping price in another section of the marketplace (rma)

texts:
I have a problem, I am creating a custom module of rma, the module must allow to calculate the price of the shipment. Additionally I have a custom shipping module that works correctly in the purchase process but I have to calculate shipping prices in the rma module(for return product), I am trying to do this by calling a function of the shipping module but it does not execute.
The Shipping module:
app/code/xxxx/xxxx/model/carrier/shipping.php
class Shipping extends \Magento\Shipping\Model\Carrier\AbstractCarrier implements \Magento\Shipping\Model\Carrier\CarrierInterface
{
    #...rest of class methods

    #function to calculate rates
     public function getShippingPrice($origenRegion,$origenCiudad, $destinoRegion, $destinoCiudad, $peso)
     {
        # ...rest of function
        $shippingPrice = $this->getFinalPriceWithHandlingFee($tasa);

        return $shippingPrice;
     }

     public function collectRates(RateRequest $request)
     {
        #...
     }

}

The shipping rates works fine, but when I try to use the getShippingPrice function in another section (an observer) it does not get executed.
class RmaSuccess implements ObserverInterface
{
     protected $_ShippingModel;
     public function __construct(\xxxx\xxxx\Model\Carrier\Shipping $ShippingModel){

     $this->_ShippingModel = $ShippingModel;
     }

      public function execute(\Magento\Framework\Event\Observer $observer ) {
         #....
         CostOfRefound = $this->_ShippingModel->getShippingPrice($shippingAdressOrigin->getRegion(),
                    $shippingAdressOrigin->getCity(), $SellerRegion, $SellerCiudad,($PesoTotalSeller[$key])/1000);
         #....the function does not run

      }
}

thanks for any help.


texts:
Running Magento 2.1.2

Is there any way in Magento 2 to assign orders to main customer accounts, as lately my customer placed a guest order and asked me to reassign this order to the main account?

Any help would be greatly appreciated. Thanks.


texts:
I need to get the average order price of a customer in M1.

Getting the totals:

$customer = $this->getCustomer();

    $customerTotals = Mage::getResourceModel('sales/sale_collection')
     ->setOrderStateFilter(Mage_Sales_Model_Order::STATE_CANCELED, true)
     ->setCustomerFilter($customer)
     ->load()
     ->getTotals();

Output:

[_data:protected] => Array
        (
            [lifetime] => 6
            [base_lifetime] => 6
            [base_avgsale] => 6
            [num_orders] => 1
            [avgsale] => 6
        )

I know I can get:

lifetime like- $customerTotals->getLifetime() and
num_orders like - $customerTotals->getNumOrders()

but how do I get avgsale?


texts: multiple prices of product based on countries/regions

texts:
I have a question.

I want to have different prices of a product belonging to different countries. Means different boxes of prices for different locations. Suppose I add product having different prices for UK and US, then if a customer visits the website from UK it will have different price than what another customer would have visited the same website from US.

How to achieve this? Can you guys point me in the right direction?

P.S.  It should not be multiple sites. It MUST MUST be only single store.


texts: What is the best approach to call a static block in a template file and why?

texts:
There are two ways by which we can call a static block in a Magento phtml file;

Method-1

<reference name="footer">
    <block type="cms/block" name="my_identifier">
        <action method="setBlockId"><block_id>my_identifier</block_id></action>
    </block>
</reference>

Then in the phtml file:

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

Method-2

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

Which approach is better and why?


texts:
I accidentally left activated the Saved CC payment method, I usually use it to test the checkout prcocess, and there are several orders that were made using this payment method.
Is there any way to automatically process these orders through the default payment method?


texts: How to check if phone number already exist?

texts: Is there a way to validate a phone number has already been used by customer programmatically?


texts: How programmatically get Credit memo Comment History?

texts: I want to get credit memo history programmatically by credit memo id how can I get using the Credit memo id?


texts: How to redirect a category to another link?

texts:
I have an extension in my store that I can upload posts with this and it has a link in the top menu that' name is blog.
In the menu, I have a category that's name is News and I want to redirect it to blog. This means that when clicking on News on the menu it shows me blog.
How can I do this?


texts: which cc provider to choose in UK - worldpay or sagepage

texts:
With 2 payment provider options Sagepay and Worldpay which integrates better with magento?

From what I see, Sagepay has an officially produced extension but has limited functionality on the free one.

Worldpay has a complete free extension but I have seen complaints it is not as good as it is not an official extension.

Has anyone any experience or thoughts on which is preferable?  No other provider is an option.


texts: Sorting catalog page products by custom attributes programmatically

texts:
I am in the process of sorting products by attribute_set_id with the help of a custom module that extends Mage_Catalog_Model_Config. Here is my module's Model/Catalog/Config.php

<?php

class Atwix_Tweaks_Model_Catalog_Config extends Mage_Catalog_Model_Config
{
    public function getAttributeUsedForSortByArray()
    {
        $options = array(
            'attribute_set_id' => Mage::getModel("eav/entity_attribute_set")
        );

        foreach ($this->getAttributesUsedForSortBy() as $attribute) {
            $options[$attribute->getAttributeCode()] = $attribute->getStoreLabel();
        }

        return $options;
    }
}

After sorting by attribute_set_id, I want to sort by product name so I attempt to add this to the array:

        $options = array(
            'attribute_set_id' => Mage::getModel("eav/entity_attribute_set"),
            'name' => Mage::helper('catalog')->__('Name')
        );

But the catalog page doesn't seem to recognize the second field. I can only ever get one field to work. This is the meat of my extension and all customizations are in this single file. This is the link that the extension is based on: http://www.atwix.com/magento/custom-sorting-product-listing/

Is there another way to use mixed attributes in a collection array? I feel like I'm looking over something.


texts: Discount Coupon Code disappearing at checkout

texts: I am having an issue where the coupon code inputted by a customer later disappears when checking out. Basically the customer inputs the coupon code and it looks fine but when they go checkout and type in their info, the coupon disappears. Can anyone help?


texts: How to allow integrations to work while in maintenance mode?

texts: My magento installation has integration with a ERP that uses multiple IPs to connect to it that keep changing. This makes it very difficult to develop the webshop in maintenance mode. How can I let magento 2.4 in maintenance mode while also allowing ERPs to perform their needed API calls?


texts: Magento 2 - Site loading forever and nothing happens, until I delete cookies

texts:
I am developing using grunt. After flushing the cache, It often happens lately that the site is loading forever and nothing happens. There is no error logged in the console and the browser console does not show anything usefull
I then have to delete the cookies of the website to make it work again.
Does anyone noticed this too? Why does it happen?
Usernames and Permissions is not the issue, it is setup perfectly and always set correctly,
I am hosted on rackspeed.
Cookie Settings:
The cookie domain is empty and the cookie path too.


texts: Change Banktransfer template only for Onepage Checkout Progress Bar

texts:
On Onepage checkout, the progress bar also contains the detailed information for the payment method bank transfer, which is located in app/design/frontend/base/default/template/payment/info/banktransfer.phtml. We do not need this information, so i want to delete it.

When i modify this template to only show the payment title, also the payment information block on the order confirmation mail is affected, which is not intended.

How can i change the banktransfer template for progress bar only?


texts:
I have connected my store with SSH terminal and then I navigated to the root directory of my store where I run the following command

*/5 * * * * cron.sh

But its showing this error: bash: */5: No such file or directory


texts: M2: Is it safe to remove customer entities straight from customer_entity table?

texts: I have tons of spam accounts in my store (M2.2.2) and I'm curious - is it safe to remove them with well-tested pattern straight from customer_entity table? Since Magento 2 has triggers and it will do cascade remove on DELETE command - I believe it's 100% bulletproof. Am I wrong or not?


texts: need help please! Changed base link now unable to enter magento 1.8 and actual website

texts: I went into system then configuration then web and I changed the base url in the secure and unsecure section....originally it had {{base_url}} but then I changed it to the new website name and now I cant get in at all. I cant even get into Magento!Please help!!


texts: installing extensions for magento on cpanel

texts:
i'm new on magento and i need to install extensions but i don't know how..
i tried to install an extension from the dashboard through the component manager but the readiness check gave an error on cron job and i couldn't solve the problem so i tried to download the extension as a zip file and extracted it here comes the question:
1-what files should i upload to cpanel from the extracted files?
2-In which folder in cpanel i must upload it?
3-what should i do after uploading it? I mean how will it work?

noting that i don't have the password of the root username but the manager of the host has invited me so that when i log in to cpanel this appears


texts: How can I hide 0.00 rate estimate if free shipping

texts: I am creating custom shipping module in Magento 2. How can I hide $0.00 if there is no shipping price. Can I pass alternative text or hide this value?


texts: I have a store in 2 languages. i create attribute Input Type for Store Owner is Dropdown. the list of choices are shown and work very well in store of English language but store in other language  not work and list doesn't appear. why? how can i solve it ? i work on magento 2


texts: How to change category page block after opening shop by filter

texts:
I'm new Magento2 User and I got an issue.

You can see the picture  it shows before I open Shop By filter.

After opening that,I add new Category and the page goes left-right bolck style .

How can I change the old category page to left-right bolck style.


texts: custom variable not added in custom model in my module

texts:
I need to add a custom variable with my module in Mage_Core_Email_Template_Filter for to use in transactional email. I have tried:
config.xml

    <core>
        <rewrite>
            <email_template_fitler>Mage_Core_Email_Template_Filter</email_template_fitler>
        </rewrite>
        </core>

Filter.php

<?php
class ITEP_Incomm_Model_Template_Filter extends Mage_Core_Email_Template_Filter
{
    //variavel para obter código de validação
    public function codeValidationDirective($construction) {
        $params = $this->_getIncludeParameters($construction[2]);
        return print_r('1142111e2e1we321123211');
        }
}

and using with {{codeValidation}}, {{customVar code=codeValidation}} but in preview of template the result is the text {{codeValidation}} and not the real value.
Why i need to modify? thanks in advance. My cache is off, and clear.


texts: Magento 1.9 - Placing order before paypal payment

texts:
I've a problem with paypal integration in magento.
If i choose paypal standard payment and confirm order, i'm correctly redirected to paypal site for payment, but if i press back button on the browser i am redirected in /checkout/cart (that is empty) and in my backend my order was placed and in PENDING status (it's not shown in customers order list)...
This happens because the order were placed before payment processing...
In OnepageController.php saveOrderAction method i can see

$this->getOnepage()->getQuote()->save();
    /**
     * when there is redirect to third party, we don't want to save order yet.
     * we will save the order in return action.
     */
    if (isset($redirectUrl)) {
        $result['redirect'] = $redirectUrl;
    }

What does it mean? It is exactly what i want "Don't want to save order yet....", unfortunately few rows before...

$this->getOnepage()->saveOrder();

$redirectUrl = $this->getOnepage()->getCheckout()->getRedirectUrl();

And the order was already placed....

I hate editing core files, but i've tried to comment out the line above, but an exception shows me that order information are used inside paypal module itself (Standard.php file method getStandardCheckoutFormFields). So i can't modify core file easily.
What am I missing?

Thanks a lot.


texts: How to change the default Magento Shopping Cart URL

texts: I would like to change the shopping cart URL from /checkout/cart/ to /checkout/bag/. Is it possible to modify the default URL, and if so, how?


texts: Create more upselling modules per product

texts:
I want to define several upsell modules instead of just one. How can I add additional upsell categories (i.e. Accessoirs for example)?

Basically I want to do something based on this module:
https://www.magentocommerce.com/magento-connect/product-accessories.html

How would I do that in Magento 2?


texts:
The website I am working on just failed a security audit because the passwords in enterprise_admin_passwords do not have salts.

I tried looking at the Enterprise_Pci module (where the table is declared) - and found that the table is used to save old passwords, possibly for the purpose of forcing the admin user to change them when they expire.

What is that table used for ?
Are the passwords there used without salts, or are they taken from the admin_user table ?


texts: How to remove Add to cart warning message without size color selection?

texts:
I have to remove the You need to choose options for your item. on Add to cart button when I don't select any color or size.
I don't want to show this as a global message.

I found that Add to cart is an ajax call . But I am not able to debug how this You need to choose options for your item. is getting set and
how can I remove it?


texts:
hello everyone i have a block which i have added , but i see the block displaying for all users role that i have on my application , so my question is how to hide it from some users or how to add role acl for this block :

  <block ifconfig="module/test/backend/order_view"
                                   class="Vendor\module\Block\Adminhtml\Order\Test"
                                   name="some_name"
                                   template="Vendor_Module::test.phtml"/>


texts: "error": [{ "code": 404, "message": "Request does not match any route."}] error magento1.9

texts:
for custom get api request i am getting "Request does not match any route." error
api.xml
<route_entity>
    <route>/servicebms/outgoingcall/:k_number/:agent_number/:customer_number/:caller_id/:created_time</route>
    <action_type>entity</action_type>
</route_entity>

Here is the url
http://15.206.238.137/api/rest/servicebms/outgoingcall/
and how to add authentacation key, x-api-key in magento


texts: Organic Simple Configurable Product Prices In Swatch

texts:
I am currently using Organic Simple Configurable Products extension for Magento CE 1.9.3.2
I have configurable products that are successfully changing the price displayed for the products total price after selecting my options.

I am trying to get the price of a configuration to display in the swatch.

To help understand the question i will give an example scenario.

Say I have a product of T-shirts that have a variation on the Size of Small/Medium which is displayed as a drop down.

I also have a variation of Quantities, 5/10/20 this variation is displayed as a swatch.

example prices:
Small - 5: £10
Small - 10: £18
Small - 20: £34
Medium - 5: £12
Medium - 10: £22
Medium - 20: £40

What I want is for the swatch to display the price when selecting the quantity

eg i have selected small in the size dropdown so the quantity swatches should update to show.

5 £10    10 £18    20 £34

and if i change the dropdown to medium then the prices in the quantity swatch will change to

5 £12    10 £22    20 £40

I have spent a lot of time pouring over the code but i haven't got a clue what does what and where and i would appreciate some direction or code.


texts: Magento 2 : How to get data from cms block into a js file

texts:
I have created a cms block in backend with the id wsmaterial. I have a modal that is created in a JavaScript file and the content for the modal should be the html from the cms block. Right now, it displays the id (wsmaterial) of the cms block, not the content.

In my features.js file:

var description = extendedOptionsConfig[option_id]['description'];
console.log(description);  // => displays 'wsmaterial'

Instead of wsmaterial I want to get the content of the block with the id wsmaterial. Something like this:

var description = <?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('wsmaterial')->toHtml();?>

Is there any way of getting the content of the cms block in JS by the identifier?

Thank you!


texts:
In a standard Quick books Accounting environment, do Credit Memos generally involve duplicating steps in both Magento and Quick books?

It seems like you need to create the credit memo on Magento and then record the credit memo in Quick books to match the type of refund it was (Refund back to the customer OR Refund credit).

We're using eCC Webgility and I assumed Credit Memos might be a little more streamlined but after some research this issue I'm beginning to think 2 separate steps might be more the norm?


texts: Repetitive use of OptiPNG / JPEGTran / GIFSicle

texts:
I don't have enough rep to comment on the contributors post, so I will ask the question here. There was a great Q&A regarding bulk image optimization  here Bulk replacing with compressed images?

I'd like to setup a cron that runs once a month, which performs image optimizations suggested in the above link. Given the way the script would work, it'll attempt to re-optimize images - but would those resources be smart enough to not degrade the quality?


texts: remove saved image while editing the form magento 2

texts:
Before explaining what is my issue let me explain what I want to achieve?

I am creating a custom form which takes some information and saves into a custom table.It includes a file upload which is mostly an image.

So what I did?

I successfully uploaded the file to a location on server and saved the information as well as file name on my custom table.Below is what i did to save the file.

<?php

namespace Custom\Addprofile\Controller\Index;

//use Magento\Framework\App\RequestInterface;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Filesystem;
use Magento\MediaStorage\Model\File\UploaderFactory;

class Addprofile extends \Magento\Framework\App\Action\Action {

    protected $resultPageFactory;

     /**
     * @var RequestInterface
     */
    protected $request;
    protected $_objectManager;
    protected $messageManager;

    protected $uploaderFactory;

    protected $fileSystem;

    protected $fileId = 'concession_card';
    protected $allowedExtensions = ['jpg', 'png', 'jpeg'];

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory,
        \Magento\Framework\App\RequestInterface $request,
        \Magento\Framework\ObjectManagerInterface $objectManager,
        \Magento\Framework\Message\ManagerInterface $messageManager,
        UploaderFactory $uploaderFactory,
        Filesystem $fileSystem
    ){
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
        $this->request = $request;
        $this->_objectManager = $objectManager;
        $this->messageManager = $messageManager;
        $this->uploaderFactory = $uploaderFactory;
        $this->fileSystem = $fileSystem;
    }
    public function execute(){
        $post = $this->request->getPostValue();
        if (isset($_FILES['concession_card']['name']) && $_FILES['concession_card']['name'] != "") {
                    $destinationPath = $this->getDestinationPath();

                    $uploader = $this->uploaderFactory->create(['fileId' => $this->fileId])
                    ->setAllowCreateFolders(true)
                    ->setAllowRenameFiles(true)
                    ->setAllowedExtensions($this->allowedExtensions);

                if (!$fileData = $uploader->save($destinationPath)) {
                    throw new LocalizedException(
                        __('File cannot be saved to path: $1', $destinationPath)
                    );
                }
                $fileName = $fileData['file'];
                $post['concession_card'] = $fileName;
                }
        //var_dump($post);die();
        $model = $this->_objectManager->create('Custom\Addprofile\Model\Profile');
        $model->setData($post);
        $model->save();
        $this->messageManager->addSuccess('Profile has been successfully added.');
    }

    public function getDestinationPath()
    {
        return $this->fileSystem
            ->getDirectoryWrite(DirectoryList::MEDIA)
            ->getAbsolutePath('/customer/profile/');
    }
}

Till here there is no issue.But let us assume if I need to edit the same form.I need to again take the image and replace it with the image. I can do all these using above code but I couldn't remove the previously uploaded image.

The reason I want to delete previously uploaded image is, there is no use of it so removing it would be a good idea.

In short

I want to remove the previously uploaded image and replace it with new one.

So can anyone help me out here. How can I remove the previously uploaded image in magento 2?

Thanks


texts: How to Create a Magento Customer Record from a Shopify Sale

texts:
I'm looking at the most efficient way to take shopify order information and send it to magento to create a customer record.

Obviously the API is the preferred method but I'm such a novice, rather than researching all the methodologies I'd rather someone just point me in the right direction & I'll get to work!

Thanks so much!


texts: Magento 2 API creat product width multiple images

texts:
I would like to create a product with several images via API.
It also works but he only reads one picture.
The others pictures only show the default thumbnail in the Magento backend.

He fetches the images via foreach:
foreach($_POST['image'] as $key => $value) {

  $path_parts = pathinfo($value);

  $image[] = array(
      'id' => $key,
      'media_type' => 'image',
      'label' => 'Product Image '.$key,
      'position' => $key,
      'disabled' => 'false',
      'types' => array('image','small_image','thumbnail'),
      'file' => $path_parts['filename'].'.'.$path_parts['extension'],
      'content' => array(
        "base64_encoded_data" => base64_encode(file_get_contents($value)),
        "type" => "image/jpeg",
        "name" => $path_parts['filename'].'.'.$path_parts['extension']
      )
    );
}

and then output in the post
$post ='{
  "product": {
    "sku": "DS12342134",
    "name": "Test",
    "attribute_set_id": 4,
    "price": 25,
    "status": 1,
    "visibility": 1,
    "type_id": "simple",
    "weight": "0.5",
    "media_gallery_entries":
      '.json_encode($image).'
    ,
  }
}';

can someone help?


texts: Magento 2 - Prices not display with Excluding Tax set in admin

texts:
I have a issue in Magento 2.2, I want to display all catalog prices without tax, so I set this in the Admin Panel. But the prices in the catalog still contain tax.

What I do wrong?


texts: Magento 1.9 - Add a tax free product to a specific product when adding to the shopping cart

texts:
When I add a specific product to the shopping cart, I want also automatically add a tax-free product to the shopping cart.

Example

Adding a watch(€500) with 21% tax to the shopping cart
Automatically add the taxless product (€30)

So the price will be €500+21% tax (€605) + the €30 taxless fee.
Total price: €635

How can I do this?


texts:
I have a custom module, whose content I need to show on Order Details page.

Not under any new tab or something but just above the "Order Totals" div.

How do I accomplish this without modifying any core files?


texts: How to configure Redis Cluster in Magento 2

texts:
I have installed and configured Redis Cache with Magento-2 and it's working fine.
For that, I added the config data in app/etc/env.php file.
Now I am trying to configure Redis Cluster with Magento-2 and checking how do the configuration.

Can anyone please help me how to configure Redis Cluster with Magento-2.


texts:
I need to unset the multivalued session in magento, because i have added a large amount of values into session on the based of particular params like:

 $postData = $this->getRequest()->getPost();
        Mage::getSingleton('core/session')->setSummaryParameters($postData);
        Mage::unregister('ajax');
        Mage::unregister('ajax_result');
        Mage::register('ajax_summary',true);
        Mage::getSingleton('core/session')->setMassageType($postData['type']);
        $masseur = $postData['name'];
        $productId = $postData['id'];
         $aw_booking_date = $postData['day'];
         $parameters['product'] = $productId;

         // prepare arguments for book now button based on selected data of reservation page
         $parameters['aw_booking_from_display'] = $aw_booking_date;
         $parameters['aw_booking_from'] = $aw_booking_date;

         $parameters['aw_booking_time_from[hours-am]'] = 12;
         $parameters['aw_booking_time_from[hours-pm]'] = 12;
         $parameters['aw_booking_time_from[hours]'] = date('h',strtotime($postData['time']));
         $parameters['aw_booking_time_from[minutes]'] = date('i',strtotime($postData['time']));
         $parameters['aw_booking_time_from[daypart]'] = date('a',strtotime($postData['time']));

         $time = strtotime($postData['time']);
         $minutes = '+'.$postData['minutes'].' minutes';
         $to_time = date("H:i", strtotime($minutes, $time));
         $parameters['aw_booking_time_to[hours-am]'] = 12;
         $parameters['aw_booking_time_to[hours-pm]'] = 12;
         $parameters['aw_booking_time_to[hours]'] = date('h',strtotime($to_time));;
         $parameters['aw_booking_time_to[minutes]'] = date('i',strtotime($to_time));;
         $parameters['aw_booking_time_to[daypart]'] = date('a',strtotime($to_time));;
         $parameters['qty'] = 1;

but when i refresh the page or comes different page to action controller page it gives me
mysql syntax error. because now session have no value with valid params,
please tell me how i can unset the session as i register.
thanks in advance.


texts: magmi . remove skus from their existing category in website #1 but leave them in website #2

texts:
I have over 3000 skus that have already been imported into categories in 2 websites on the same magento db.

I would like to do some kind of import to remove skus from their existing category in website #1 but leave them in website #2. I've tried to find a reference to something like that in the documentation for category on the fly creator plugin. Have only found category_reset column which will either allow for reset in both websites or not. I require something that will reset one and not the other in the same import file.

Is this possible?


texts: A dumb question probably, but does magento save data submited from Contact Us form to database? If yes, is there a way to view it from admin?


texts: Magento 2, how to do performance testing in site?

texts:
Performance test in Magento 2 using CLI

In magento 2, how to do performance testing for core module of magento application?


texts: Magento2.4 How to remove price decimal point for perticular category listing and detail page

texts:
Magento2.4 remove price decimal(special & normal) for the particular category on list & detail page.
I need to display 117 instead of 117.00 on the particular category on list & details page
How can I achieve this?


texts:
I would like to know if all dependency injections used in a module have to be declared in the "module dependencies".

And, in this case, as "soft" dependencies (in module.xml file), as "hard" dependencies (in composer.json file) or both?

In my studies I learned they have to be added in composer.json file.. am I right?


texts: How to commit the changes from Server to GitHub in Magento?

texts:
We have three servers for our Magento site. They are as Development, Staging and Live/Production. We are doing the code changes directly on the server. For example, to edit the CSS and other code changes. Now we would like to use GitHub for collaborative work and to track the changes made on the server.

We have cloned the source of three servers to our GitHub account. As I said before, we are directly doing the code changes at the server. We want to commit the change which is made on a Development server to GitHub Development branch but we couldn't able to do it.

As of now, we have installed GitHub desktop and open the Development branch source on local and doing the code changes. Then after, we are committing changes to Development Brach. I'm aware this is not a correct workflow.

Could anyone please help me with this?


texts: Filter for Magento Admin Grid All "NULL" Values

texts: Is there a way to create a filter for NULL values in Magento Custom Admin Grid?


texts: Is there a an event for the currency exchange rates?

texts: I would like to observe the event when the exchange rates are fetched from Webservicex. Is there such an event that I can observe? I haven't been able to find one in the docs and am not too happy with setting a up a cron.


texts:
I am creating multiple grouped products which include custom products attributes taken from each simple product associated which i have added to the table within grouped.phtml like so...

<td data-th="<?= $block->escapeHtml(__('Strap Length')) ?>" class="col item">
    <?= $my_attr = $this->getProduct()->getResource()->getAttributeRawValue($_item->getId(),'straplength',$_item->getId()); ?>

However not all the grouped products will need to contain the same data so I want to hide any reference of this attribute if all of the simple products do not contain any data within that attribute.

including hiding the title within the head of the table...

<?= /* @escapeNotVerified */ __('Strap Length') ?>


texts: Import only the customer from magento 1.9 to Magento 2.2

texts: I am creating a new site with Magento 2.2  I need to import only the customer from an old site that is running on Magento 1.9. Any option can be import customer details using .csv file.Please help.


texts: customer can not login on chrome browser in magento 2.1.8

texts: When a customer puts his e-mail and password and clicks Submit, the page refreshes and leaves the fields empty, without logging in.While other browser allowing login of customers to their account.  Please help me to find out the solution.Thanks


texts: Missing vendor files on a fresh installation

texts:
i have a fresh magento 2 install, and i'm missing files and components, any ideia of what should i be missing?

I miss the file JsonFactory for example, and i don't have any modal component available..

a bit of my ui_configuration.xsd

<!-- Components list -->
<xs:element type="formConfiguration" name="form"/>
<xs:element type="containerConfiguration" name="container"/>
<xs:element type="listingConfiguration" name="listing"/>

and the one from the magento repo

 <!-- Components list -->
<xs:element type="formConfiguration" name="form"/>
<xs:element type="modalConfiguration" name="modal"/>
<xs:element type="dynamicRowsConfiguration" name="dynamicRows"/>
<xs:element type="containerConfiguration" name="container"/>
<xs:element type="listingConfiguration" name="listing"/>

anyone knows why i'm missing things?


texts: How do you set Domestic and International shipping rates

texts:
I find Magento to be incredibly unfriendly.  It's difficult for me to setup what should be very simple basic functions.  I couldn't figure it out in the past so I set a flat rate for my shipping and just used First Class International mail for international orders.  Now USPS has taken that away so all international orders are a rip off, nothing less than $10 leaves the USA now.  You can't even print the labels for letter rate anymore.

How do I set this up in magento without having to pay for a damn plugin

I just need to set the following:

Domestic orders:  Shipping is $3.99
International orders:  Shipping is $12.99

How do I do this?  Nothing makes sense to me in the options, and can't make heads or tales out of the table rates.  Is there a simpleton version for morons?  I need help.  I'm using Magento 1.9


texts: Login on Checkout Page Redirects to Cart page

texts:
I've 1.9.1.0 version of magento.

So far after researching I've deleted the lines under

app/code/core/Mage/Checkout/controllers/OnepageController.php

These lines

$action = $this->getRequest()->getActionName();
        if (Mage::getSingleton('checkout/session')->getCartWasUpdated(true)
            && !in_array($action, array('index', 'progress'))
        ) {
            $this->_ajaxRedirectResponse();
            return true;
        }

I'm still noticing that when I enter credentials under one page checkout, it still redirects to cart page. It must redirects to the checkout page itself.

Here is the HTML

<form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
        <?php $checkout_link = Mage::helper('checkout/url')->getCheckoutUrl(); ?>
        <input type="hidden" value="<?php echo $checkout_link; ?>" name="login_redirect" />
        <input type="hidden" name="wronrg_redirect" value="<?php echo $this->helper('core/url')->getCurrentUrl(); ?>"  />
        <fieldset>

<?php echo $this->__('Already registered?') ?>

<?php echo $this->__('Please log in below:') ?>

                    <?php $title = Mage::getStoreConfig('sms_section/sms_group/title'); ?>
                          <?php /*?>  *<?php echo $this->__('%s',$title) ?><?php */?>

                                <input type="text" name="login[mobilenumber]" value="<?php echo $this->htmlEscape($this->getMobilenumber()) ?>" id="mobilenumber" class="input-text required-entry" title="<?php echo $this->__('%s',$title) ?>" placeholder="Mobile/Email" />

                   <?php /*?> *<?php echo $this->__('Password') ?><?php */?>

                        <input type="password" class="input-text required-entry" id="login-password" name="login[password]" placeholder="Password" />

        </fieldset>
        </form>
        <button type="submit" class="button btn pull-right" onclick="onepageLogin(this)"><?php echo $this->__('Login') ?></button>


texts: Magento2.23.4 Custom Module backend image preview error

texts:
image preview html:

        <button
                type="button"
                class="action-remove"
                data-role="delete-button"
                attr="title: $t('Delete image')"
                disable="$parent.disabled"
                click="$parent.removeFile.bind($parent, $file)">

        </button>

    <text args="$file.previewWidth"/>x<text args="$file.previewHeight"/>,
    <text args="$parent.formatSize($file.size)"/>

Ui component form xml:

<field name="image" sortOrder="40" formElement="imageUploader">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">image</item>
                </item>
            </argument>
            <settings>
                <elementTmpl>ui/form/element/uploader/uploader</elementTmpl>
                <dataType>string</dataType>
                Image
                <visible>true</visible>
                <required>false</required>
            </settings>
            <formElements>
                <imageUploader>
                    <settings>
                        <required>false</required>
                        <uploaderConfig>
                            <param xsi:type="url" name="url" path="vendor_module/juliano/upload"/>
                        </uploaderConfig>
                        <previewTmpl>Vendor_Module/image-preview</previewTmpl>
                        <openDialogTitle>Media Gallery</openDialogTitle>
                        <initialMediaGalleryOpenSubpath>juliano/vargas</initialMediaGalleryOpenSubpath>
                        <allowedExtensions>jpg jpeg gif png</allowedExtensions>
                        <maxFileSize>4194304</maxFileSize>
                    </settings>
                </imageUploader>
            </formElements>
        </field>

The only issue that i have is when the page reload: everything else is ok:

The tab is empty and there is an error in file-uploader.js which I've looked into it and find out the it's not doing what it supposed to do.

console.log in the line errored:

/**
         * Defines initial value of the instance.
         *
         * @returns {FileUploader} Chainable.
         */
        setInitialValue: function () {
            console.log(this.getInitialValue());
            var value = this.getInitialValue();

            value = value.map(this.processFile, this);

            this.initialValue = value.slice();

            this.value(value);
            this.on('value', this.onUpdate.bind(this));
            this.isUseDefault(this.disabled());

            return this;
        },

Is Show the image string NOT right!

From category page display an obj Correct!

But what am i missing? Thanks in advance


texts: Custom non-attribute based layered navigation. Is this the only way to do it?

texts:
Today I have been knocking up a layered navigation option that is not based on an attribute. It is for ratings so the front end can show nice shiny stars.

To do this I have:

Created a module
Rewrote catalog_block_layer_view

<blocks>
  <catalog>
    <rewrite>
      <layer_view>Bob_Catalog_Block_Layer_View</layer_view>
     </rewrite>
   </catalog>
</blocks>

Created a class called Bob_Catalog_Block_Layer_View which extends Mage_Catalog_Block_Layer_View
Created _initBlocks(), getFilters() and _prepareLayout() to override the parent classes methods.  These all call the parent class at some point and then either prepend or appended extra data to what is returned.
Create a filter block Bob_Catalog_Block_Layer_Filter_Rating which extends Mage_Catalog_Block_Layer_Filter_Abstract with a constructor that sets the filterModelName and calls its parent and then sets a custom template as it seems Mage_Catalog_Block_Layer_Filter_Abstract has the template name hardcoded in its constructor.
Create a model Bob_Catalog_Model_Layer_Filter_Rating which extends Mage_Catalog_Model_Layer_Filter_Abstract and implements apply(), getName(), _getItemsData().

This all works fine.  The nice shiny stars show in the layered nav.

I have a gut feeling that I'm missing something because when it comes to layer state template I've had to put a conditional in there to pick up the custom rating filter and alter the layout.  Also some of the things I've needed to do (clone the product collection so that the load event doesn't screw up the collection counts on the pagination) make me feel like I've been swimming up hill.

So the question is have any of you got any better suggestions (or maybe a blog post wink) on how to build a custom non-attribute backed layered navigation filter?

Thanks for reading,

Si


texts: Class in observer is not triggered but the file runs (sales_order_invoice_save_after)

texts:
I'm having a problem in a Magento Module.
I'm trying to modify a module to add an observer that will do stuf only after the invoice is created and the order is paid (sales_order_invoice_save_after), and this is what the config file looks like:

<?xml version="1.0"?>
<config>
  <modules>
    <Datasource_Moloni>
      <version>0.1.0</version>
    </Datasource_Moloni>
  </modules>
  <global>
    <helpers>
      <moloni>
        <class>Datasource_Moloni_Helper</class>
      </moloni>
    </helpers>
    <blocks>
      <moloni>
        <class>Datasource_Moloni_Block</class>
      </moloni>
    </blocks>
    <models>
        <moloni>
            <class>Datasource_Moloni_Model</class>
        </moloni>
    </models>
    <events>
        <sales_order_invoice_save_after>
            <observers>
                <moloni>
                    <class>moloni/auto</class>
                    <method>genInvoice</method>
                    <type>model</type>
                </moloni>
            </observers>
        </sales_order_invoice_save_after>
    </events>
  </global>
  <admin>
    <routers>
      <moloni>
        <use>admin</use>
        <args>
          <module>Datasource_Moloni</module>
          <frontName>moloni</frontName>
        </args>
      </moloni>
    </routers>
  </admin>
  <adminhtml>
    <menu>
      <moloni module="moloni">
        <title>Moloni</title>
        <sort_order>100</sort_order>
        <children>
          <molonibackend module="moloni">
            <title>Moloni</title>
            <sort_order>0</sort_order>
            <action>moloni/adminhtml_molonibackend</action>
          </molonibackend>
        </children>
      </moloni>
    </menu>
    <acl>
      <resources>
        <all>
          <title>Allow Everything</title>
        </all>
        <admin>
          <children>
            <moloni translate="title" module="moloni">
              <title>Moloni</title>
              <sort_order>1000</sort_order>
              <children>
                  <molonibackend translate="title">
                    <title>Moloni</title>
                  </molonibackend>
              </children>
            </moloni>
          </children>
        </admin>
        <moloni_write>
            <connection>
                <use>core_write</use>
            </connection>
        </moloni_write>
      </resources>
    </acl>
    <layout>
      <updates>
        <moloni>
          <file>moloni.xml</file>
        </moloni>
      </updates>
    </layout>
  </adminhtml>
</config>

It tries to run the script in the folder includes/src folder, where I have the file Datasource_Moloni_Model_Observer.php .

Inside that file, I have something like this:

<?php

class Datasource_Moloni_Model_Auto
{
public function genInvoice(Varien_Event_Observer $observer)
    {
         echo "inside the function";
    }
}

echo "outside";

The result no matter what is always "outside".
I've tried changing the class so many times in the XML and the PHP files, that I don't know how many things I tried...

Anyone knows why this is happening or has any sugestion? Would love to ear some feedback!


texts: Our product price is down near the add to cart button but I would like it up by the sku. Is there an easy way to do this that I am missing?


texts:
I have the following in my di.xml

<type name="Magento\Sales\Model\Order">
    <plugin name="Module_OrderAfterSave" type="Vendor\Module\Plugin\OrderAfterSave" sortOrder="10" disabled="false" />
</type>

If I pay via credit card or by check/money order then my plugin works and my function gets call.

However if I pay via Paypal my afterSave function never gets called. Anyone know why?

The orders for paypal are going through fine  its just not running my plugin :-(


texts: Magento2 Braintree not showing on checkout when in Dev, Live and Test servers using either sandbox or production mode

texts: We have setup a Braintree payment method and its working ok when on local but when we tried to setup it in our dev, test and live sites the Braintree is not showing on checkout page using either sandbox or production mode. Does anyone have the same issue and solved it? Thanks.


texts: After Migration Layer Navigation not Showing Magento 1.9 to Magento 2.3.1

texts:
After the migration of magento 1 to magento 2.3.1 Layernavigation not showing on any category pages. I have checked category is set to Anchor:yes. Also Price attribute value visible on layered navigation:yes

I look into the log files but not generate any logs.
Any kind of help will appreciated.


texts:
How can we show a checkbox at checkout if the customer wants to pick up their products at the store itself instead of getting it shipped to their address?

Can we do this without buying an extension for this?


texts: How to add to cart different store's product in one cart only magento 2.3?

texts:
I've created 5 stores in Magento 2, I want to add products of those stores in one cart only and different shipping method of the different store on one checkout page.

Now my questions:

What should be the proper configuration of stores to achieve this?
Is it possible to achieve this in Magento 2?


texts:
I have created new custom tabs on my product pages (Datasheets, Ask A Question and Returns and delivery). At the moment in my Datasheet tab it displays the PDF or datasheet for that product but if there is no datasheet in the tab is displays a message. Is there any way iu can get the tab to hide if there isnt a datasheet in the tab instead of diaplying a message??

This is how the tab is created :

<reference name="product.info.additional">
            <action method="unsetChild" ><name>product_tag_list</name></action>
            <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs">
                <action method="setTemplate" ><template>catalog/product/view/tabs.phtml</template></action>
        <action method="addTab" translate="title" module="catalog" ><alias>pdf_tabbed</alias><title>Data Sheets</title><block>catalog/product_view_attributes</block><template>catalog/product/view/pdf.phtml</template></action>
                </block>
</reference>

This is my phtml file. This is what is displayed in the tab.

<?php $_pdf = $this->getProduct()->getPdf(); ?>
<?php if ($_pdf): ?>

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

        <?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_pdf, 'pdf') ?>

<?php else: ?>
    Sorry but there's no Data Sheet associated with this product!
<?php endif; ?>

Thank you if you can help or point me in the right direction.


texts:
After creating and deploying a new module following this article, no theme loaded anymore.
I've tried to change the theme to luma or my custom theme, but there is no effect.

What can I do to enable displaying any theme?


texts: Magento 2 Swatches on Product List by on click more go to the product details page

texts:
Swatches on product listing page on clicking more I want to redirect to the product detail page
How should I get product URL on vendor/magento/module-swatches/view/base/web/js/swatch-renderer.js file
can anyone help me with this
Screenshot: https://ibb.co/wdXcQCz


texts: How to add js libraries to Magento 2 extension via composer?

texts:
I'm wondering is there a way to add third-party js libraries to Magento 2 via Composer?

The main idea of this is to separate our modules from those dependencies and to have them required via Composer instead of having them inside modules.

For example, I'm going to implement a Magento 2 module. I would like to use 3rd-party js library to have a user-friendly chart.

How should I use the library in my module?

For now, I see one way only:

Add the library to files of the module


texts: Magento 2: Need to remove Alaska and Hawaii state for shipping state dropdown on checkout page

texts: How to remove Alaska and Hawaii states for shipping state drop down on checkout page?


texts: Magento 2: Allowed memory size exhausted

texts:
I'm running my custom script on Magento 2. It gives below error.

PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /home/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /home/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /home/magento/vendor/magento/framework/Session/SessionManager.php on line 139
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /home/magento/vendor/magento/framework/Session/SessionManager.php on line 139

Do I need to set

ini_set('memory_limit', '6G');

?

On the start of script or need to change in php.ini


texts: Assign customer to group based on product bought

texts: Is it possible via some extension or modification to assign customer to a customer group based on the product he buys? For example if we have a "Membership 2015" product and we need to automatically assign customers who buy that product to the "Members 2015" customer group. This way we could set up a catalog price rule that would give discounts for any customers that belong to the Members 2015 group.


texts: addAttribbuteToFilter size doesn't match with the object in side it

texts:
I tried to use the addAttributeToFilter like the example below:
$_productCollection = $block->getLoadedProductCollection()->addAttributeToFilter('discontinued', 1);
echo($_productCollection->getSize());
echo($_productCollection->count());
foreach ($_productCollection as $product) {
    echo($product->getName());
}

The attribute discontinued is a yes/no field. The origin $_productCollection has two products and one of the product's attribute discontinued is set to be yes.
The first two echo are 1, but the echo in the loop prints productName1 and productName2. I think the filter should be working but somehow when I traverse the for loop, all products are printed out. How is this supposed to happen?


texts:
I want to adjust a widget and I think this is the code for it in widget.xml (below)

Is this where i can adjust/remove the title text that is placed everytime i place the widget in a block?

<widgets>
<sales_widget_guestfrom type="sales/widget_guest_form" translate="name description" module="sales">
    <name>Orders and Returns</name>
    <description>Orders and Returns Search Form</description>
    <is_email_compatible>1</is_email_compatible>
    <parameters>
        <title translate="label">
            <visible>0</visible>
            Anchor Custom Title
            <type>text</type>
        </title>
        <template>
            <required>1</required>
            <visible>1</visible>
            Template
            <type>select</type>
            <value>sales/widget/guest/form.phtml</value>
            <values>
                <default_template translate="label">
                    Default Template
                    <value>sales/widget/guest/form.phtml</value>
                </default_template>
            </values>
        </template>
    </parameters>
    <supported_blocks>
        <left_column>
            <block_name>left</block_name>
            <template>
                <default>default_template</default>
            </template>
        </left_column>
        <right_column>
            <block_name>right</block_name>
            <template>
                <default>default_template</default>
            </template>
        </right_column>
    </supported_blocks>
</sales_widget_guestfrom>


texts:
I'd like to use the Magento's print feature in my module to have the invoice pdf of a programmatically created order. For that I'd like to get the url that Magento back end uses to print the invoice.
eg : http://localhost/magento1/index.php/admin/sales_order_invoice/print/invoice_id/104/key/eaf550ef39cc92e93b562994019fde14/

My question is how can I get that key to build the url that retrieves the invoice pdf ?


texts: Attribute Set Save button Error : Uncaught TypeError: Cannot read property 'strip' of null

texts:
If i try to click save attribute set button, i am getting error like,

How can i solve the error?


texts: how we can get product by category from collection


texts:
I've created a faqs.xml for a bespoke page template and this is my code:

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="empty"/>
    <referenceContainer name="page.wrapper">
        <container name="header.container" as="header_container" label="Page Header Container" htmlTag="header" htmlClass="page-header" before="main.content"/>
        <container name="page.top" as="page_top" label="After Page Header" after="header.container"/>
        <container name="faqs.content" as="faqs_content" label="FAQs Content" after="page.top"/>
        <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer pd-footer"/>
    </referenceContainer>
    <referenceContainer name="page.top">
        <block class="Magento\Framework\View\Element\Template" name="hero-title-content" template="Magento_Theme::html/hero-title-content.phtml" after="usps"/>
    </referenceContainer>
    <move element="breadcrumbs" destination="hero-title-content" />
    <move element="page.main.title" destination="hero-title-content" />
    <referenceContainer name="faqs.content">
        <block class="Magento\Framework\View\Element\Template" name="faqs" template="Magento_Theme::html/faqs.phtml" after="-" />
        <block class="Magento\Framework\View\Element\Template" name="call-to-actions" template="Magento_Theme::html/call-to-actions.phtml" after="-" />
    </referenceContainer>
</layout>

I am trying to move the breadcrumbs and page title into the hero-title-content block however the above doesn't seem to work?

Can anyone please advise why this isn't working?

EDIT:

Managed to resolve the breadcrumbs not moving, this was due to another move reference in the default.xml. Unsure about the page title as I haven't move this in my default.xml


texts: Installing Varnish and Elastic Search on a separate server

texts:
I recently got a separate server because I heard that it is a more efficient way to run elastic search and varnish caching. I currently have a web server that runs everything on it. I have a few questions about how to get this setup properly in my magento settings. I'm using Magento 2.1.4

Does the elastic search service have to run on the same server as the mysql database?

Would I put the public ip and port for the separate server in the backend host and port settings? Will I need to do anything else?

Since I now have this server, are there any recommendations for how I can vastly improve the speed and performance of my magento 2 website?


texts: How to get the bundle product options via SOAP api?

texts:
This one is making me feel right stupid!

I can see how to add product options when creating a product over the API, as catalogProductCustomOptionAdd describes fields for options like sku etc.

But I don't want to add, i just want to make product information available - and here when I look at my product information over soap... i can't seem to get options for my bundles

catalogProductCustomOptionList (or more precisely $client->catalogProductCustomOptionList($sess_id, $productid,1); )  returns empty array(0) {}

my basic product information clearly reports it has options: $client->catalogProductInfo($sess_id, $productid) correctly returns ["has_options"]=> string(1) "1"

so where are they?

What am I missing, What's the way to get the options from a bundle?

Or is it another thing not available in API?


texts: Can I use an observer to insert my module block into product.info?

texts:
I want my custom block to be dependent on whether my module is enabled or not and I want do not want it to be dependent on a theme so using the following, for example, is out of the question: /catalog/product/view.phtml - using getChild().

I am attempting to add a block to product.info. I can update the product page without modifying any default template files if I use  but, of course, if I use....

 <reference name="product.info">

I cannot show it unless I add a getChild() method to /catalog/product/view.phtml.

Module config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Importer_Nutrition>
            <version>0.1.5</version>
        </Importer_Nutrition>
    </modules>
    <global>
        <models>
            <nutrition>
                <class>Importer_Nutrition_Model</class>
            </nutrition>
        </models>
    </global>
    <frontend>
        <routers>
            <nutrition>
                <use>standard</use>
                <args>
                    <module>Importer_Nutrition</module>
                    <frontName>nutrition</frontName>
                </args>
            </nutrition>
        </routers>
        <!-- Establish Layout Rules -->
        <layout>
            <updates>
                <nutrition>
                    <file>Importer/Nutrition/product_view.xml</file>
                </nutrition>
            </updates>
        </layout>
    </frontend>
    <crontab>
        <jobs>
            <Importer_Fetch_Nutrition_Info>
                <schedule>
                    <cron_expr>0 2 1,5 * *</cron_expr>
                </schedule>
                <!-- Stocks are being added to database every 30 minutes at H:01 and H:31
                it can take up to 5 minutes to finish, so we are waiting ten minutes after each import -->
                <run>
                    <model>nutrition/Fetchnutritioninfo::run</model>
                </run>
            </Importer_Fetch_Nutrition_Info>
        </jobs>
    </crontab>

</config>

[theme]/layout/Importer/Nutrition/product_view.xml

 <layout version="0.1.0">
<catalog_product_view translate="label">
    <reference name="product.info">
        <block type="catalog/product_view_description" name="product.nutritionLabel" after="product.description" template="Importer/Nutrition/catalog/product/view/nutritionLabel.phtml" />
    </reference>
</catalog_product_view>

Can I use an observer to accomplish this?


texts:
I want to Add All my customers Data in Elasticsearch Like Products and Category
i want to where should i start and how i can map data
Thank you


texts:
I am afraid of  upgrading my magento version because my store is all setup. My php version is 7.3.20 and I thinking of upgrading to
magento version 2.4.0

composer require magento/product-community-edition=2.4.0 --no-update

Will it cause conflicts?


texts: How to display customer email in order grid?

texts:
I need to display customer-email and product-name in admin panel order grid
but my code return error.


texts: Magento 1.9.2 - I do not want to show username, password, host and port in PHPMailer using SMTP

texts:
At the moment we have this code to send emails with phpmailer via smtp. How can I make it work without showing username, password, host and port? I do not want to show my credentials in the file :

require_once "Mail.php";
$from = "myemail@email.com";
$to = "test@email.com";

$subject = "Test";
$body = "Hello";
$host = "mail.mysite.com";
$port = "myport";
$username = "myemail@email.com";
$password = "my_password";
$headers = array ('From' => $from,
  'To' => $to,
  'Subject' => $subject);
$smtp = Mail::factory('smtp',
  array ('host' => $host,
    'port' => $port,
    'auth' => true,
    'username' => $username,
    'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
  echo($mail->getMessage());
 } else {
  echo("success!");
 }

Thanks !


texts: How to make order summary block in checkout as sticky in magento 2.3.3?

texts: I want to make that order summary as sticky. How to do that?


texts: Magento - How to remove color swatch if the product is disabled?

texts:
For Example,There is a product with attribute color - Black,Blue,Red. If the associated product with color Black is disabled, it should not display black color swatch.
But it displays color swatch(although disabled). How to remove it?
Using - Magento default ColorSwatches and theme rwd.


texts: Best way to use CRUD for a custom module in the frontend

texts:
I want to know the best way to implement CRUD for a custom module in the front end.Basically there is new and edit custom form in the front end.The user's input is stored in the database created with the module and operations are carried out in the controller and custom blocks to meet the requirements of CRUD.So operations are performed using ID's to know which row in the database is to be updated or deleted.

Everything is custom made i.e. a custom model is being used for storing the data read from the front end using a custom form.And all operations are done using custom controllers,helpers,layout etc.The data that I am working with is customers data read from the form and form is present in the my account section for logged in customers.I am also using update handle="customer_account" for the layouts.

So I basically want to learn how to implement CRUD efficiently in magento for something like this.


texts: How i can translate the label "browse files" and "upload files"?

texts:
I need translate the label "browse files" and "upload files" for a extension which uses default uploader of magento.

In Mage_Adminhtml_Block_Media_Uploader i changed the function _prepareLayout()

protected function _prepareLayout()
{
    $this->setChild(
        'browse_button',
        $this->getLayout()->createBlock('adminhtml/widget_button')
            ->addData(array(
                'id'      => $this->_getButtonId('browse'),
                'label'   => Mage::helper('adminhtml')->__('Browse Files...'),
                'type'    => 'button',
                'onclick' => $this->getJsObjectName() . '.browse()'
            ))
    );

    $this->setChild(
        'upload_button',
        $this->getLayout()->createBlock('adminhtml/widget_button')
            ->addData(array(
                'id'      => $this->_getButtonId('upload'),
                'label'   => Mage::helper('adminhtml')->__('Upload Files'),
                'type'    => 'button',
                'onclick' => $this->getJsObjectName() . '.upload()'
            ))
    );

    $this->setChild(
        'delete_button',
        $this->getLayout()->createBlock('adminhtml/widget_button')
            ->addData(array(
                'id'      => '{{id}}-delete',
                'class'   => 'delete',
                'type'    => 'button',
                'label'   => Mage::helper('adminhtml')->__('Remove'),
                'onclick' => $this->getJsObjectName() . '.removeFile(\'{{fileId}}\')'
            ))
    );

    return parent::_prepareLayout();
}

to

protected function _prepareLayout()
{
    $this->setChild(
        'browse_button',
        $this->getLayout()->createBlock('adminhtml/widget_button')
            ->addData(array(
                'id'      => $this->_getButtonId('browse'),
                'label'   => Mage::helper('adminhtml')->__('Buscar Archivos'),
                'type'    => 'button',
                'onclick' => $this->getJsObjectName() . '.browse()'
            ))
    );

    $this->setChild(
        'upload_button',
        $this->getLayout()->createBlock('adminhtml/widget_button')
            ->addData(array(
                'id'      => $this->_getButtonId('upload'),
                'label'   => Mage::helper('adminhtml')->__('Subir Archivos'),
                'type'    => 'button',
                'onclick' => $this->getJsObjectName() . '.upload()'
            ))
    );

    $this->setChild(
        'delete_button',
        $this->getLayout()->createBlock('adminhtml/widget_button')
            ->addData(array(
                'id'      => '{{id}}-delete',
                'class'   => 'delete',
                'type'    => 'button',
                'label'   => Mage::helper('adminhtml')->__('Remove'),
                'onclick' => $this->getJsObjectName() . '.removeFile(\'{{fileId}}\')'
            ))
    );

    return parent::_prepareLayout();
}

but without results


texts: How to get pdf in sales_order_invoice_save_after observer

texts:
I want to fire the invoice_print button action in sales_order_invoice_save_after  observer pogrammatically.
That means I want to download the invoice pdf on when i click the submit invoice button instead on click Print button in invoice view.

My observer event code is :

$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array($invoice));
$pdf->render();
$pdf->save('invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf');

This code save invoice pdf in magento root folder but I want to download it on my PC.

For using _prepareDownloadResponse function my model function code is:

require_once('app/code/local/Assel/Sms/controllers/adminhtml/IndexController.php');
$controller         = new Assel_Sms_Adminhtml_IndexController(
                            Mage::app()->getRequest(),
                            Mage::app()->getResponse()
                        );
$request            = $controller->getRequest();
$response           = $controller->getResponse();
$controller->printAction($invoice_id);
//echo $response;

My controller Action is :

$invoice = Mage::getModel('sales/order_invoice')->load($invoice_id);
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array($invoice));
$this->_prepareDownloadResponse('invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
            '.pdf', $pdf->render(), 'application/pdf');

When I echo $response then it download pdf on submit invoice button but it break invoice page redirection to order view page.

How do I do that?