texts:
I'm currently working in the success.phtml file. I need to get the name from the shipping address the user put in. I used to have code that would only grab the username of the user and would display Guest for a name if the user was not logged in. So I decided the name from the shipping address would most likely be the correct one to get. Here is the code I am using.

<?php
$grayson_order_id = $this->getOrderId();
$order = Mage::getModel('sales/order')->load($grayson_order_id);
$custname = $order->getBillingAddress()->getName();
?>

But the page crashes at $custname = $order->getBillingAddress()->getName();

I don't think it really matters but im running Magento EE 1.13

I'm sure it's something simple I'm missing, or I'm simply calling the wrong method.
Any help is appreciated.


texts: how to disable di.xml virtual types from vendor in custom module

texts:
I am currently experiencing an issue where a vendor module is using MSI, however we needed to disable it via composer completly ( magento 2.3.4 )
The vendor module in question is the amasty layered navigation module ( amasty/shopby) which in the di.xml has the following declarations:
        <arguments>
            <argument name="name" xsi:type="string">Magento\InventorySalesApi\Api\StockResolverInterface</argument>
        </arguments>
    </virtualType>

    <virtualType name="defaultStockProvider" type="Amasty\ShopbyBase\Model\Di\Wrapper">
        <arguments>
            <argument name="name" xsi:type="string">Magento\InventoryCatalogApi\Api\DefaultStockProviderInterface</argument>
        </arguments>
    </virtualType>

    <virtualType name="stockIndexTableNameResolver" type="Amasty\ShopbyBase\Model\Di\Wrapper">
        <arguments>
            <argument name="name" xsi:type="string">Magento\InventoryIndexer\Model\StockIndexTableNameResolverInterface</argument>
        </arguments>
    </virtualType>

    <type name="Amasty\Shopby\Plugin\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider">
        <arguments>
            <argument name="stockResolver" xsi:type="object">stockResolver</argument>
            <argument name="defaultStockProvider" xsi:type="object">defaultStockProvider</argument>
            <argument name="stockIndexTableNameResolver" xsi:type="object">stockIndexTableNameResolver</argument>
        </arguments>
    </type>```

Instead of commenting them out on the ```vendor/amasty/shopby/di.xml``` how is it possible to override that in a custom module and disable them ?


texts: Add to cart / checkout performance issues

texts:
I am getting slow page loads (upwards of 7 - 10 seconds) when a visitor adds a product to their cart. The rest of my site loads quickly having already implemented: APC, MEMCACHED and just recently VARNISH with the TURPENTINE module.

The magento 1.8.0 installation is running on a dedicated server with dual Xeon processors, 12GB RAM, SAS RAID 5 configuration.

CentOS 6.5 64bit (all applicable updates)
PHP: 5.3.3
MySQL: 5.1.71

I've run the MySQL Tuner script (https://github.com/major/MySQLTuner-perl) + MySQL Tuning Primer Script (https://launchpad.net/mysql-tuning-primer/+download) and implemented all the recommendations.

Troubleshooting:

Enabled the Profiler in the Admin panel and have discovered a few bottle necks that seem to be slowing down the add to cart:

CODE PROFILER   TIME    CNT   EMALLOC   REALMEM
mage             7.9598   1      0         0
.
.
mage::dispatch::controller::action::checkout_cart_index 7.9071 1 0 0
.
DISPATCH EVENT:sales_quote_address_collect_totals_before   4.7420 2 2,418,224 3,145,728
.
OBSERVER: auto_add_on_coupon_insertion 4.7411 2 2,388,872 3,145,728

Slow Query Log:

# Query_time: 4.962430  Lock_time: 0.000184 Rows_sent: 1  Rows_examined: 52391
SET timestamp=1390674352;
SELECT COUNT(DISTINCT e.entity_id) FROM `catalog_product_flat_2` AS `e`
INNER JOIN `catalog_category_product_index` AS `cat_index` ON      cat_index.product_id=e.entity_id AND cat_index.store_id='2' AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '2'
 INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0 WHERE (((((e.news_from_date <= '2014-01-25 23:59:59') OR (e.news_from_date IS null))))) AND (((((e.news_to_date >= '2014-01-25 00:00:00') OR (e.news_to_date IS null))))) AND ((`e`.`news_from_date` IS not null) OR (`e`.`news_to_date` IS not null));

Given the above results of the Profiler and Slow Query Log, what would be the next recommended course of action? How can I get the add to cart load times down? I'm sure a lot of people can benefit from this.

Note: This is with zero load, only myself performing actions in the front end.

UPDATE (AM)

After more tweaking of the my.cnf the site was still sluggish on Add to Cart.  This morning when trying to login to the admin panel, it was taking over 5 minutes to login at which point I restarted mysqld. Still the same. Add to Cart was the same as well (5 minutes +).

I cleared out the

/var/cache/
/var/locks/
/var/session/

Now the site is lightening fast here are the new profiler results:

mage 0.7792 1 0 0

UPDATE 2 (PM)

Site has slowed back down over the course of the day:

mage 8.4715 1 0 0

Clearing the /var/cache returned it back to .7 seconds on add to cart..

Why would this make such a huge difference in performance? Is it recommended to periodically clear out these directories and restart the services?

Cron is running regularly. Thanks!


texts: Magento2 : How To Solve $(...).down(...) is undefined error in admin

texts: Does anyone know how i can solve this error?


texts: Recurring Payments with Website Payments Pro (Payflow Edition)

texts:
We have an old v1.4.0.1 store and would like to process recurring payments using our current Website Payments Pro (Payflow Edition) setup.

Can this be done?


texts: Safe to change Website ID and Store ID directly in table customer_entity?

texts:
Is it safe to change Website ID and Store ID directly in table customer_entity? I can't change it in the backend on the customer information, because it's greyed out. The multistore setup is not using shared accounts across the websites, if thats the case.

Customer Account Details Example (Associate to Website disabled):

Thanks in advance,


texts: i have Warning in my admin front view when i remove the underscore then front view is not loading as befaore

texts:
WARNING | Property name "$_template" should not be prefixed with an underscore to indicate visibility

 <?php

namespace Marstranslation\Marstranslation\Block\Adminhtml\System\Config\Form\Field;

use Magento\Backend\Block\Template\Context;
use Magento\Config\Block\System\Config\Form\Field;
use Magento\Framework\Data\Form\Element\AbstractElement;

class LogoutSubmit extends Field
{
    /**
     * @var string
     */
    public $_template = 'Marstranslation_Marstranslation::system/config/logout_submit.phtml';
    private $dataHelper;
    /**
     * @param Context                                      $context
     * @param \Marstranslation\Marstranslation\Helper\Data $dataHelper
     * @param array                                        $data
     */
    public function __construct(
        Context $context,
        \Marstranslation\Marstranslation\Helper\Data $dataHelper,
        array $data = []
    ) {
        $this->dataHelper = $dataHelper;
        parent::__construct($context, $data);
    }

    /**
     * Remove scope label
     *
     * @param  AbstractElement $element
     * @return string
     */
    public function render(AbstractElement $element)
    {
        $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
        return parent::render($element);
    }
    /**
     * Return ajax url for loginSubmit button
     *
     * @return string
     */
    public function getAjaxUrl()
    {
        return $this->getUrl('marstranslation/system_config/logout/');
    }

    /**
     * Generate loginSubmit button html
     *
     * @return string
     */
    public function getButtonHtml()
    {
        $button = $this->getLayout()->createBlock(
            'Magento\Backend\Block\Widget\Button'
        )
            ->setData(
                [
                'id' => 'marsLogoutSubmit',
                'label' => __('Logout'),
                'class' => 'action-primary'
                ]
            );

        return $button->toHtml();
    }
}


texts:
I would like to generate the product SKU automatically for every product created in admin panel.

I have found this extension which works to generate the SKU based on product name and it's category, but I would like to change it in such a way where the firs 4 characters of the SKU are it's manufacturer name.

Can anyone help?

--> https://github.com/vijays91/Magento-Auto-SKU-Generator.git


texts: Where do I click to send an Order Update email? I'd like to send an email to the customer when I post out their item.


texts: Magento 2 create admin form selected option depend on another selected option

texts:
I have created an module for admin which have admin form and this form have some fields.I have two select option drop down fields.If I choose first dropdown option value then second drop-down display some values and if I choose another option then value should be different.

I have search on forums but not found any solution.Please help me.

screenshot are attached.


texts: Binding Click to select widget in Admin Panel

texts:
Has any of you successfully binded click to admin panel select widget? Or have idea how to?

So far I've successfully binded click on admin panel button widget (I've added code in its action method), but, AFAIK, select widget does not have action method....

EDIT:
Here is my select definition from xml:

<field name="country">
<argument name="data" xsi:type="array">
    <item name="options" xsi:type="object">Company\StoreLocator\Model\Config\Source\ListCountry</item>
    <item name="config" xsi:type="array">
        <item name="dataType" xsi:type="string">text</item>
        <item name="label" xsi:type="string" translate="true">Country</item>
        <item name="formElement" xsi:type="string">select</item>
        <item name="source" xsi:type="string">storelocator</item>
        <item name="sortOrder" xsi:type="number">3</item>
        <item name="dataScope" xsi:type="string">country</item>
        <item name="component" xsi:type="string">Company_StoreLocator/js/fetchStates</item>
        <item name="validation" xsi:type="array">
            <item name="required-entry" xsi:type="boolean">true</item>
        </item>
    </item>
</argument>

fetchStates.js is default file copied from module-ui/.../web/js/form/element/select.js . I've tried to add listeners to initializers, but failed...


texts:
When i load the site with https, the browser informed that "Block loading mixed active content". I see the view source, many of the url in http. But i used

Contact Us

why when accessing https, the url is not change to https?


texts: Trying to add static block to customer logout page, block is displaying twice

texts:
How do I add a static CMS block to the customer logout page? I have it somewhat working, but the content of my CMS block shows twice:

I setup a CMS block called logout_message with a bit of html in there.
Added this to my local.xml

Customer Account Logout Success

<remove name="right"/>

<remove name="left"/>

<reference name="root">

    <action method="setTemplate"><template>page/1column.phtml</template></action>

</reference>

<reference name="content">

    <block type="core/template" name="customer_logout" template="customer/logout.phtml">

        <block type="cms/block" name="logout_message" as="logout_message">

            <action method="setBlockId"><block_id>logout_message</block_id></action>

        </block>

    </block>

</reference>

created my template/customer/logout.phtml:

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

As I said the content of the static block shows twice - why? Small update - it actually outputs the content of the entire logout.phtml file, not just the CMS block.


texts:
I would like to make a mass modification to attribute sets. I would like to add a series of attributes among those not yet assigned to the attributes set (200) in the "General" section.

I would like to make this change from the database.
Can anyone help me on how to proceed? What tables contain this data?

I must repeat the operation in the photo for 200 set of attributes, assigning each part a portion of unassigned attributes


texts:
in my case there is a picture inside my module and I want to get that image inside an HTML file (it's an html file for email header), but when I use Magento syntax it doesn't appear, I have got the page blank without the alt attribute displayed, that means it is there but the page still blank
I have tested with a simple link src="https://www.w3schools.com/html/pic_trulli.jpg" it works
but not with this :
src="<?php echo $this->getViewFileUrl('Vendorname_Core::images/pic.png'); ?>"

can anyone help me, please?
update:
my file inside app/design dir  to override : vendor/magento/module-email/view/frontend/email/header.html:

                        <img src="<?php echo $this->getViewFileUrl('Mymodule_Email::images/logo.png'); ?>"
                        />


texts: Magento 2 : Related Products in product view page

texts: Iam adding related products to particular product through admin in magento 2 but its not displaying in products view page.i want to show it in product view page. Can anyone help me


texts: How to pass data to another ui components DataProvider

texts:
I have a grid UI component which is inside fieldset of some edited form. I need to pass an entity_id from the edit form to grid where an I can filter collection of some items by some value, and grid will show appropriate result.
I created the grid component using an insertListing component.

<insertListing name="slide_grid">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="autoRender" xsi:type="boolean">true</item>
                <item name="source" xsi:type="string">slide</item>
                <item name="loading" xsi:type="boolean">true</item>
                <item name="dataScope" xsi:type="string">some_slider_slide_listing</item>
                <item name="externalProvider" xsi:type="string">${ $.ns }.some_slider_slide_listing_data_source</item>
                <item name="ns" xsi:type="string">some_slider_slide_listing</item>
                <item name="externalData" xsi:type="string">id</item>
                <item name="imports" xsi:type="array">
                    <item name="slider_id" xsi:type="string">${ $.provider }:data.entity_id</item>
                </item>
                <item name="exports" xsi:type="array">
                    <item name="slider_id" xsi:type="string">${ $.externalProvider }:params.slider_id</item>
                </item>
            </item>
        </argument>
    </insertListing>

For transfering data to external dataProvider I am using

<item name="exports" xsi:type="array">
                <item name="slider_id" xsi:type="string">${ $.externalProvider }:params.slider_id</item>
            </item>

Inside my external data provider i trying to get the data through request.

$this->request->getParam('slider_id');

But nothing. On frontend, i found that Magento sending ajax request with my parameter but I can't catch this in my DataProvider and filter the collection.


texts: Magento time zone issue - My orders are displaying different time in Sales order Grid & in created date

texts:
I am getting an issue in Magento1.

My orders are displaying different date & time under Sales order Grid & sales_flat_order.

In admin time is Order # 100311386 | Feb 25, 2020 11:54:01

For same order

sales_flat_order, created_at it is 2020-02-26 04:54:01

Now when I use sales_flat_order.created_at in sql query for displaying custom reports in Admin it takes 2020-02-26 04:54:01 & not Feb 25, 2020 11:54:01

I need to know how can I convert the database time to admin time in sql query.

Following is my query

SELECT
*,
pac.value AS model FROM
sales_flat_order_item AS oi,
catalog_product_entity_varchar AS pac,
sales_flat_order AS o,
catalog_product_entity_int AS pa WHERE
pac.entity_id = oi.product_id AND oi.product_id = pa.entity_id AND o.entity_id = oi.order_id AND pac.attribute_id = 145 AND pa.attribute_id = 172 AND o.created_at BETWEEN '2020-02-25 00:00:00' AND '2020-02-25 23:59:59' AND(
    IF(
        o.from_site = 'amazon',
        oi.product_type = 'simple',
        oi.product_type = 'configurable'
    )
) ORDER BY


texts: Magento API SOAP v2 : faultcode Receiver, faultstring Uknown Error

texts:
I'm getting a SOAP error (v2, WS-I Compliant) that I'm having trouble debugging. I'm getting a "Receiver, Unknown Error", which the header shows to be a 500 Server Error and appears as such in my nginx logs:

127.0.0.1 - - [02/Jan/2015:18:20:18 +0000] "GET /index.php/api/v2_soap/index/?wsdl=1 HTTP/1.1" 200 354035 "-" "-"
12.123.1.12 - - [02/Jan/2015:18:20:18 +0000] "POST /index.php/api/v2_soap/index/ HTTP/1.1" 500 273 "-" "PHP"

I can do other calls, for instance a salesOrderInfo request will work, but this salesOrderCreateInvoice fails.

Any suggestions on how to debug something so vague?

LAST REQUEST HEADERS:

POST /index.php/api/v2_soap/index/ HTTP/1.1
Host: shop.example.com
Connection: Keep-Alive
User-Agent: PHP
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 489
Cookie: PHPSESSID=q2fsubqee1r43kdoa1v3o3eai0;CUSTOMER=deleted;CUSTOMER_INFO=deleted;CUSTOMER_AUTH=deleted;

LAST REQUEST:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento">
<SOAP-ENV:Body>
    <ns1:salesOrderInvoiceCreateRequestParam>
    <sessionId>2cb4af977b083e51b64e1a2f156136fa</sessionId>
    <invoiceIncrementId>200000255</invoiceIncrementId>
        <itemsQty>
            <complexObjectArray>
                <order_item_id>985</order_item_id>
                <qty>1</qty>
            </complexObjectArray>
        </itemsQty>
    </ns1:salesOrderInvoiceCreateRequestParam>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

LAST RESPONSE HEADERS:

HTTP/1.1 500 Internal Service Error
Server: nginx/1.6.2
Date: Fri, 02 Jan 2015 16:33:05 GMT
Content-Type: text/xml; charset=utf-8
Content-Length: 273
Connection: keep-alive
X-Powered-By: PHP/5.4.33
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=q2fsubqee1r43kdoa1v3o3eai0; expires=Fri, 02-Jan-2015 16:48:04 GMT; path=/; domain=shop.example.com; secure; httponly
Set-Cookie: CUSTOMER=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=shop.example.com; secure; httponly
Set-Cookie: CUSTOMER_INFO=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=shop.example.com; secure; httponly
Set-Cookie: CUSTOMER_AUTH=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=shop.example.com; secure; httponly

LAST RESPONSE:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
    <SOAP-ENV:Fault>
        <faultcode>Receiver</faultcode>
        <faultstring>Unknown error</faultstring>
    </SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


texts: Get page URL from current page, different store-view

texts:
I'm using different store-views to create different language versions of a shop. Now I'm trying to add links to the other pages. However, I can not find a way to get the actual URL from the other store, if the url of that page / product / category is changed for that store (in this case, translated). I've got the following code at this moment:

<?php
// Get the current website
$website = Mage::app()->getWebsite();
// Only get languages/stores from the current website
$stores = $website->getStores();
// loop through the stores
foreach ($stores as $_lang):
    // If it's not the current store, create an alternative for it
    if( $_lang->getId() != Mage::app()->getStore()->getStoreId() ){
        // Get the language code for that store view
        $lang_code = substr(Mage::getStoreConfig('general/locale/code', $_lang->getId()),0,2);
        // Create a link, using getCurrentUrl for the set store ?>
        <link rel="alternate" hreflang="<?php echo $lang_code; ?>" href="<?php echo $_lang->getCurrentUrl(); ?>" />
    <?php } ?>
<?php endforeach; ?>

However, this returns the same URL, with a ?___store=fr&___from_store=nl at the end. It should however give the URL from the different store, which has a different url key.
I've also tried the following:

Mage::getUrl('', array(
    '_current' => true,
    '_use_rewrite' => true,
    '_secure' => true,
    '_store' => $_lang->getId(),
    '_store_to_url' => true
));

But this gave the exact same results.

Is there a way to retrieve the right URL without having to use a redirect?


texts: Update product price before placing order

texts:
I am running a Magento site for selling Gold coins. As the Gold rate change on the regular basis, I am updating the product price on the regular basis.

I want to customise the checkout page, so that I receive the order with latest Gold rate. That means, price of the product get update just after submitting the order.

Questions

which event must I observe? (experiences..?)
how do I update the price?
Is it better to update the real product price instead of the quote?

Any one please suggest, what would be the best approach and how I can customise the checkout query to update the product price with Gold API ?

Here's my code for custom checkout:

CustomPriceUpdate_Checkout.xml
Path: app/etc/modules/CustomPriceUpdate_Checkout.xml

    <?xml version="1.0"?>
<config>
    <modules>
        <CustomPriceUpdate_Checkout>
            <codePool>local</codePool>
            <active>true</active>
            <depends>
                <Mage_Catalog />
            </depends>
        </CustomPriceUpdate_Checkout>
    </modules>
</config>

Config.xml
Path: app/code/local/CustomPriceUpdate/Checkout/etc/config.xml

    <?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
    <CustomPriceUpdate_Checkout>
        <version>0.0.1</version>
    </CustomPriceUpdate_Checkout>
</modules>
<global>
    <models>
        <myCustomPriceUpdate_Checkout>
            <class>CustomPriceUpdate_Checkout_Model</class>
        </myCustomPriceUpdate_Checkout>
    </models>
    <events>
        <sales_order_place_before>
            <observers>
                <modify_product_price>
                    <type>singleton</type>
                    <class>myCustomPriceUpdate_Checkout/observer</class>
                    <method>update_price</method>
                </modify_product_price>
            </observers>
        </sales_order_place_before>
    </events>
</global>
</config>

Observer.php:
Path: app/code/local/CustomPriceUpdate/Checkout/Model/Observer.php

 <?php
class CustomPriceUpdate_Checkout_Model_Observer{
  public function update_price($observer){
    $quote = $observer->getEvent()->getQuote();
   foreach ($quote->getAllItems() as $item) {
       $product = $item->getProduct();//if you need it
       $additional = 23;
       $finalPrice = $item->getOriginalPrice() + $additional;
       $item->setCustomPrice($finalPrice);
       $item->setOriginalCustomPrice($finalPrice);
       $item->save();
     //your magic here.
    }
    $quote->save();
    Mage::log("Order is placed");
  }
}

My observer is working fine, as I can able to print the text in the log file by changing the observer to this:

class CustomPriceUpdate_Checkout_Model_Observer{
  public function update_price($observer){
    Mage::log("Order is placed");
  }
}

But my complete code not working. I am very sure my code in the observer is not correct.

Please someone correct me.


texts: shopialfb integration as part of default installation

texts:
Today I installed a fresh install of Magento 2.2.0 after downloading the zip from the magento site. After installing I got the following error message.

After a bit of investigating I found this is due to shopialfb facebook module which is apparently part of the core magento download.

Clicking this message takes me to the integrations page where I can see the integration for this module. I cannot delete this integration but I can activate it which appears to give it access to my categories and products.

I have three questions about this module

Is there a way to disable this error message without giving this module access? Or disable the module entirely without breaking core functionality?
Does activating this integration pose some sort of security risk? Many of the products on my clients store are being sold directly to other businesses and should not be visible to the public.
Why has this module become part of core? I am sure it has it's uses but it seems very much the sort of thing I would look for an extension for. I am not sure why it has been included as part of core.


texts:
In one page checkout we have a sequence for the tab. I changed the sequence by overwriting the block

        <checkout>
            <rewrite>
                <onepage>Ucs_OneStepCheckout_Block_Onepage</onepage>
            </rewrite>
        </checkout>

onepage.php as below

<?php
class Ucs_OneStepCheckout_Block_Onepage extends Mage_Checkout_Block_Onepage
{
    public function getSteps()
    {
        $steps = array();

        if (!$this->isCustomerLoggedIn()) {
            $steps['login'] = $this->getCheckout()->getStepData('login');
        }

        $stepCodes = array('review', 'billing', 'shipping');

        foreach ($stepCodes as $step) {
            $steps[$step] = $this->getCheckout()->getStepData($step);
        }
        return $steps;
    }

}

If I rearrange any other tab as first than review it is working fine, but if arrange review tab as first, still billing tab is getting loaded.

How can I show the review step as first step, then billing shipping?


texts: How to Show Products Custom attribute value in cart and checkout summary?

texts: I Have a custom attribute for all products. its integer types. and i want show attributes total value in cart and checkout summary. please help.


texts: Unable to mark Items as shipped, nothing under previously shipped items in shipments

texts:
When I click on the "Ship" button on the orders page there is nothing under "Items to Ship" it's just blank but everything above that appears to load normally.
Also If I go to the shipments page all the shipments that I was able to make before this problem are in the list but if I open any of them there is no information on the page just shipment No, date sent, email sent & the three buttons on the right.
I have a feeling it might have something to do with Redis cache which I have dissabled but still the same.


texts:
looking for some help. I have created a custom page with url:

http://localhost/magento2/hello_mvvm/hello/world

and here is a code from,

  view/frontend/layout/hello_mvvm_hello_world.xml

code:

 <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <referenceBlock name="content">
        <block
                template="content.phtml"
                class="Pulsestorm\HelloWorldMVVM\Block\Main"
                name="pulsestorm_helloworld_mvvm"/>
    </referenceBlock>
</page>

some how I need to add my custom created widget to my custom created above mentioned page in the footer container place, can some one assist me?

My custom widget placed in

  app/code/Toptal/CustomWidget

This is how my frontend/layout code looks like now where I'm trying to include custom widget: (i think missing name="" value, but I dont know correct what should be)

    <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <referenceBlock name="content">
        <block
                template="content.phtml"
                class="Pulsestorm\HelloWorldMVVM\Block\Main"
                name="pulsestorm_helloworld_mvvm"/>
    </referenceBlock>
    <referenceContainer name="footer-container">
        <block template="samplewidget.phtml"
               class="Toptal\CustomWidget\Block\Widget\Samplewidget"
               name=""/>
    </referenceContainer>
</page>


texts: Magento 2 - Multi Website on same domain with subdirectory

texts:
We have an nginx, varnish setup of a Magento 2.2.2. installation in production.

There are several websites which can be accessed via store view code. This looks like this:
domain.com/us/
domain.com/de/
domain.com/jp/
(show store view code is enabled)

Now we also want to add different languages so this means we need to add another subdirectory to the path.

This is what we want to achieve:
domain.com/us/en/
domain.com/us/es/
domain.com/de/de/
domain.com/jp/jp/
(these are examples, first subdirectory is website, second store view)

So I tried to change the base url and base url link to domain.com/us/
This works for the home page but all deeper links end in an redirect loop.

No nginx changes done so far. Was hoping it works simply with changing base urls.

Any suggestion how to achieve this?


texts: SOAP-ERROR: Parsing WSDL: Couldn't load from...... Document is Empty

texts:
We have Magento 1.9.2.4 and we have an extension which uses an API Url to fetch data to supply our cart with shipping charges for customers.

When we are at checkout and we arrive at the shipping step, it tries to load the shipping rates and we receive the following error.

it states it is trying to load from a rating file located in our var/tmp dir and when i go to that folder on ftp the file is there and it shows 0 bytes in size so it is in fact empty.

Has anyone come across this error and know of ways to find out what is causing this to happen?


texts: Magento 2 UiRegistry can't get component element

texts:
this my checkout_index_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="Asiantech_Postcode::css/jquery.Thailand.min.css"/>
    </head>
    <body>
        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="autocomplete" xsi:type="array">
                                    <item name="sortOrder" xsi:type="string">0</item>
                                    <item name="component" xsi:type="string">Vendor_Module/js/autocomplate</item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

autocomplete.js

define([
'jquery',
'uiComponent',
'Magento_Checkout/js/checkout-data',
'uiRegistry',
], function (
$,
Component,
checkoutData,
uiRegistry,
) {
"use strict";
console.log(uiRegistry.get('checkout.steps.shipping-step.shippingAddress.shipping-address-fieldset.postcode'));

return Component.extend({
    /**
     * Initialization method
     */
    initialize: function () {
        this._super();
    }
  });
});

but my result is `undefined',what's wrong with this component ?


texts:
I'm using OnTap extension Extension Link with magento 2.

I want to disable this payment based on product. After searching I found tutoriales like Magento 2: How to show/hide payment method on basis of amount but all of them not work with me. any Ideas please


texts:
Basically the loader inside this page does not disappear after the page is loaded, some have fixed this by fixing console errors (I have none) other by fixing their onepage.phtml (Looks good to me) with nothing else to go off i'm hoping to find some kind of solution here.

What the loader looks like before its fully loaded, looks normal.

What the loader looks life after, now missing its data-mage-init

Inside app\design\frontend\pcnametag\pcnametag_canada\Magento_Checkout\templates\onepage.phtml

            <img src="<?= /* @escapeNotVerified */ $block->getViewFileUrl('images/loader-1.gif') ?>"
                 alt="<?= /* @escapeNotVerified */ __('Loading...') ?>"
                 style="position: absolute;">

No errors in the console, everything in network tab coming back as 200


texts: New Order Email - Need to change payment information font

texts:
We send out a New Order Confirmation and the font size of the credit card information and Processed amount are too big, I like to change the font size.
I have tried to do this in the Magento Admin panel but the change does not take effect.

The order confirmation show "Payment Method" and then below that shows the:
 Credit Card type:
 Credit card Number:  (Last four digits)
 Processed Amount:


texts: New Tab in Admin Product Edit in Custom Module

texts:
I want to add new Tab in Product Edit/New Section in Admin Panel. I want to call PHTML file with dropdown. At time of saving product that dropdown value will be save in Database and while Edit it will be pre selected.

Can anyone please tell me how can i achieve this functionality in Magento 2.1.2?

Thanks in advance.


texts: Magento 2: Getting error Unsupported image format. File: /var/www/mysite/pub/media//Meeting_notes_2__1.docx

texts:
I am getting an error in admin editor:

  Unsupported image format. File:
  /var/www/clients/mysite/pub/media//Meeting_notes_2__1.docx

My Code is

<type name="Magento\Cms\Model\Wysiwyg\Images\Storage">
        <arguments>
            <argument name="extensions" xsi:type="array">
                    <item name="allowed" xsi:type="array">
                        <item name="pdf" xsi:type="number">1</item>
                        <item name="jpg" xsi:type="number">1</item>
                        <item name="jpeg" xsi:type="number">1</item>
                        <item name="png" xsi:type="number">1</item>
                        <item name="gif" xsi:type="number">1</item>
                        <item name="docx" xsi:type="number">1</item>
                    </item>
                    <item name="image_allowed" xsi:type="array">
                        <item name="jpg" xsi:type="number">1</item>
                        <item name="jpeg" xsi:type="number">1</item>
                        <item name="png" xsi:type="number">1</item>
                        <item name="gif" xsi:type="number">1</item>
                        <item name="docx" xsi:type="number">1</item>
                    </item>
                    <item name="media_allowed" xsi:type="array">
                        <item name="flv" xsi:type="number">1</item>
                        <item name="swf" xsi:type="number">1</item>
                        <item name="avi" xsi:type="number">1</item>
                        <item name="mov" xsi:type="number">1</item>
                        <item name="rm" xsi:type="number">1</item>
                        <item name="wmv" xsi:type="number">1</item>
                        <item name="docx" xsi:type="number">1</item>
                    </item>
            </argument>
        </arguments>
    </type>
    <preference for="Magento\Cms\Model\Wysiwyg\Images\Storage" type="Vendor\ModuleName\Model\Cms\Wysiwyg\Images\Storage" />


texts: does closing the browser stop a running server process (System backup i.e.)?

texts:
Let's say I started a backup in the Magento backend [->System ->tools ->backups] before going home in the evening.

Can I shut down my computer while the backup (or whatever process I started) is still running or would this kill the process running on the server side?

I assume, whatever the answer may be (my guess "yes, you can shut down your computer or browser. The server will continue whatever process has been started through the backend GUI"), the same is true for refreshing/closing the browser's tab. Am I assuming right?


texts: Former Dev removed reviews, wishlist, send to friend

texts:
Is there something controlling reviews, wishlist and send to friend at a higher level than the admin control?  A former dev removed the wishlist, reviews, send to a friend feature of the product page and didn't leave and code annotations as to the changes.

I've checked the System>Config>Advanced for my store view and all three are  enabled fully.  I've checked for Customers>Wishlist and its good to go.

There are a few reviews that were submitted, so clearly it worked to a point.  Reviews and ratings is what I'm after here.

I've checked view.phtml & list.phtml and nothing is commented out. All mentions of 'review' in the code seem nominal.

Sample affected page

Should I be looking somewhere else for this? Surely he commented this out or worst case removed it! I can't find the exact location of where this could have been removed.  Any guidance down the file path would be great!


texts: checkout_cart_add_product_complete not working for programmatically added product

texts:
In my magento store, I have a script to add product programmatically in cart using below code :

$cart = Mage::getSingleton('checkout/cart');
$cart->init();
$_product = Mage::getModel('catalog/product')->load($id);
$params = array(
        'product' => $_product->getId(),
        'qty' => $qty,
        'options' =>'',
        'form_key' => Mage::getSingleton('core/session')->getFormKey()
    );

$cart->addProduct($_product, $params);
$cart->save();

For this item checkout_cart_add_product_complete event not fired.

However the checkout_cart_add_product_complete event is working nice while adding a product to cart from a catalog.

Is there any other event in magento which fire on programmatically add product (similar to checkout_cart_add_product_complete)?


texts: Adding CSS to a CMS page using Layout Update XML

texts:
I need to add a specific CSS file to a CMS page using Magento 2.  I am wanting to achieve this by using the Layout Update XML area in the admin.  However, I cannot figure out or find any working examples of just how to do this.

My home page CMS is the page I am trying to add the CSS to. I can add specific CSS files in the head of the entire site by calling them out in the default_head_blocks.xml.  But in this case I need it to be used on ONLY the home page CMS.

It appears as though I should be using <referenceContainer> but after that I am not sure what to do.


texts:
Thanks for providing solution. I have apply same solution in one of my site along with I have follow all your steps. But it still send two confirmation mailto both admin and customers. My magento version is: 2.2.5.

Please provide me solution on this. Let me know if you need to ask anything.

Thanks,
Sheba Maniar


texts: Magento 2.3.5-p1 free shipping configuration issue

texts:
I recently upgraded from 2.2.7 to 2.3.5-p1.
The free shipping was set to 29€ but it does not calculate correctly anymore. I bet it's ignoring the taxes.
For example:-

my minimum for free shipping it's 29€
I have a cart with the total of 34€(including taxes) and all have 23% tax rate, the free shipping does not appear.
But if I go to an order of 41€ it already appears, that's why I'm betting on the tax calculation but didn't find anything relative to that.

Any way to check and fix this? I'm not putting this updated version live just because of this.
Thanks :D


texts: I having form in phtml. I need add an multi select component in that form as in admin product edit form( category picker). I dont want external library. Ui component has multi select. How do i use it in my phtml?


texts: How do I add a custom phtml file in the product page issue

texts:
In my custom module in the config.xml file I added my layout:

    <frontend>
        <layout>
            <updates>
                <mynamespace_mymodule>
                    <file>mynamespace_mymodule.xml</file>
                </mynamespace_mymodule>
            </updates>
        </layout>
    </frontend>

In my mynamespace_mymodule.xml I have:

<?xml version="1.0" encoding="UTF-8"?>
<layout version="0.1.0">
    <catalog_product_view>
        <reference name="content">
            <block type="catalog/product_view" name="impressions" template="mynamespace/mymodule/impressions.phtml"/>
        </reference>
    </catalog_product_view>
</layout>

The content of impressions.phtml is a simple html:
Test
, but when I access the product page , my "Test" doesn't show up. Can you help me with this ?


texts: Bundle items are missing from sales_flat_order_item table. Magento 1.9

texts:
I wonder if somebody faced the same issue or knows what can cause this. For some reason, all bundle items are missing from sales_flat_order_item table, so I can't get the parent item. From old db backup, I can find those items were there.

current DB

backup


texts: how to change template of content block?

texts:
I am trying to change content blocks template, but I couldn't.

My xml is:

<reference name="content">
    <action method="setTemplate"><template>page/template.phtml</template></action>
</reference>

what is wrong with this xml.


texts: Magento 2 : how to convert my Domain Http:// to Https://

texts:
Till now I was using http:// in my domain, how can I move my domain from Http:// to https://

Do i have to buy a SSL Certificate. my domain was registered through Godaddy.

if i change Following in Magento Admin.

Store-> Configuration-> General-> Web
- Base URl
- Base link Url

Please let me know how to Use SSL Certificate to assign to this Domain.

I have Changed the mu Domain url with http to https.

After changing it Google chrome is not allow me to that Site As it is Not Secure.

Now, I need to add the SSL certificate to my Domain url. As i said earlier.

please let me know the steps for assigning SSL to Domain


texts: Magento 1.9 go to payment methods after cancel payment

texts:
I'm working on magento site which have code to show payment method, after some user went to payment and cancel it.

ex- user fills the checkout steps and go to paypal, when cancel the paypal payment he redirect to checkout page and show the payment method section.

i'm using magento default one page checkout.

i use this code

function onCompleteAjaxOpc(arg) {
                        shippingMethod.nextStep(arg);
                        fieldsetOpc.show();
                        jQuery('#opc-loader').hide();

                        jQuery('#top-shipping_method').on('click', function() {
                            new Ajax.Request('<?php echo Mage::getUrl('checkout/onepage/getShippingMethod'); ?>', {method: 'get', onComplete: function(arg) {
                                billing.nextStep(arg);
                            }});
                        })

                    }
                    new Ajax.Request('<?php echo Mage::getUrl('checkout/onepage/getPayment'); ?>', {method: 'get', onComplete: onCompleteAjaxOpc });

but recently it stopped working

https://devsite.mydoman.comain/checkout/onepage/getPayment/

This ajax url getting 404 and not shows payment blocks, anyone know what coz this error, Thank You


texts: How to Make Grid Component Select Filter Convert to the Like Comparison Operator in SQL

texts:
when a filter dataType  is configured as select. It will be converted to filterName=selectedValue in the final SQL. When dateType is text, it will be converted tofilterName like '%inputValue%'.
My question is how to keep the filter as select but make it convert to the like comparison operator?


texts: How to add product to wishlist with a single button click without page redirect and refresh using ajax?


texts: how to check admin loggedin or not on frontend magento 2

texts:
how to check admin loggedIn or not on front-end magento 2 .I have tried this
class BackendAuthUserLoginSuccess implements ObserverInterface
{
    const DEFAULT_SESSION_NAME_OF_FRONTEND = 'PHPSESSID';

    /**
     * (non-PHPdoc)
     * @see \Magento\Framework\Event\ObserverInterface::execute()
     */
    public function execute(\Magento\Framework\Event\Observer $observer) {
        if (! isset($_COOKIE[self::DEFAULT_SESSION_NAME_OF_FRONTEND])) return;
        $backSessionId = session_id();
        $frontendSessionId = $_COOKIE[self::DEFAULT_SESSION_NAME_OF_FRONTEND];
        session_write_close();
        session_id($frontendSessionId);
        session_start();
        $_SESSION['admin'] = [$backSessionId];
        session_write_close();
        session_id($backSessionId);
        session_start();
        return;
    }
}


texts: Get Product list with attribute (news_from_date and news_to_date)Magento API

texts:
I would like to get Product list with attributes (news_from_date and news_to_date) using Magento API V2.

I want to retrieve the product list within date-range that i define with attributes (news_from_date and news_to_date).


texts: Magento 2 - Update collection data through ajax

texts:
I have a collection inside my Block file Vendor\MyModule\Block\PostsCollectionList.php
protected function postCollection()
{
    return $this->postCollectionFactory->create()
        ->addActiveFilter()
        ->addStoreFilter($this->_storeManager->getStore()->getId())
        ->setOrder($this->getCollectionOrderField(), $this->getCollectionOrderDirection());
}

Then I have declared my phtml file in layout XML file -
<block class="Vendor\MyModule\Block\PostsCollectionList" name="posts.list" template="postsCollectionList.phtml" />

There I have this collection and I have also created some filters and once I select filter I update my URL and pass the selected filter to Controller through Ajax but at this point I am stuck. How can I get and update my collection through the controller based on the selected filter and update then frontend?
For example, I want to pass the filter country=spain as my selected filter to controller and then retrieve filtered collection which where declared inside my Block file but with additional filter country.
I know that there should be an execute() method but not exactly sure what I have to do to get collection which was before created in my Block file so I could apply additional country filter to my collection and then update frontend accordingly.


texts: how to get attribute values (select type) from a product collection?

texts:
I need to retrieve all values of an attribute (multi-option select type) from a filtered collection of products.

First i want to get a collection of products, then filter this collection based on certain category and certain attribute.For remaining products in the collection, I want to retrieve the values (unique) of my multi-option select attribute.

So far I have some code that doesn't work

$attributeCode = 'compatible_printers';
$ctname=$_GET['ctn'];

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

$collection->addAttributeToSelect('name');
$collection->addAttributeToSelect('manufacturer');
$collection->addAttributeToSelect('ink_type');
$collection->addAttributeToSelect($attributeCode); // this is the required attribute

$collection->addFieldToFilter(array(
array('attribute'=>'manufacturer','eq'=>$ctname),
 ));

$collection->addFieldToFilter(array(
array('attribute'=>'ink_type','eq'=>'Laserjet Toner'),
 ));
$collection->addAttributeToFilter($attributeCode, array('notnull' => true));
    $collection->addAttributeToFilter($attributeCode, array('neq' => ''));

// i m trying to get the attribute values in the following array
$usedAttributeValues = array_unique($collection->getColumnValues($attributeCode));

I have looked for similar questions and found some anwsers but they don't work for me. Can someone advice how to make the above code work?


texts: What is the best way to delete a Magento order?

texts:
Synopsis

I would like to delete test orders from my Magento store because they affect the statistics and reports of sales. Would the following code delete all records from:

sales/order_invoice
sales/order_invoice_grid
sales/order_shipment
sales/order_shipment_grid
sales/order_creditmemo
sales/order_creditmemo_grid
sales/order_payment_transaction
sales/order
sales/order_grid

Code Snippet

$orders = Mage::getModel('sales/order')->getCollection()
    ->addFieldToFilter('entity_id', (array) $orderIds);

foreach ($orders as $order) {
    // XXX - Possible cascade delete?
    $order->delete();
}

Or would I need to delete each of the records individually?


texts: How do I stop Folder Structure from being visible in browser (directory listing)?

texts:
I have the following problem: In the browser it is possible to access the folder structure of skin/frontend/.... folders and subfolders. The browser shows an index of the respective folder with all foldersand files that are in that folder (see image).
The bigger problem that appears because of that, is that the ending and name of the files and folders shown in these index pages are crawled by google and words like gif or png appear as the most importent Words in the Content Keywords section, since there are a lot of files.

What can I do to avoid the folder structure to be accessible by the browser? Or how can I avoid that the browser shows an index of the folder?

Screenshot:


texts: I need  to print the order from backend, same as the customer is able to print the order from the account dashboard. now the catch is, the backend printed order needs to use the same design as the frontend one.


texts:
I feel this ought to be a simple fix, but I am not finding any straightforward solutions. Initially I thought it was a permissions thing, but the config files reflect the correct username and password. I'm stumped.

Error Message

  There was an Error Processing Your Request

  Failed to set ini option "session.save_handler" to value "files".

Steps to reproduce

Install a fresh copy of Magento 2.2.4 via GoDaddy's cPanel Installatron.
Go to anywhere in the Magento directory. This message apears.

Expected result

The homepage or a login screen. No error message.

Actual result

Error message appears wherever in the Magento directory you go.

Environment

Magento 2.2.4 (auto-updated from v.2.2.3 a couple weeks before the issue appeared.)
Plain Magento. No additional extensions, plugins or addons, aside from what already comes packaged with the Magento 2.2.4 install.
Linux. GoDaddy Hosted. cPanel. 2GB RAM. 2 CPUs.
Magento installed in directory /shop/
SSL Certificate in use.
Magento Base URL (both Secured and Unsecured) are set like:
https://www.example.com/shop/
(note the "s" in "https", the "www." subdomain, the directory "shop", and the trailing forward-slash)
htaccess redirects any non-WWW traffic to www subdomain.
PHP 7.1.17 (All required extensions installed and functioning)
MySQL 5.6.39

Preconditions

The site was running perfectly at version 2.2.3 for three weeks.
The auto-update to 2.2.4 broke my site instantly... But I followed some safe-sounding forum solutions to fix it.
Site ran perfectly again as ver. 2.2.4 for another two weeks but then suddenly, last week, I couldn't log in anymore, and other parts of the site began malfunctioning as well.
Note: As the site was working fine, no changes were made to the code for weeks. The issue occurred seemingly on its own.
I followed several forum remedies (rolling back each time they didn't work before trying a new "solution"), but no suggestions worked worked.
In defeat, I reset my server completely, installed a FRESH copy of Magento 2.2.4 (via GoDaddy's "Installatron" again) (thus also skipping v2.2.3 altogether this time)
-Problem resurfaced with the same error message right away.


texts: What timezone are Magento cron jobs being run in?

texts:
My system's timezone is US/Eastern, my default store is US/Central and the database is UTC. At what time will the following doStuff method be called?

<mymodule_do_stuff>
    <schedule><cron_expr>15 0 * * *</cron_expr></schedule>
    <run>
        <model>mymodule/observer::doStuff</model>
    </run>
</mymodule_do_stuff>

Update: I ran this script .

echo date('r'), PHP_EOL;
require_once 'app/Mage.php';
Mage::app();

echo date('r'), PHP_EOL;

and got

Mon, 30 Dec 2013 18:01:33 -0600
Tue, 31 Dec 2013 00:01:34 +0000

So it looks like UTC is what I should be using.


texts: how to override url_rewrite module rewrite method in magento2?

texts:
In magento one Mage_Core_Model_Url_Rewrite->rewrite method

where I will find same method in magento2?


texts:
using Alans Storms layout viewer I have the following:

<reference name="my.account.wrapper">
<block type="sales/order_history" name="sales.order.history">
<block type="core/text_list" name="sales.order.history.info" as="info" translate="label">
<label>Order History Info</label>
</block>
</block>
<block type="customer/account_dashboard" name="customer.account.link.back" template="customer/account/link/back.phtml"/>
</reference>

<reference name="my.account.wrapper">
<remove item="customer.account.link.back"/>
</reference>

.....

the last three lines being those added by my local xml...

<sales_order_history>

  <reference name="my.account.wrapper">
    <remove item="customer.account.link.back" />
  </reference>

</sales_order_history>

Can anyone tell me why the back link block is not being removed?

Thanks in advance, Richard.


texts: Website shows broken after apply SSL certificate

texts:
I have integrated SSL to my website now website looks broken with https,
 without https only some pages are working properly cart pages unable to open
    Below are the configuration

If I enable secure URL in Admin then admin url doesn't work

How can I resole this issue?


texts: Please, how I can use Mongo with Magento? And does Mongogento (https://github.com/Smile-SA/mongogento) work with Magento community edition?


texts: While learning about the diverse caches in Magento (e.g. per Various Magento Cache flushing methods, I was wondering which of these Magerun supports on how the commands would look like?


texts:
<referenceContainer name="header-wrapper">
     <block class="VES\Sociallogin\Block\Buttons" ifconfig="section/group/field/type_multiselect" value="something" as="block.buttons.header" template="Vendor_MOdule::template.phtml" after="-" >
        </block>
</referenceContainer>

Can i do check ifconfig value that saved in system config?


texts: How can I easily test variations of the "Add to cart" button?

texts: It seems most of the A/B and multivariate experiments ask you to create entirely new pages, which is not possible for 10,000 products. I only want to try different add to cart buttons, so wouldn't it make sense that I just add a script around the code which generates the button.


texts:
I'm trying to change an order status in  controller. After execute "addStatusToHistory" and "->save()", it save the comment and status that I've specified. But after that it apply a new status to order, just in case, the first status in  status list for comments. Does anyone know something about it?

$_order = Mage::getModel('sales/order')->load($idOrder);
$history = $_order->addStatusToHistory('etiqueta_impressa','Etiqueta impressa via Ferramentas > SIGEP em: '.date("d/m/Y H:i:s"),false);
$history->setIsCustomerNotified(false);
$_order->save();


texts:
I need to extend a javascript from the new ui module that features the new admin grid system. Extend a default Ui component give me a hint, and I was able to setup some code:

# file: app/code/My/Module/view/adminhtml/web/js/gid/massactions.js
console.log('new massactions.js');
define([
    'Magento_Ui/js/grid/massactions'
], function (massactions) {
    console.log('before extend');
    return massactions.extend({

        defaultCallback: function (action, data) {
            console.log('custom callback');
        }

    });
});

As you can see, I have three console.log, but the defaultCallback one is not being called, so it is not overwriting the method as I expected, but I can be sure that the definition was loaded.

To be fair, I want to add a custom callback to a new action that I've added. In the original massactions.js, we have a _getCallback that attempts to grab a callback for a massaction item (fallback to defaultCallback, which I'm trying to overwrite), but I could not manage to add a callback there, even using view/ui_component/sales_order_grid.xml.

Any help will be very appreciated.

Update 1: I'm able to overwrite the method using massactions.prototype.defaultCallback = function(){}. I'm not sure if this have any collateral effect, so I'm leaving the question open.


texts: How does Magento Connect use author information in packaged extensions

texts:
When packaging an extension for Magento Connect you are prompted to include author information.

While I realize the first author must match the credentials from the Magento Connect account used to submit the extension, I am not sure:

How the information is used
How multiple author information is used

One concern is that the email address is made public.


texts: How to show all images on product page M2

texts:
I'm trying to show all images on the product page like this

but I still need to keep the zoom functionality and carousel for mobile. Is this possible whilst using fotorama?


texts: Magento admin panel not loading properly no options for login

texts:
I setup fresh Magento 2.3 setup in my localhost. Frontend show properly but backend no options show login.
Admin panel not loading properly. Screenshot below:

I clear all caches but admin panel not loading


texts: Magento 1 : How to Solve 404 Error while exporting csv file on custom module

texts:
I have facing issue (404 error /page not found error) while exporting csv file in custom module from system configuration.
if anyone known then please tell me how to solve this 404 error.


texts: Magento2 Content -> Design -> Configuration Tables are empty

texts:
I am using Magento-2.3.4 and came to the page to change the theme and I saw only the empty tables.

I looked for answers and they said allow_url_fopen to be on but it is already on.

What should I do now to get the table values back here?


texts: How to enable Two Factor Authentication for Customer Accounts

texts:
I would like to enable two-factor-authentication for Customer Accounts, but as per the documentation (https://docs.magento.com/m2/ce/user_guide/magento/extension-install-two-factor-authentication.html) it seems as though this feature is only enabled for Admin accounts:

[...] "All features and requirements are restricted to Admin user accounts, not extended to customer accounts."

How do I enable it for all account types?


texts: Certain Product Attributes Not Displaying On Category Page

texts:
I'm just working on a project of mine and I can't seem to get certain product attributes to display on the front end of the category page.

This is the current configuration for one of the custom attributes that wont work:

I then have this block of PHP:

     <?php if($_product->isSaleable()): ?>
                            <?php  if ( !($_product->getData('has_options') || $_product->isGrouped()) ) :  ?>
                                <a href="/book-testdrive" class="addtocart" value="<?php echo $this->escapeHtml($_product->getAttributeText('registration')); ?>" title="<?php echo $this->__('Book Test Drive') ?>">&nbsp;<?php echo $this->__('Book Test Drive') ?>
                            <?php else : ?>
                                <a href="/book-testdrive" class="addtocart" value="<?php echo $this->escapeHtml($_product->getAttributeText('registration')); ?>" title="<?php echo $this->__('Book Test Drive') ?>">&nbsp;<?php echo $this->__('Book Test Drive') ?>
                                Options
                            <?php endif;?>
      <?php else: ?>

This is replacing the add to bag button with a  tag that links to another page.

As you can see I am trying to put the registration attribute within a value on the  tag:

value="<?php echo $this->escapeHtml($_product->getAttributeText('registration')); ?>"

However the attribute never gets placed into the value, I've also tried adding it to any part of the page and it wont display.

Any idea where I am going wrong with this?

It must be because the attribute is a custom one that I have made however I'm unsure exactly what is causing the issue.

Thanks, Nick


texts: Magneto 2 : How to change shopping bag icon

texts:
I want to change the shopping cart icon. I want to add a new image, how to do that. I am using Magento 2.3

  https://prnt.sc/osf50f


texts: After migrate:delta without -r if go to some places such Catalog, Invoices system show "loading"

texts:
After run a migrate:delta when go to Catalog > Inventory > Products for example, dashboard show a spinner permanent.

Show in others areas.
Shop is in developer mode, clean caches.

On logs /var/log don't see any error.


texts: Magento 2.1.6 - Product Images not showing

texts:
The site is working fine but on installing Magento sample data, the product category list does not show the images, when i check the source of the image it does not exist in the Magento directory given, tried reinstalling the sample data still no joy.

Home page images show up and on the actual product page, images display perfectly.

Most of the commands i have already carried out such as deploying static content, magento:updgrade, cleaning cache, reindexing but still nothing.

I also use an extension which allows me to import data content, from thousands of categories, this still does not bring up the product images and source of an image is like this:

http://dev.modxpcit.co.uk/pub/media/catalog/product/cache/f073062f50e48eb0f0998593e568d857/https://media.stockinthechannel.com/pic/9pO1aTE6uku3cRWISiIveg.c-m.jpg

Why would there be another address next to the cache folder? again, this does not exist in the directory.


texts: How can we change Tax text to other text in magento 2.3?

texts:
can we change Tax text to other text like "US 6% Sales Tax",
in the checkout,


texts:
Hi i want to customise my welcome message like this:

"hi visitor, welcome to %storename%! Log in or register."

but i don't know how i should include the login link, because if you logged in, the message will have to change like this: hi %username% you're logged in. logout?

or something else.
Thank you in advance


texts:
I have created admin form. I am able to get customer group list using below code, but there is no "NOT LOGIN" group name so how can I get all group list?

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$groupOptions = $objectManager->get('\Magento\Customer\Model\Customer\Attribute\Source\Group')->getAllOptions();

$fieldset->addField(
    'customer_group',
    'multiselect',
    [
        'name' => 'customer_group[]',
        'label' => __('Customer Group'),
        'title' => __('Customer Group'),
        'values' => $groupOptions,
        'disabled' => $isElementDisabled
    ]
);

I am getting this output:


texts: Magento 2 Shipping Method I want Ternary condition for thee Like 'LBS' : 'KILOGRAM' :'GRAMS'

texts:
I am using shipping method in Magento2 my website.but this shipping method only two weight unit support so I want three weight unit support.
my code is below, so help me

public function getStoreWeightUnit($storeId)
    {
        return $this->scopeConfig->getValue(
            'general/locale/weight_unit',
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
            $storeId
       // ) == 'lbs' ? 'LBS' : 'KILOGRAM';
        ) == 'grams' ? 'GRAMS' :'KILOGRAM':'kbs' ? 'lbs':'LBS' ;
    }


texts:
I am trying to install a new version of Magento 1.4.1.1 on a Mac with native Apache/MySQL

I am getting the following error

Database server does not support the InnoDB storage engine.

I seem to remember some solutions in the config.xml to change :

<pdo_mysql/>

to :

<pdo_mysql> 1 </pdo_mysql>

Unfortunately I don't have those lines in my config for this version.

I am just trying to install to compare tables to a newer version.


texts: Implementing a custom function in Magento

texts:
I'm trying to implement the 2nd solution from philwinkle in this post:
Price(float number) in transactional email

I have my folder setup like so:
app/code/local/Anja/EmailModule/Model/Email/Template with the file Filter.php

The content of this file is:

 class Anja_EmailModule_Model_Email_Template_Filter extends Mage_Core_Model_Email_Template_Filter
{
    public function __construct()
    {
        parent::__construct();
        $this->_modifiers['formatCurrency'] = array($this, 'modifierFormatCurrency');
    }

    public function modifierFormatCurrency($var)
    {
        return Mage::helper('core')->currency($var,false,false) . " Test";
    }
}

but it doesn't appear to get processed at all by Magento. I have cleared cache and recompiled, but in the output not even the word Test gets displayed. What am I doing wrong? Do I also need an xml file somewhere?

Edit after some googling I find that I just want to extend the class.
I have 2 xml files
app/etc/modules/Anja_EmailModule.xml

<?xml version="1.0"?>

<config>
    <modules>
        <Anja_EmailModule>
            <active>true</active>
            <codePool>local</codePool>
        </Anja_EmailModule>
    </modules>
</config>

and in app/local/Anja/EmailModule/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Anja_EmailModule>
            <version>0.1.0</version>
        </Anja_EmailModule>
    </modules>

    <global>
        <models>
            <emailmodule>
                <rewrite>
                    <email_template_filter>Anja_EmailModule_Model_Email_Template_Filter</email_template_filter>
                </rewrite>
            </emailmodule>
        </models>
    </global>
</config>

from this example: http://www.codexpedia.com/magento/how-to-extend-a-model-class-and-overrides-its-functions-in-magento/

I still don't see the word "Test" in my email.


texts: Find lowest priced product in a category

texts:
I am looping through each sub-category and spitting out its name,url,image etc.

But I also want to show a "From £XX" for each sub category I show.

What is the best/cleanest method for doing this? My current code is below:

<?php
$currentCat = Mage::getModel('catalog/category')->load('4');
$subCategories = $currentCat->getChildrenCategories();

foreach ( $subCategories as $subCategory )
{
    if($subCategory->getIsActive())
    {
        echo'
getUrl().'">'.$subCategory->getName().'
';
          echo'getUrl().'">';
          echo'load($subCategory->getId())->getImage().'" alt="Budget Stove" />';
          echo'
From &pound;00.00
';
        echo'';

    }
}
?>


texts:
In back-end Order View Page I can see only "Order was placed using CURRENCY" and I can't find out if customer chose to pay In cash or by Credit card on delivery.

Any idea? Thank you

EDIT: The payment method isn't showed in pdf invoice as well.


texts: How to make product category selection required

texts: is there any way that if a user creates or edit a new product on admin backend the selection of its category in category tab will be required? I searched already in google and unluckily I can't find any clues.


texts: Ecommerce Tracking is Dropping Campaign Source

texts:
Out of hundreds of transactions tracked recently using GA Ecommerce tracking, they're all showing a traffic source of Direct, and none of them are showing google organic (or any other traffic sources) as contributing any revenue.

From some quick testing, it appears that the traffic source is dropped when the customer switches from http over to https in the checkout process.

Any good solutions for this?

UPDATE: It looks like this may have been being caused by a duplicate snippet with a difference in the placement of the setDomainName line in the snippet.  No longer seeing the traffic source being dropped in GA Debugger in the checkout step, going to wait a day and see whether data begins to show up properly in reports.


texts: Send notification message(using message manager) as ajax response

texts:
Controller takes the Ajax request and after some required operations should return the html of notification message  using message manager so that it can be rendered on front end using Javascript.

    $_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $messageManager = $_objectManager->create('\Magento\Framework\Message\ManagerInterface');
    $block = $this->_layoutFactory->create()->getMessagesBlock()->addError('Configuration is wrong!');
    $block->setMessages($messageManager->getMessages(true));

    $resultJson = $this->resultJsonFactory->create();

    $mess= $block->getGroupedHtml();
    return $resultJson->setData([
        'messages' => $mess,
        'error' => '$error value comes here'
    ]);

But function getGroupedHtml() does not return any html.

Being a beginner to Magento, my queries are

What i am trying doing is feasible?
If yes, then what i have missed or doing wrong?

Thanks.


texts: Magento 2 How can i create a custom factory class for a class?

texts:
I want to initialize some data on factory->create() without passing in the create(["mydata" => 1]).
What's the way to create MyFactoryClass with custom create() for MyClass in my module?
I find not dev doc for the same or any article.


texts: Magento 2 Stores -> Configuration redirects to dashboard

texts:
Getting issue after enabling form_key from backend.
When I am trying to open store > configuration
from Order section it took me redirect to admin dashboard


texts: "Visible Section not found" at backend login in Magento 2

texts:
When I switch the store to a specific domain https://  example.com (secure & unsecure), I get the error "Visible Section not found" when trying to log into the backend.

The funny thing: as soon as I change the url to something else say www.example.com the error disappears and I am able to login fine.

I was testing a lot (Enviroment Varibles, Cache flush, recompiling)

Can anybody explain this to me?


texts:
In my CMS page, I want to call a few phtml files that are similar to product view page. Basically, I want to create something like this:

After enabling template hint, I was able to see the .phtml files that the product view page uses.
/vagrant/www/vendor/magento/module-catalog/view/frontend/templates/product/view/gallery.phtml
/vagrant/www/vendor/magento/module-theme/view/frontend/templates/html/title.phtml
/vagrant/www/vendor/magento/module-catalog/view/base/templates/product/price/final_price.phtml
/vagrant/www/app/design/frontend/Vistar/default/Magento_Catalog/templates/product/view/addtocart.phtml
How can I call these phtml files based on the product's id?
Any help will be appreciated. Thanks.


texts: Mageto 1.9 UPS limit to 48 contiguous United Sates

texts:
I have set UPS Ground as Free Method in the UPS shipping method configuration. And an amount of 75 dollars as Minimum Order Amount for Free Shipping.
This is working fine. But I need a Free shipping exception for the states of Alaska and Hawaii. How do we accomplish this in Magento 1.9?
As per the configuration, these 2 states are also showing UPS Ground as a free method.
Please help.


texts:
I currently have the mageplaza layered navigation extension on my site in Magento 2.2.9 and I have a problem :

Google indexes all the filter pages. I blocked some of them via the robots.txt but certainly remains indexed but I don't know how the blocked ones because they have a different scheme :
https://mysite/lang/category/104-251-82.html

I don't know hiw to block them in the robots.txt

Can you help me? Because these pages are indexed but are of no use to the users.

Thank you in advance!

Best regards,


texts: How can an extension add transactional email variables? (available in email templates)

texts:
suppose an extension that does something to an order. Special shipping. Or maybe blue ribbon packaging.

How can this extension make available some new transactional email variables that are available in all default templates? And here comes the hard one: without overriding core classes (becuase we might not be the only one doing this). for example: {{var order.special_shipping}} or {{var shipping.special}}

Question: How can an extension make available transactional email variables in order emails without overriding core classes? (available in email templates)


texts:
For curiosity I try to delete the files in app/etc folder. I don't have any back up file for this. And when I try to run the cli magento magento list I got this error :

Warning: require(/var/www/html/vendor/composer/../../app/etc/NonComposerComponentRegistration.php): failed to open stream: No such file or directory in /var/www/html/vendor/composer/autoload_real.php on line 71

    Fatal error: require(): Failed opening required '/var/www/html/vendor/composer/../../app/etc/NonComposerComponentRegistration.php' (include_path='/var/www/html/vendor/magento/zendframework1/library:/var/www/html/vendor/phpunit/php-file
iterator:/var/www/html/vendor/phpunit/phpunit:/var/www/html/vendor/symfony/yaml:.:/usr/local/lib/php') in
 /var/www/html/vendor/composer/autoload_real.php on line 71

From above error message my app/etc/NonComposerComponentRegistration.php is no longer exist.

How to solve this problem without having to restore the deleted files ?


texts:
After upgrade Magento from 2.3.5 to Magento 2.4.2, the categories page doesn't show any product. I have change Search Engine to Elasticsearch 7. When I check log, I found a bug:
[2021-03-19 08:32:17] main.CRITICAL: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [product_id] in order to sort on","index_uuid":"ZqaXmQlfQVqUEMFKpGUziw","index":"magecusabio_product_8_v1"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magecusabio_product_8_v1","node":"bhY-5xWvQ02x5cizTVMtKw","reason":{"type":"query_shard_exception","reason":"No mapping found for [product_id] in order to sort on","index_uuid":"ZqaXmQlfQVqUEMFKpGUziw","index":"magecusabio_product_8_v1"}}]},"status":400} {"exception":"[object] (Elasticsearch\\Common\\Exceptions\\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\":\"query_shard_exception\",\"reason\":\"No mapping found for [product_id] in order to sort on\",\"index_uuid\":\"ZqaXmQlfQVqUEMFKpGUziw\",\"index\":\"magecusabio_product_8_v1\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"magecusabio_product_8_v1\",\"node\":\"bhY-5xWvQ02x5cizTVMtKw\",\"reason\":{\"type\":\"query_shard_exception\",\"reason\":\"No mapping found for [product_id] in order to sort on\",\"index_uuid\":\"ZqaXmQlfQVqUEMFKpGUziw\",\"index\":\"magecusabio_product_8_v1\"}}]},\"status\":400} at /www/wwwroot/default/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632)"} []


texts: How to load Nearest Shopping Cart Price Rule in Cart Page of magento 2?

texts:
I want to display nearest shopping cart price rule in shopping cart based on the cart subtotal.

Ex: If my shopping cart subtotal is $10, then i want to display shopping cart rule which is valid for $15(or nearest).

Please help.


texts:
I have a site with three languages and three sitemaps (one for each language).

Two of the languages have working sitemaps (spanish and arabic), but for some reason the english one gets cut off with the following error message:

XML Parsing Error: not well-formed
Location: https://firstaidvendor.com/sitemap/first_aid_vendor_english/sitemap.xml
Line Number 2, Column 664358:


texts: SUPEE 11219 Error "Reversed (or previously applied) patch detected!"

texts:
I've tried installing this patch on my Magento (1.9.4.3), I'm not sure what to do, here is the full message:

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

checking file app/code/core/Mage/Admin/Model/User.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
4 out of 4 hunks ignored
checking file app/code/core/Mage/Admin/etc/config.xml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
The next patch would create the file app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.1.2-1.6.1.3.php,
which already exists!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored
checking file app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
3 out of 3 hunks ignored
checking file app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored


texts: how to show customer attribute in magento 2

texts:
I created a new module to add a extra customer attribute.. but it only appear in admin site(customers/all customers/edit/Account information). But i want it into customer registration form...  how i can do it ?
im using: frontend_customer and adminhtml_customer

  Socialme/IdInput/Setup/InstallData.php

<?php

namespace Socialme\IdInput\Setup;

use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Customer\Model\Customer;
use Magento\Eav\Model\Entity\Attribute\Set as AttributeSet;
use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

/**
 * @codeCoverageIgnore
 */
class InstallData implements InstallDataInterface
{

    /**
     * @var CustomerSetupFactory
     */
    protected $customerSetupFactory;

    /**
     * @var AttributeSetFactory
     */
    private $attributeSetFactory;

    /**
     * @param CustomerSetupFactory $customerSetupFactory
     * @param AttributeSetFactory $attributeSetFactory
     */
    public function __construct(
        CustomerSetupFactory $customerSetupFactory,
        AttributeSetFactory $attributeSetFactory
    ) {
        $this->customerSetupFactory = $customerSetupFactory;
        $this->attributeSetFactory = $attributeSetFactory;
    }

    /**
     * {@inheritdoc}
     */
    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {

        /** @var CustomerSetup $customerSetup */
        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
        $attributeSetId = $customerEntity->getDefaultAttributeSetId();

        /** @var $attributeSet AttributeSet */
        $attributeSet = $this->attributeSetFactory->create();
        $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

        $customerSetup->addAttribute(Customer::ENTITY, 'id_number', [
            'type' => 'varchar',
            'label' => 'ID Number',
            'input' => 'text',
            'required' => true,
            'visible' => true,
            'user_defined' => true,
            'sort_order' => 1000,
            'position' => 1000,
            'system' => 0,
        ]);

        $attribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'id_number')
        ->addData([
            'attribute_set_id' => $attributeSetId,
            'attribute_group_id' => $attributeGroupId,
            'used_in_forms' => ['frontend_customer','adminhtml_customer'],
        ]);

        $attribute->save();

    }
}

  Socialme/IdInput/view/frontend/templates/customer/form/register.phtml

            <?php echo __('ID Number')?>
            <input type="text" name="id_number" id="id_number" title="id_number" class="input-text"  value="<?php echo $block->escapeHtml($block->getFormData()->getIdNumber()) ?>" required">


texts: Comment added by webservice not visible in front end

texts:
I'm using the magento version 1.9.2.4 with its webservice wsdl, i'm adding comments in my request using the webservice's method with java:

proxy.salesOrderAddComment(session, "100000019", "Processando", "adicionado o status 11", null);

The same is showed in admin panel, but no showed in front end:

If i add by admin panel with checkbox "is_visible_on_front" is showed, my question is how enable this with the webservices?


texts: Set position on block depends on store config

texts:
I would like to show my block at top and bottom per page, depends on my store config (field where I choose "show on top / show at the bottom")
Please advice how I can use this config and show my block only at top or at the bottom per page.

Thanks.


texts:
Does anyone know where these errors come from and how to solve them !

  Failed to load for  element whose source is
  http://...pub/static/version1521024130/frontend.../fr_FR/text.js

I also see this in logs:

  main.INFO: Broken reference: the 'requirejs-config' element cannot be
  added as child to 'head', because the latter doesn't exist [] []

  main.INFO: Broken reference: the 'requirejs' element cannot be added
  as child to 'head', because the latter doesn't exist [] []

  main.INFO: Broken reference: the 'requirejs-config' tries to reorder
  itself towards 'requirejs', but their parents are different: 'head'
  and '' respectively. [] []

  main.CRITICAL: Unable to resolve the source file for
  'frontend/Smt/theme/fr_FR/text.js' [] []

Info: Im in developer mode, I deployed the static-content, clean cache, pub/static, var/view_preprocessed, generated but always the same thing.


texts: Magento 2.2.4 : Image full path not getting

texts:
In Magento2.2.4, I load product and get image path. But, It's just display image path like this : /m/b/mb01-blue-0.jpg

I want to get cached image path url. But, It's not get from which collection I load.

How to get it?

Please help me.


texts: SSL problem with Fooman Speedster on PHP 5.6

texts:
I'm using modman to handle the Fooman Speedster module. I have upgraded our Magento installation on our development server from 1.8.1.0 to 1.9.3.4. When I tried to enable Fooman Speedster I got an SSL error. I tried to upgrade the Speedster module to the latest version (3.0.15), but the problem is still there. This is what I get if I try to enable Speedster:

<!-- language: logg -->
Selftest failed with: Step 1 - OK
Unable to Connect to ssl://mydomain.com:443. Error #0:
Unable to Connect to ssl://mydomain.com:443. Error #0:
Unable to Connect to ssl://mydomain.com:443. Error #0:
Please read the manual for details.
Starting Fooman_Speedster_Model_Selftester
Default store loaded
Magento version: 1.9.3.4
Speedster DB version: Not installed
Speedster Config version: 3.0.15
Checking file locations
Checking rewrites
Checking database
Found file with extra whitespace trailing: /var/www/html/mydomain.com/.modman/Dibspw_Dibspw/app/code/community/Dibspw/Dibspw/Model/Observer.php
RecursiveDirectoryIterator::__construct(/var/www/html/mydomain.com/.git): failed to open dir: Permission denied
Self-test finished

Running PHP version 5.6:

<!-- language: terminal -->
$ php -v
PHP 5.6.30-0+deb8u1 (cli) (built: Feb  8 2017 08:50:21)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

I don't know if it's relevant, but when I go to System - Configuration - Fooman Extensions/Support, I get the following in var/log/system:

<!-- language: logg -->
2017-09-11T08:24:47+00:00 CRIT (2): Not valid template file:adminhtml/default/default/template/fooman/common/selftester.phtml

Update 1

The Not valid template file-problem above was fixed with Symlinks cause ‘Not valid template file’ in Magento 1.9.3.4

Update 2

The SSL problem was indeed a server configuration problem as suggested by @Kristof at Fooman. In my case, I was missing a CA certificate.

Now I get a new error message:

<!-- language: logg -->
Selftest failed with: Step 1 - OK
Step 2 - OK
Step 3 - OK
Step 4 - OK
Starting Fooman_Speedster_Model_Selftester
Default store loaded
Magento version: 1.9.3.4
Speedster DB version: Not installed
Speedster Config version: 3.0.15
Checking file locations
Checking rewrites
Checking database
Found file with extra whitespace trailing: /var/www/html/mydomain.com/.modman/Dibspw_Dibspw/app/code/community/Dibspw/Dibspw/Model/Observer.php
RecursiveDirectoryIterator::__construct(/var/www/html/mydomain.com/.git): failed to open dir: Permission denied
Self-test finished

Update 3

I have manually checked step 1-4 according to the user manual and they work perfectly, just as the test output says. That makes me suspect the last lines in the end of the output: the whitespace trailing and the RecursiveDictoryIterator. But what can I do about that? I do not want to make the .git-directory available for the webserver and I don't want to edit the code of my modman modules...


texts:
I'm planning on moving my Magento store from one server to another. The current server is an Apache server and I just got notified the new webserver will be an Nginx server. The hosting company noted that the new server doesn't support .htaccess files.

Since I already have a store I am worried what I should do about my existing .htaccess file


texts:
I am running Magento 1.8.1.0 Community and have over 700 simple products that need images assigned to them. These images are already assigned and uploaded to the configurable products.

I have done a catalog export and made a new sheet with only one product (config & simple) on it, copied image paths into the proper places, but when I do the import nothing has changed.

Google Docs - Click this to see what I am working with

I've seen articles about this being possible but can't seem to get it working for myself. Any help is appreciated.


texts: Can I Delete The Thousands Of URL Rewrites?

texts:
I am wanting to add redirects from old site URL to new site URLs however when I go into URL Rewrite Management there are over 8,000 records there already. Can I delete these?

Most of them are in the following format:
ID  Path: product/1483
Request Path: brilliant-whisper-300-1483.html
Target Path: catalog/product/view/id/1483

I'm hesitant about deleting them if they are necessary...


texts: SKU Auto Generator with Prefix and sufix

texts:
I am trying to create a code that generated:

1) a random prefix sku with four digits(3 integers and 1 char) that depends on the category (on the last sub category) so for all product that are in the same sub-category the prefix should be the same!

2) a random suffix three digits (it could be only integers or 2 integers 1 char but no only char's)

3) between the prefix and suffix the should be a  - (minus)

I already have a code that creates a the next sku, that Increment the SKU of the last edit product

<?php
$dbread = Mage::getSingleton('core/resource')->getConnection('core_read');
$sql = $dbread->query("SELECT * FROM catalog_product_entity ORDER BY created_at DESC LIMIT 1");
$res = $sql->fetch();
  ?>
 <script type="text/javascript">
   if(document.getElementById('sku').value == ""){
 document.getElementById('sku').value = <?php echo (int)$res["sku"] + 1; ?>;
}
 </script>

Hope you could help me

EDIT

SO that is the category and if I add a product and Select X more then one category, then it should take only the prefix from  the last selected category, the last one is Men

Example
root
    Clothing & Shoes   x                      Prefix: 2088-
                    Clothing    x             Prefix: 2058-
                            Women
                            Men    x          Prefix: 2002-
                    Shoes

maybe we could take th category id number + 2 digits more if there is only one or two digits only


texts: set min and max values for a field dynamically based on the value of drop down selected in magento

texts:
https://jsfiddle.net/05Ldg6uv/6/

I tried using angularJs referring the above link but the min and max fields did not get set in magento.

$setup->addAttribute('customer', 'nickname', array(
    'input'         => 'text',
    'type'          => 'number',
    'label'         => 'Roll Number',
    'min'          => '{{min}}',
    'max'         => '{{max}}',
    'visible'       => 1,
    'required'      => 1,
    'user_defined'  => 1,
    'admin_html'    => 1,
    'unique'        => 1,
));


texts: Get markup from, or include, overridden template

texts:
Does Magento 2 have a way to get an overridden template that a custom phtml file overrides? I need to make a tiny adjustment to a phtml file, and don't want to duplicate all the code and markup for the original template, just to make the small change.

A contrived example, within the custom template:

<?php

// Returns the processed output from the overridden template
$parentMarkup = $block->getOverriddenTemplateOutput();

?>

    <?= str_replace('Foo', 'Bar', $parentMarkup) ?>

Or another possible way, via requiring in the overridden template directly:

    <?php
    ob_start();
    // Returns the path of the overridden template
    require $block->getOverriddenTemplatePath();
    echo str_replace('Foo', 'Bar', ob_get_clean());
    ?>

The main reasons for wanting to do this are:

Better upgrade experience. If the overridden template file has markup changes, you don't need to sync those with the custom template.
Maintain Magento's template overriding functionality, without having to specifically require in the original template's path.
DRY templates. My custom template only needs to make a small change, so why should I have to duplicate the original markup?

Thanks


texts:
I am new to magento. I created a block to place this block in all pages, but this is showing double time in home page.

below is my code

//local.xml

            </block>
        </reference>
    </catalog_catagory_default>
-->

<page_one_column translate="label">
    <reference name="right">
        <block name="mtb.template" type="core/template" template="page/mtb/mytemplate.phtml"></block>
    </reference>
</page_one_column>

<page_empty translate="label">
    <reference name="right">
        <block name="mtb.template" type="core/template" template="page/mtb/mytemplate.phtml"></block>
    </reference>
</page_empty>

<page_three_columns translate="label">
    <reference name="right">
        <block name="mtb.template" type="core/template" template="page/mtb/mytemplate.phtml"></block>
    </reference>
</page_three_columns >

<page_two_columns_left translate="label" >
    <reference name="right">
        <block name="mtb.template" type="core/template" template="page/mtb/mytemplate.phtml"></block>
    </reference>
</page_two_columns_left>

and //catalog.xml

<reference name="left">
            <block name="mtb.template" type="core/template" template="page/mtb/mytemplate.phtml"></block>
</reference>

<reference name="right">
          <block name="mtb.template" type="core/template" template="page/mtb/mytemplate.phtml"></block>
</reference>

my block is

can any one tell me where i went wrong?

if my block show in all pages what I can do?

thanks in advance.


texts: Product not display in product list page

texts: I have added products and set quantity is more than zero and stock status set to in stock and products also assign to specific categories but product not display in product list page.


texts: Breadcrumbs not showing the home and category names

texts:
Breadcrumbs is not showing the home ,category names in product details page.

It shows Only Product name. How do I resolve it,Please provide me a solution

In latest version 2.3.3 also same issue only showing Home > Product name Not

showing Name of category before product name

Like : https://prnt.sc/qg9rnb


texts:
I need to add pixel tracking code on checkout page which is provided by one of my affiliates.

How should I check whether the sales conversion is because of that particular affiliate?

Should I check URN code?

Please help me to get the procedure for doing this?

Is there any Magento extension for this?


texts:
Would be someone please be so kind and explained me structure of bundle products? I need to retrieve products in quote no matter if they belong to bundle or not, but if I get bundle product's item, then I see even more items than I actually have in quote. I mainly need to get product's quantity, sku, name, price, tax rate and tax amount.

I did not find suitable answer so please, do not mark question as duplicate if you do not have solution.


texts:
I am trying to integrate my store (community edition 1.9) with ShipWorks.

I have followed the instructions on both ends and for the most part everything is working as it should. However when I try to download the order data into Shipworks. I get an error that basically says there is something in this file (xml) that should not be there.
After a lot of back and forth with both ShipWorks and my hosting company I have narrowed the problem down to an extraneous character that is showing up in the xml, when viewed with notepad ++ it looks like a very small superscript asterisk.

I have further narrowed the issue and discovered that this character appears when ever the code:
$orders = Mage::getModel('sales/order')->getCollection();`

is called. I have tried looking at the Mage.php file to see if I can further deduce the problem but I am not entirely sure what to look for and don't want to start messing with core files.

Can anyone tell me whats happening/how to fix it?


texts:
We just updated from 1.8 to 1.9 and now our Shopping Cart Price Rule isn't working correctly.  The rule is to give 10% off orders $300 and more.  What it is doing now is giving 10% off on any item even if it's under $300.  The conditions state: If ALL of these conditions are TRUE:

Subtotal  equals or greater than  $300.00

As I said, this worked fine before the update.  Any suggestions on a fix?


texts:
i'm just getting started with Magento Enterprise and i have been given a existing Magento website to modify. They just want me swap two of the widgets that are aligned along the left side of their webpage.

I turned on Template Path Hints in the options menu to find where the widgets were located.. but i guess that's not what i'm looking for? what would i need to edit in order to swap the first widget's location with the second? also if you could include steps or simple instructions that would be great!

Thanks in advance for any help! Any and all help is appreciated! Even just tips to working with Magento Enterprise


texts:
If customer enter un support pincode admin will get mail ther How i can get Contact Number

    public function collectRates(Mage_Shipping_Model_Rate_Request $request){
        $postCode = $request->getDestPostcode();

        /* Get Information For Mail */
        $customer = Mage::getSingleton('customer/session')->getCustomer();

        $name = $customer->getName();
        $email = $customer->getEmail();
        $cart = Mage::getSingleton('checkout/cart')->getQuote();
        $productName = array();
        /*$skus = array();*/
            foreach ($cart->getAllItems() as $item) {
                $productName[] = $item->getProduct()->getName();
                /*$skus[] = $item->getProduct()->getSku();*/
            }
        $productNames = implode(', ', $productName);
        /*$productSkus = implode(', ', $skus);*/

        /* Get Information For Mail */

        $restrictedCodes = array(

    110001,
    110002,
); //restricted values. they can come from anywhere
    if (!in_array($postCode, $restrictedCodes)) {
 $template_id = 'my_custom_email';
    // Who were sending to...
    $email_to = 'mymail@gmail.com';
    $customer_name   = $name;
    // Load our template by template_id
    $email_template  = Mage::getModel('core/email_template')->loadDefault($template_id);

    $custom_variable = $name;
    $custom_variable1 = $email;
    $custom_variable2 = $postCode;
    $custom_variable3 = $productNames;

    // Here is where we can define custom variables to go in our email template!
    $email_template_variables = array(
        'custom_variable' => $custom_variable,
        'custom_variable1' => $custom_variable1,
        'custom_variable2' => $custom_variable2,
        'custom_variable3' => $custom_variable3,
        'custom_variable4' => $custom_variable4,
        // Other variables for our email template.
    );

    // In my case I am using the Store Name as sender name here.
    $sender_name = Mage::getStoreConfig(Mage_Core_Model_Store::XML_PATH_STORE_STORE_NAME);
    // In my case I am using the general store contact here as the sender email.
    $sender_email = Mage::getStoreConfig('trans_email/ident_general/email');
    $email_template->setSenderName($sender_name);
    $email_template->setSenderEmail($sender_email);

    //Send the email!
    $email_template->send($email_to, $customer_name, $email_template_variables);

    /* Send Mail to admin If Customer try to place order with unsupport Pincode*/
         return false;

    }


texts: how to allow edit access of product attribute based on Admin user role?

texts:
There is a custom product attribute that is being saved from the product edit page. But I want to allow access to specific admin users and not all admin users.

how to achieve the same?

Thanks...


texts: Programmatically add multiple breadcrumbs paths in Magento1?

texts:
My products are in many categories like the following :

  Home-> Oral Care-> ToothPaste and Powders->Toothpastes

  Home -> Oral Care  Kids Oral Hygiene -> Toothpastes

I don't know this task how to implemented.

Can you please help me?


texts: How to call third party fonts API in order confirmation email?

texts: I want to integrate third party fonts in my order confirmation email using API. Anyone know how to call third party API in my order confirmation email ?