texts: Magento CE Upgraded from 1.9.1.0 to 1.9.2.0 - Multi-Store - theme switches logos

texts:
I just updated a Magento CE site from 1.9.1.0 to 1.9.2.0. This is a multi-store site. Two stores, two domain names, one Magento installation, one server. And these stores, this Magento installation, has been working fine for a long time.

After what seemed a smooth and successful update to 1.9.2.0 I noticed that seemingly at random one of the two sites will display the logo and a footer banner from the 'other' store.

There are two separate themes set up - one for each store. The multi-store is implemented using a separate directory for the second store with it's own index.php file (also updated manually as part of the 1.9.2.0 update) and all other directories are symbolic links back to the main Magento installation.

At time A, store 1 displays the theme for store 1 and the logo and footer banner for store 1. AND store 2 displays the theme for store 2 the logo and footer banner for store 1. If time passes or I refresh the cache or some other random event occurs then...

At time B, store 1 displays the theme for store 1 the logo and footer banner for store 2 AND store 2 displays the theme for store 2 the logo and footer banner for store 2.

Each store always shows the correct theme (store 1 and store 2 themes are distinctly different). But they randomly (seemingly) show a logo image and footer banner that is incorrect.

It is worth noting that both the logo image and footer banner are defined in CMS static blocks. So each store has a static block for the header logo and one for the footer banner.

I would appreciate any brainstorming ideas on how to quickly identify and resolve this issue.


texts:
My registration page is using a register.phtml located under certain path, which I know. But I don't know where the associated xml layout file is located, because it was already defined and I didn't do it.

But I want to use another .phtml file. My problem is that I am not able to find which layout is defining the .phtml that will be used. Or at least, the one it's supposed to be seems not to be the one that's being used.

I have been trying without success to obtain the layout that's being used. I tried using

<?php echo $this->getLayout()->getBlock('customer_form_register')->getXml(); ?>

and some similar things, but without success. I already activated from the admin the path and block hints.

I need to know which layout is defining the used register.phtml. Any help is much appreciated.


texts: How to adjust Magento 2 Thumbnail slider Width so the arrows are not "over the slider"

texts:
In Magento 2 the arrows of the thumbnail slider are "over the thumbs".

What I want is this : < image 1 image 2 >

An example can be seen in the magento marketplace itself.

https://marketplace.magento.com/aheadworks-module-rma.html

Here is a random product I took from the homepage, as u can see the arrows are nicely visible than in middle you have the thumbs.

On my site, the arrows are over the thumbnails as the shaft is equal width of the gallery.

I think this is done in fotorama.js but I'm not sure how.

Thanks in advance!


texts: Magento 2 customer logged out if clicked checkout button more than one

texts:
If I clicked "checkout" button , while page is loading to checkout page , I click the button again, the system will make me logged out.

Have someone met this problem?


texts: Magento set “Links can be purchased separately” to “No” for all downloadable products programmatically

texts:
I am using Magento CE 1.9.2.2 in my site.

How can I set Links can be purchased separately admin setting to No for all downloadable products programmatically.

I have tried following but it doesn't work:

<?php
error_reporting(E_ALL);
require_once './app/Mage.php';
umask(0);
Mage::app('admin');

$productCollection = Mage::getModel('catalog/product')->getCollection()
                                                    ->addFieldToFilter('type_id', "downloadable");
foreach($productCollection as $product):
    $product->setData('links_purchased_separately', false);
    $product->save();
endforeach;


texts: Magento 1.9 : How to add product with discount automatically in the shopping cart?

texts:
Hope you're all doing well.

I need some guidance in how or if some tool already exist for this:

If an specific product enters the shopping cart, automatically one other specific product appears in the cart, but with discount.

I would really appreciate some help.


texts: I need to Override Default Magento 2 ProductInterface to add extra key's to Product Details API response.


texts: How to override .phtml files in Magento 2 without customising theme

texts: I just want to override the customer account and login form for adding custom fields and external link. How do I do that using custom module please avoid creating the theme or customize the theme.


texts: How can Change the load order of stylesheets so that apptrain module css loads before custom.css and site-specific.css

texts: I have installed apptrian in my site. Now I have to change the load order of stylesheets so that apptrain module css loads before custom.css and site-specific.css. I am working in local. Where can I change the load order and how can i test it. Any helps are appreciable.


texts:
$category = Mage::getModel('catalog/category')->getCollection();
            $category->addAttributeToFilter("Top_Menu" , array('eq' => '146'));
            $category->addAttributeToFilter("entity_id" , array('eq' => $catId));
            $category->load();
            $category->getName();

When I use this code i get this error

Fatal error: Call to undefined method Mage_Catalog_Model_Resource_Category_Flat_Collection::getName()


texts: How to get the name of the country from the ip address in magento 2. I think it will require me to use geoip, but I don't know how to do it. Any help?


texts: Magento 2 : USPS Unable to read response, or response is empty

texts:
I signed up for the shipping API of USPS and put my test credentials from Magento 2 admin panel. Still I am unable to fetch the shipping rates for USPS carrier. On front end it shows -

The error reads as - "This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us."

After checking in log folder in debug.log, I found this entry -

The log file reads - "Unable to read response, or response is empty"

I have been scratching head for about 4 hrs now. I am pretty sure my credentials are correct. What could be possibly wrong?

I am using Magento ver. 2.0.13.

Hugely appreciate any help :)


texts: Join Catalog Search Query with categories related products fetch only

texts: I want to fetch only some categories products when user search front end. So how catalog search query join with category table related product onyl


texts: Search Box text "Search entire store here..." not being translated

texts: I have installed and setup the french language pack as detault for my Magento store and the language is being applied to the very top grey line but, as you can see below, the search box text "Search entire store here..." is not being translated and the same goes for the "Enter your email address" in the Subscribe box text as well as the subscribe button. Any ideas?


texts:
Below error appears on api call ,
[2020-06-18 07:57:42] main.CRITICAL: Report ID: webapi-5eeb1e76e4607; Message: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento2.catalog_category_product_index_store0' doesn't exist, query was: SELECT `main_table`.* FROM `wishlist_item` AS `main_table`

Any idea how to solve it ?


texts: Moving Gift message form block from Cart to Checkout step 1

texts:
I'm trying to move the Gift Options block(gift message form) from the current Shopping cart page to the first step of the Checkout (Shipping). I need to place it right under Shipping Methods. I tried adding a GiftMessage module to my theme and within this modified the layout file checkout_index_index.xml to reference the checkout root block for Gift Message insertion, but it was of no use. Any help would be greatly appreciated. Thanks!

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="checkout.root">
        <block class="Magento\GiftMessage\Block\Cart\GiftOptions" name="checkout.cart.order.actions.gift_options" template="cart/gift_options.phtml" cacheable="false">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="types" xsi:type="array"/>
                    <item name="components" xsi:type="array">
                        <item name="giftOptionsCart" xsi:type="array">
                            <item name="component" xsi:type="string">Magento_GiftMessage/js/view/gift-message</item>
                            <item name="config" xsi:type="array">
                                <item name="template" xsi:type="string">Magento_GiftMessage/gift-message</item>
                                <item name="formTemplate" xsi:type="string">Magento_GiftMessage/gift-message-form</item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </block>
    </referenceBlock>
</body>


texts: Where is .cvs file for the email translation in Magento2

texts:
I want to change some styles and translation in: the body, the name that appear in "name from" of the inbox and subject of the mails of Magento is sending.
Where are need to make the changes?

I'm using Magento2 and i looked in this path:

  \app\design\frontend\{nameTheme}\{nameTheme}\i18n\

And found a .cvs file with some translation, but none of them have the sentences i'm looking for.

Is it okey if i add the sentence I want to translate in the file that i found in the path?
Where else i need to check?
The .cvs file can store the translation of the subject and the name from that you see in your inbox?

If anyone can explain me where Magento 2 took the translation for the mails and the templates to build the email and sent it, it will me awesome!!!

Note: all the sentence of the templates were written like this: {{trans "View past orders"}}. So the content of the mails are dynamic.

Thank you very much!!!


texts: Wrong email href tag link for magento 2.4.2 shipment email

texts:
I have followed a below code for adding tracking link to my shipment email.
/app/design/frontend/Custom/theme/Magento_Sales/templates/email/shipment/track.phtml

<?php
    $trackurl = '';
    if($_item->getCarrierCode() === 'fedex'){
        $trackurl = 'https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber='.$_item->getNumber();
    }elseif ($_item->getCarrierCode() === 'usps') {
        $trackurl = 'https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1='.$_item->getNumber();
    }elseif ($_item->getCarrierCode() === 'ups') {
        $trackurl = 'https://wwwapps.ups.com/WebTracking/returnToDetails?tracknum='.$_item->getNumber();
    }
    ?>

        <?= $block->escapeHtml($_item->getCarrierCode()) ?>:

         <a href="<?php echo $trackurl ?>"><?php echo $this->escapeHtml($_item->getNumber()) ?>

When i click on link then its redirecting me to another random url with suffix 3D.
http://url9157.demo.com/ls/click?upn=tbzC-2FQ-2FXJvoNAIfXDjYGpG5qG-2B-2FQgolglhkAgEosZcnLzi7zZuiieXRZ6YYBissP6qclVR9e7Ctdnr0mkCFRpDNJpU8uEjGx3xoe8qQpSd1Lx4qWjasMfEfwapIMZYO0BYvrXa88KBaVekFa2X-2F05U39-2FtTfPCOkEXwbcMwZcar93U4ALrvF58hswnsgXL7LAoWY_kbsIQ9pIaNRQQPhtVzdfT-2BFugGBuGtE5YPB7H9ENlRFNQJlsZlLwnIxHn0RKbjMMiIK4P29nf-2B2KInUjRCggEyWRbHKZyZ3zqjdZeqnIoLTZqn2fVpMk0-2FbyYDBiBk3Kzkm6UTXoUPlqhsWE3ZHKqNpyoinR9c2FNOk32y5LJtxngx1K5-2BP5bE5ZCEaypQpd5pjhNCBOf44lUoFIg5MpNQ-3D-3D

$trackurl variable has a correct value but value is changed when its inside href tag.
please help to resolve a issue.


texts: Magento2 , how to remove decimal values from layered navigation

texts: I'm trying to find out if there is any way to remove decimals from layered navigation. We don't have product prices with decimals but Magento show 0-99.99,100-199.99 etc. How this can be achieved?


texts: Magento 2.4.2, Magento 2.4.1-p1 and Magento 2.3.6-p1 all available on 9 February 2021. Which to choose?

texts:
We tried upgrading to Magento 2.4.1 but are having many issues so we are going to postpone the upgrade.
The full and final versions of Magento 2.4.2, Magento 2.4.1-p1 and Magento 2.3.6-p1 will be available to the general public on 9 February 2021.
Which of these would you recommend and why?


texts: How to get the value of a input box in a single product page and display it in the admin section?

texts:
I have a input box on Product detail page, to enter a message. I want that message to be display in Items Ordered section asAdditional Information column in product table.

My input box is

<input type="text" placeholder="eg., Happy Birthday!" id="msg">

Can anyone say how to get the value of input box and display in the additional information column.


texts: How to completely remove Magento Product URL re writes

texts:
I have imported in a large number products into a store that is not live (Magento CE:1.9) but now need to correct their URLS.

Ideally I want to correct the correct URLS via an CSV import (system > import> data flow profile)

If I truncate the 'core_url_rewrites' table and then check in the admin (catalog > url re writes) it appears that the re writes have gone.

If I then import in the new URLs they appear in the admin (Product > URL path) but then reindex the URLs, they do not update to the new ones - the original ones are retained.

It appears that the 'core_url_write' contains the custom re-writes not the system (or other) ones.

How can either remove the fully remove the product URLs, or even completely remove the product and their URLs so they can be re imported and use their corrected ones.


texts: Incompatible argument type: Required type: array in Mageno 2.3.6 during compilation

texts:
Incompatible argument type: Required type: array. Actual type: \Aheadworks\Giftcard\Model\DateTime\FormatConverter;

namespace Aheadworks\Giftcard\Block\Adminhtml\Product\Composite\Fieldset;

use Aheadworks\Giftcard\Model\DateTime\FormatConverter;
use Magento\Framework\Pricing\PriceCurrencyInterface;
use Magento\Framework\App\Http\Context as HttpContext;
use Magento\Email\Model\Template\Config as EmailConfig;
use Magento\Framework\Mail\Template\FactoryInterface as TemplateFactory;
use Magento\Catalog\Model\Product\Media\Config as MediaConfig;
use Magento\Backend\Model\Auth\Session as AuthSession;
use Magento\Catalog\Block\Product\Context as ProductContext;
use Magento\Framework\Url\EncoderInterface as UrlEncoderInterface;
use Magento\Framework\Json\EncoderInterface as JsonEncoderInterface;
use Magento\Framework\Stdlib\StringUtils;
use Magento\Catalog\Helper\Product as ProductHelper;
use Magento\Catalog\Model\ProductTypes\ConfigInterface as ProductTypesConfigInterface;
use Magento\Framework\Locale\FormatInterface as LocaleFormatInterface;
use Magento\Customer\Model\Session as CustomerSession;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Config\Model\Config\Source\Locale\Timezone as TimezoneSource;

/**
 * Class Giftcard
 *
 * @package Aheadworks\Giftcard\Block\Adminhtml\Product\Composite\Fieldset
 */
class Giftcard extends \Aheadworks\Giftcard\Block\Product\View
{
    /**
     * @var AuthSession
     */
    private $authSession;

    /**
     * @param ProductContext $context
     * @param UrlEncoderInterface $urlEncoder
     * @param JsonEncoderInterface $jsonEncoder
     * @param StringUtils $string
     * @param ProductHelper $productHelper
     * @param ProductTypesConfigInterface $productTypeConfig
     * @param LocaleFormatInterface $localeFormat
     * @param CustomerSession $customerSession
     * @param ProductRepositoryInterface $productRepository
     * @param PriceCurrencyInterface $priceCurrency
     * @param AuthSession $authSession
     * @param HttpContext $httpContext
     * @param TemplateFactory $templateFactory
     * @param EmailConfig $emailConfig
     * @param MediaConfig $mediaConfig
     * @param TimezoneSource $timezoneSource
     * @param FormatConverter $dateFormatConverter
     * @param array $data
     */
    public function __construct(
        ProductContext $context,
        UrlEncoderInterface $urlEncoder,
        JsonEncoderInterface $jsonEncoder,
        StringUtils $string,
        ProductHelper $productHelper,
        ProductTypesConfigInterface $productTypeConfig,
        LocaleFormatInterface $localeFormat,
        CustomerSession $customerSession,
        ProductRepositoryInterface $productRepository,
        PriceCurrencyInterface $priceCurrency,
        AuthSession $authSession,
        HttpContext $httpContext,
        TemplateFactory $templateFactory,
        EmailConfig $emailConfig,
        MediaConfig $mediaConfig,
        TimezoneSource $timezoneSource,
        FormatConverter $dateFormatConverter,
        array $data = []
    ) {
        parent::__construct($context,$urlEncoder,$jsonEncoder,$string,$productHelper,$productTypeConfig,$localeFormat,$customerSession,$productRepository,$priceCurrency,$httpContext,$templateFactory,$emailConfig,$mediaConfig,$timezoneSource,$dateFormatConverter,$data);
        $this->authSession = $authSession;
    }


texts: Magento 2 : How can I get the sitemap in magento 2?

texts:
How we create the sitemap page in Magento 2 like same we have in Magento 1?

http://example.com/catalog/seo_sitemap/


texts: Changing file permissions to 777 breaks website

texts: I am trying to install a theme to a magento site, but running setup:upgrade after the files are transferred breaks all css and javascript. I read that the file permissions may be an issue, so after running chmod -R 777 .  the whole site breaks, and returns a 500 Internal Server Error. What can I do to install this theme without breaking the site, and if it is a permissions problem how do you change the file permissions without breaking the website?


texts: Magwnto2 while importing products via CSV set qty to 'No manage stock'

texts: I am importing products via CSV in magento2, but I want to import product qty as 'No manage stock' how can I achieve that.


texts: Magento2 : Theme scripts symlinks not created in developer mode

texts:
I'm struggling with an issue for hours now and I really don't get it.

I'm using Magento 2.2.1 in developer mode and my scripts symlinks are not created.

Here is my project structure

--app/
----design/
------frontend/
--------vendor_name/
----------theme_name/
------------web/
--------------css/
----------------source/
------------------(all less files) - symlinks works
--------------js/
----------------source/
------------------app.js (entry point)
------------------utils/
------------------(rest of scripts)

FYI, I use gulp instead of grunt but it works juste the same.

So when I use $ gulp exec --theme_name the less files symlinks are well generated but the rest of the theme is not.

When I go on my application, the theme folder in pub/static is populated with other theme's assets but nether with my scripts.

I searched many things and tried to change in app/etc/di.xml the following entry :

<virtualType name="developerMaterialization" type="Magento\Framework\App\View\Asset\MaterializationStrategy\Factory">
    <arguments>
        <argument name="strategiesList" xsi:type="array">
            <item name="view_preprocessed" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink</item>
            <item name="default" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink</item>
        </argument>
    </arguments>
</virtualType>

currently in my di.xml

But nothing.

I also tried to deploy static static-content, source-theme, nothing.

I think I'm not really understanding those core functionality and what they really do.

Does anyone have an idea regarding this issue ?

Thanks


texts: Magento 2: How to check if checkout payment page

texts:
I'm looking on how to check if i'm standing at checkout payment page, which have url "fudu.magento.net/checkout/#payment" by php or by js.
I was trying to use to get url, but it always return checkout_index_index
To be clear, i want to compare between shipping page and payment page, which have url is "checkout/#shipping" and "checkout/#payment".

EDIT 1: I've trying using script to check css display:none of #shipping, but it doesn't work either, because when i click "next" in shipping page, it will not render any js out after that.

  my js code:

function checkIfPaymentPage(){
                if($('#shipping').css('display') == 'none'){
                    console.log('worked');
                }
            }

After i click "next", nothing appear in inspect console:

EDIT 1:

 I'm using  window.setInterval(function(){ //code }, 3000); and it worked for me to testing, but i don't thing this is the best practice, so if you guys have any other solutions, please tell me :)

Thanks for reading.


texts: Magento 2.1.x EE (Enterprise Edition) - How to enabled and access cms page versioning

texts:
Hi i am working on Magento 2.1.x EE and reading the devdocs i got to know magento ee has cms page versioning functionality

Where we can preview/publish version wise cms page and we can also  track the record of cms page versioning content wise as well

I have read this magento offical doc as well - http://docs.magento.com/m2/2.0/ee/user_guide/cms/page-version-control.html

Here they have mention need to enable from store->configuration->cms page in **magento 2.0 **

But i am unable to find this option in m2 ee 2.1 anybody knows about cms versioning in m2 ee 2.1.x ?

Your help will be appreciated..

Thanks


texts:
Here is the config.xml

<admin>
    <routers>
            <adminhtml>
                        <args>
                            <modules>
                                <Example_Csfollowup before="Mage_Adminhtml">Example_Csfollowup_Adminhtml</Example_Csfollowup>
                            </modules>
                        </args>
            </adminhtml>
    </routers>
</admin>

here is the controllers at app\code\local\Example\Csfollowup\controllers\Adminhtml\CustomController.php

class Example_Csfollowup_Adminhtml_CustomController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {

        echo 'abc';

        //$this->renderLayout();
    }

    public function listAction()
    {

    }
}

but when i visit localhost/m1/index.php/admin/custom, it redirect me to 404, anyone know what is the url it should be?


texts: Add navigation menu beside the logo in the header magento 2

texts:
I use Magento2 with sample data Luma theme and I applied a new custom theme
Now I need to know the right way to add the navigation menu inside the header I want it between the logo and search box


texts:
I've installed the Solr server on Tomcat, and the basics work just fine - but I can not get suggestions or recommendations to work at all.  (Magento Enterprise 1.14.01 and Solr 3.6.2)

If I take the GET string that is sent to Solr from Magento and run it in a browser, I see the basic results - but no suggestions.

But if I watch the log from Tomcat, the Solr server is processing and knows about suggestions that it should return... but they are not being sent back in the response json.

Example:

What I send to Solr

http://dev.samplesite.com:8080/solr/select?sort=score+desc&stats=true&stats.field=price_0_1&qt=magento_en&fq=%28visibility%3A3+OR+visibility%3A4%29+AND+store_id%3A1&version=1.2&wt=json&json.nl=map&q=bluu&start=0&rows=0

What I receive back from Solr

{"responseHeader":{"status":0,"QTime":185,"params":{"sort":"score desc","start":"0","stats.field":"price_0_1","stats":"true","q":"bluu","json.nl":"map","qt":"magento_en","wt":"json","fq":"(visibility:3 OR visibility:4) AND store_id:1","rows":"0","version":"1.2"}},"response":{"numFound":0,"start":0,"docs":[]},"stats":{"stats_fields":{"price_0_1":null}}}

But in the Solr log, I see these two lines

Jun 02, 2014 8:49:09 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select params={sort=score+desc&json.nl=map&wt=json&rows=1&version=1.2&fl=id&start=0&q=blue&qt=magento_en&fq=(visibility:3+OR+visibility:4)+AND+store_id:1} hits=1405 status=0 QTime=1
Jun 02, 2014 8:49:09 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select params={sort=score+desc&json.nl=map&wt=json&rows=1&version=1.2&fl=id&start=0&q=bleu&qt=magento_en&fq=(visibility:3+OR+visibility:4)+AND+store_id:1} hits=1 status=0 QTime=8

Solr clearly knows that "blue" has 1405 results and "bleu" has 1 result... which is accurate for our catalog - but something is keeping those suggestions from being sent back to Magento in the JSON string

I'm using the default solrconfig.xml (and other conf files) from sample created by Magento in the apache lib folder.

In the Magento Config for Solr:

Enable Search Suggestions? Yes
Search Suggestion Count? 2
Show Results Count for Each Suggestion? Yes
Enable Search Recommendations? Yes
Search Recommendations Count? 5

I feel like I'm missing something very simple... any suggestions?


texts:
I'm getting a 403 Forbidden error on one of my Magento webshops. It is a multi-shop Magento installation. For the main/base webshop I have created a new version, so the main/base URL's had to be changed for the old version.

The old version now has a dummy/test domainname as Base URL but it is giving me a 403 Forbidden error. This is frustrating because I need to be able to access the backend to see orders and information on the other webshops wich are running on this multi-store Magento installation.

Situation:

OLD SERVER:

DOMAINS:

main.nl <- This is replaced by test/dummy.nl which now gives a 403
sub1.nl
sub2.nl

NEW SERVER

DOMAINS:

other main.nl
main.nl (domain migrated from old server to new magento installation)


texts: Magento 2 - I Need to disable cash on delivery to specific states

texts:
I am using magento 2. And I need to disable one payment method 'cash on delivery' to specific states.
Any help will be appreciated.


texts: product view count table in database magento 2?

texts:
I have to write code for getting product count.it is working fine but i want to know where the count record comes?

public function getProductCount($id)
{

    $prodData = $this->_prodCollection->addViewsCount()->getData();

    if (count($prodData) > 0) {
        foreach ($prodData as $product) {
            if ($product['entity_id'] == $id) {
                return (int) $product['views'];
            }
        }
    }

    return 0;
    }


texts:
I have custom email. I have passed HTML inside variable as follows.

But the issue is it is printing HTML instead of table

public function getTable()
    {

        $data = $this->getRequest()->getPostValue();
        // echo "
";
        // print_r($data);
        // die();
        $size = substr_count($data['product_id'],',') + 1;
        $tot_arr = array();
        $value = array();
        $title = array();
        $first_spt = explode(',', $data['optiontitle']);
        $first_spt_val = explode(':', $data['optionvalue']);
        // for ($i=0; $i < 2; $i++) {
        //     $tot_arr[$i]['title'] = explode('@@', $key);
        // }
        foreach ($first_spt as $key) {
            $title[] = explode('@@', $key);
        }

        foreach ($first_spt_val as $key => $val) {
            $searchForValue = ',';
            if( strpos($val, $searchForValue) !== false ) {
                $str_arr = preg_split ("/\,/", $val);
                foreach ($str_arr as $str_arrkey) {
                    //echo $key;die;
                    $value[$key][] = explode('@@', $str_arrkey);
                }
            }else{
                $value[] = explode('@@', $val);
            }

        }

        $html = "
";

        $new  = array();
       for ($i=0; $i < $size; $i++) {

            $html .= "
";

            // $title[$i] = isset($title[$i]) ? $title[$i] : null;

            foreach ($title[$i] as $col) {
            $html .= "" . $col . "	";
            }

            $html .= "
";
            $html .= "
";
            // echo "
";
            // print_r($value);
            // die();

            if ($this->contains_array($value[$i]) == 'true') {
                foreach ($value[$i] as $key) {
                    $html .= "
";
                    $new = array_slice($key, 1, -1);
                    foreach ($new as $col) {
                        $html .= "" . $col . "	";
                    }
                    $html .= "
";
                }
            }else{
                $new = array_slice($value[$i], 1, -1);
                foreach ($new as $col) {
                    $html .= "" . $col . "	";
                }
            }

            $html .= "
";

           //$value[$i]
       }

        $html .= "
";
         // echo "
";
         //    print_r($html);
         //    die();
        return $html;
    }

For call this in templateoptions variable I have addded

$optionTitle = $this->getTable();

Output is like

I need to print table & not table tags

My type is HTML in email_templates.xml

Template HTML I have added

                                                {{var optionTitle}}
</n>
                                                {{var optionValue}}


texts:
We are preparing to launch 2 e-commerce sites using CE ver 1.9. Each site will begin with around 10000 sku's.

What are the key things we need to look for from a web host...are things such as database size, number of images, etc.. important?

Obviously, page load speed is very important also.

How do we best select a proper host?

Thank you


texts: How to change the current password optional

texts:
How do I change the current optional password in edit account section in Magento 2 as customer is already logged in, hence I don't want customer to put the current password again for the store.
How can I achieve this for my store?


texts: NOINDEX, NOFOLLOW for Product Reviews Magento 2

texts:
I haven't been able to work out how to do a noindex, nofollow of my product reviews in magento 2.3.4
I have a robot.txt setup with custom disallows including /review
But I'm still seeing it come up in my google search console.
Could someone help point me in the right direction.


texts: How to reflect type of currency in URL links?

texts:
As many of you know when switching currency in MAGENTO store, it does not reflect in URL's.

Let say your BASE store currency is in CANADIAN DOLLARS, when sending links by Email to customers in EUROPE, the page they will open will show CAD (Canadian dollar) prices rather than EURO. They have to manually switch currency in the top right corner of the website.

What to add at the end of all links so the prices are shown in EURO ?
I need  an ending like: ?_currency=EURO

www.exmaple.com/sport-equipment/soccerball/?_currency=EURO


texts: Type Error occurred when creating object Magento 2

texts:
I have created custom module and it's working fine in Dev, but it's not working on Production. It's throwing Type error.

Type Error occurred when creating object:
Tiny\ProductCustomization\Model\ResourceModel\Product\Collection\Interceptor,
Argument 5 passed to
Tiny\ProductCustomization\Model\ResourceModel\Product\Collection\Interceptor::__construct()
must implement interface Magento\Framework\DB\Adapter\AdapterInterface
or be null, string given, called in
/var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
on line 121 [] [] [2021-01-11 10:11:47] report.CRITICAL: Type Error
occurred when creating object:
Tiny\ProductCustomization\Model\ResourceModel\Product\Collection\Interceptor
[] []

My collection file as below
<?php

namespace Tiny\ProductCustomization\Model\ResourceModel\Product;

use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;

class Collection extends AbstractCollection
{

    protected $_idFieldName = 'id';

    protected function _construct()
    {
        $this->_init(
            'Tiny\ProductCustomization\Model\Product',
            'Tiny\ProductCustomization\Model\ResourceModel\Product'
        );
        parent::_construct();
    }

}

and di.xml
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <arguments>
            <argument name="collections" xsi:type="array">
                <item name="tiny_grid_data_source" xsi:type="string">Tiny\ProductCustomization\Model\ResourceModel\Product\Collection</item>
            </argument>
        </arguments>
    </type>
    <virtualType name="Tiny\ProductCustomization\Model\ResourceModel\Product\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
        <arguments>
            <argument name="mainTable" xsi:type="string">tiny_pro</argument>
            <argument name="resourceModel" xsi:type="string">Tiny\ProductCustomization\Model\ResourceModel\Product</argument>
        </arguments>
    </virtualType>

Can you please help me on this?


texts: Sell products by weight (kgs) in magento 1.9

texts:
I want to create a custom module in magento from where we can select product to be ordered based on weight (kgs.) not units.

For e.g If I want to sell apples, we will sell based on kgs. not units.


texts: Magento 2 | event before checkout#payment

texts:
is there an event which gets fired before you get to checkout#payment?

Thanks!


texts:
Working on localhost on a Mac (OS = Sierra)
Have installed Magento 2.1.7
Have install Data Migration Tools 2.1.7
Have set up config.xml as per instructions,
Attempting to migrate settings from 1.9.2.1 to 2.1.7

Error Message

  [Magento\Framework\Config\Dom\ValidationException]     EntityRef:
  expecting ';'                               Line: 101

I am not sure which file this is referring to...?


texts: Magento2 Credit memo error: "We found an invalid quantity to refund item"

texts: When I tried to create credit memo of even simple product, it gives me errror message "We found an invalid quantity to refund item "product_name".". I am not managing stock in my website. Please help.


texts:
I'm currently working with URL rewrites and I'm looking for a way to get the front name of a route from a module.

<router id="standard">
    <route id="support" frontName="faq">
        <module name="" />
    </route>
</router>

This is for a module that I'm customizing, not a new module. I don't want to have to change the id as I would probably need to change quite a bit of code.

I'd like to get the 'faq' front name by supplying the id 'support' (which it does for getUrl(), but that returns the front name appended to the base URL.

If all else fails I could probably just use the getUrl() method and just grab the last fragment I guess, but I'd like to use a better solution if possible.


texts:
I have a script for my Magento 1 stores to clean old Redis keys:

<?php

  count($argc) or die('<pre>:P</pre>');
  ini_set('memory_limit','1024M');
  set_time_limit(0);
  error_reporting(E_ALL | E_STRICT);
  require_once '../app/Mage.php';
  Mage::app()->getCache()->getBackend()->clean('old');

?>

which I run every night with a cron job. Can I use the same script for Magento 2?


texts: How to Create Access Token in Magento 2 integration

texts: I have created one new Integration and gave access but i did n't get Access token is there i doing anything wrong let me help to resolve this issue


texts:
Is there any way to filter custom options in Order items.

I have analysed that order items custom options are saved in sales_flat_order_item table under the column product_options.

My question is how to set addtofilter for custom options


texts: Magento 2 error report add prefix in file name

texts:
How i can add prefix for error report file name located in /var/report/?

Like : prefix_979188230854

Any suggestions please?


texts: Get productinfo from Observer controller_action_predispatch_checkout_cart_add

texts:
In Magento 2:
I have created the event observer:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="controller_action_predispatch_checkout_cart_add">
        <observer name="orange_conditions" instance="Namespace\Name\Observer\RestrictAddToCart" />
    </event>
</config>

In the observer execute method I would like to do the following:

Access the information (object) from the product I have clicked on.

To keep it simple: the SKU.
Later on I would like to have access to some other parameters. But first things first ...

Below code is a start, but it is not working. (found this in other questions)

public function execute(\Magento\Framework\Event\Observer $observer) {
        /** @var \Magento\Catalog\Model\Product $product */
        $product = $observer->getEvent()->getDataByKey('product');

        /** @var \Magento\Quote\Model\Quote\Item $item */
        $item = $this->_checkoutSession->getQuote()->getItemByProduct($product);

        $itemId = $item->getId();

        $this->_messageManager->addError($item);
        //set false if you not want to add product to cart
        $observer->getRequest()->setParam('product', false);
}


texts: Configuration page disappeared after disabling Magento extensions

texts:
I have disabled all of the Magento extensions from System > Configuration > Advanced. Now I can't see anything in the Configuration tab. I have attached the screenshot below:

What is the issue? How I can solve this?


texts: Unset `manufacturer_filter` block in Custom Layout Update

texts:
For just one particular category, I need to remove the manufacturer filter from the category sidebar.

My code for doing so (in the custom_layout_update field of the category editor) is here:

<reference name="catalog.leftnav">
  <action method="unsetChild"><alias>manufacturer_filter</alias></action>
</reference>

Simple stuff, and it properly removes that child block from the layout as I would anticipate.

However, functions inside Mage_Catalog_Block_Layer_View depend on every attribute in the _filterable_attributes property having an associated Block.

It appears that by editing Mage_Catalog_Block_Layer_View::canShowOptions to check for a "truthy" $filter, no errors occur and everything works as it should.

Is this a situation where I should override the class in local, or is there a preferred option?

Thanks!


texts:
I have been reading the forum but I can't find any solution to solve my case.

I have a custom module where I'm getting the error:

  1 exception(s): Exception #0
  (Magento\Framework\Exception\ValidatorException): Invalid template
  file: 'simulator.phtml' in module: '' block's name:
  'product.view.simulator'

My module works with Magento 2.2 but after upgrade to 2.3 it does not work. I use Mac & docker(Image:alexcheng/magento2:latest), no windows.
I think the problem is in the symlink which is not getting the right path.

File: catalog_product_view.xml (I have tried with template set to :simulator.phtml but it doesn't work)
I hace tried changing the module location:

  vendor//magento-2x/.. or app/code/...

but it now works

<?xml version="1.0"?>
<page xmlns :xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <body>
       <referenceBlock name="product.info.addtocart">
          <block class="<vendor>\<module_name>\Block\Product\Simulator"
           name="product.view.simulator"
           as="product_simulator"
           template="simulator.phtml"/>
       </referenceBlock>
    </body>
</page>

Some ideas?

Thanks in advance.

Solution: The problem was solved enabling symlinks to template(Advance->Developer in magento admin panel), but I have read that it's dangerous :S


texts: Alan Storm's Layoutviewer not working after manual install

texts:
Magento version: 1.9.2.4

I am currently working through this tutorial, and am trying to install the Layoutviewer module.

I following the link on the page to where I could get the layout viewer, and then used the manual install guide on this page to install it.

The module is being detected by magento, and is listed on the Disable Modules Output section (it is enabled).

The directory tree for the module is as follows:

magento1
    app
        code
            local
                Magentotutorial
                    Layoutviewer

I have also made sure that the config file's name and contents are 100% correct.

When I try to use the module (http://127.0.0.1/magento1/helloworld/index/index/?showLayout=page) it doesn't work, and just shows me the screen as it was before.

Is there anything I could be missing, or did I perhaps install the module incorrectly?

edit

I have already found this previous question that is basically identical to mine, but it's very old so I don't want to comment on in - it did not help me solve the problem.


texts:
I'm working on creating a custom option for my products automatically any time a product is created. What I've got so far is an observer that fires on the catalog_product_save_before event and runs the following code:

    //check that we haven't made the option already
    $options = $product->getProductOptions();
    foreach ($options as $option) {
        if ($option['title'] == 'Auto Date & Time' && $option['type'] == 'date_time' && !$option['is_delete']) {
            //we've already added the option
            return;
        }
    }
    $options[] = array(
        'title' => $product->getDateLabel(),
        'type' => 'date_time',
        'is_require' => 1,
        'sort_order' => 0,
        'is_delete' => '',
        'previous_type' => '',
        'previous_group' => '',
        'price' => '0.00',
        'price_type' => 'fixed',
        'sku' => ''
    );
    $product->setProductOptions($options);
    $product->setCanSaveCustomOptions(true);
    //this line doesnt make sense here, but it works ... kinda
    $product->save();

If I leave the $product->save() in, I wind up with 2 custom options being created, even though I've check to verify the 2nd time the event fires the return statement is called in the foreach loop.

If I take it out. No custom options are created.

Can someone tell me what I'm doing wrong?
I'm working with Magento 1.7


texts:
How do I call the Magento API SOAP V2 with multiple complex filters to the same field? In my case I use the salesOrderList function.

This source code does not work:

$params = array(array(
        'complex_filter' => array(
            array(
                'key' => 'increment_id',
                'value' => array(
                    'key' => 'nlike',
                    'value' => 'a_%'
                ),
            ),
            array(
                'key' => 'increment_id',
                'value' => array(
                    'key' => 'nlike',
                    'value' => 'e_%'
                ),
            ),
        )
    ));

$result = $client->__call('salesOrderList', $params);

The final sql code only contains:

AND (increment_id NOT LIKE 'a_%')

But it should contain:

AND (increment_id NOT LIKE 'a_%') AND (increment_id NOT LIKE 'e_%')

For SQL it doesn't matter how many 'LIKE's I apply to a field?!!

What am I doing wrong?


texts: Difference Between setData() and addData()

texts:
What's the difference between setData() and addData()?
Is there a connection if I update a product or set a new one?


texts: How to remove temp/cache files from linux Debian?

texts: Here is the snapshot for your reference and I didn't understand why my disk space killing automatically.


texts: Overriding default magento exception handler

texts: How would I aproach this? Everything I found so far informed me about extending magento exception handler, although I want to override, or if it's not possible then call my custom handler when exception is thrown / error is found, the default magento exception handler so I can do and print whatever I want, where should I start?


texts: Cannot get custom frontend ajax layout to load

texts:
I always have challenges identifying the proper handles for everything, so please bear with me here.  I've scoured Google, SE, and tried myriad variations, with no luck.  (And yes, I've used techniques here: Debugging Layout Loading, but am unsure what to do with the output.

The Problem: The controller loads.  The layout does not.

When I visit the page at localhost/magento/mymodule/ajax/cart

It echos 'HERE!'.  The var_dump of the getLayouts generates:

array(4) {
    [0]=> string(17) "mymodule_ajax_cart"
    [1]=> string(13) "STORE_default"
    [2]=> string(24) "THEME_frontend_theme_theme"
    [3]=> string(19) "customer_logged_out"
}

The Code

Custom controller:
app/code/local/mycompany/mymodule/controllers/AjaxController.php

class Mycompany_Mymodule_AjaxController extends Mage_Core_Controller_Front_Action
{
    public function cartAction() {
        echo 'HERE!';
        $this->loadLayout('mymodule_ajax_cart');
        var_dump($this->getLayout()->getUpdate()->getHandles());
        $this->renderLayout();
    }
}

Config file:
app/code/local/mycompany/mymodule/etc/config.xml

<config>
    <modules>
        <mycompany_mymodule>
            <version>1.0.0</version>
        </mycompany_mymodule>
    </modules>
    <global>
        <helpers>
            <mymodule>
                    <class>Mycompany_Mymodule_Helper</class>
                </mymodule>
        </helpers>
    </global>
    <frontend>
        <routers>
            <mymodule>
                <use>standard</use>
                <args>
                    <module>Mycompany_Mymodule</module>
                    <frontName>mymodule</frontName>
                </args>
            </mymodule>
        </routers>
        <layout>
            <updates>
                <mymodule>
                    <file>mymodule.xml</file>
                </mymodule>
            </updates>
        </layout>
    </frontend>
</config>

Layout file at
app/design/frontent/base/default/layout/mymodule.xml

<?xml version="1.0"?>
    <layout>
        <mymodule_ajax>
            <block type="core/text_list" name="content" output="toHtml" as="content" />
        </mymodule_ajax>
        <mymodule_ajax_cart>
            <reference name="content">
                <block type="core/template" template="mymodule/ajaxcart.phtml" />
            </reference>
        </mymodule_ajax_cart>
    </layout>

And finally, the template file at
app/design/frontend/theme/theme/template/mymodule/ajaxcart.phtml

<div style="border: 2px solid red">
    Hello world
</div>

Please advise.  I know I'm missing something obvious, but cannot for the life of me find it.


texts: Whats the best way to override a block class in magento2

texts:
1) Use preference in di.xml and add new methods or do changes

2) Or create a new class which extends the actual class and attach the new class to your phtml.

Lets suppose you want to extend Magento\Catalog\Block\Product\Listproduct then you create a class like Vendor\Module\Block\Product\Listproduct and
change here

<block class="Vendor\Module\Block\Product\Listproduct" name="category.products.list" as="product_list" template="Magento_Catalog::product/list.phtml">


texts: Google Analytics E-commerce does not track conversions

texts:
The E-Commerce tracking does not seem to work properly with my web shop. When I come to the success page it does show in the code, that there is Analytics code, trying to send correct information. But it does not seem to reach the analytics account.

Anyone has any idea?

    <!-- BEGIN GOOGLE UNIVERSAL ANALYTICS CODE -->
<script type="text/javascript">
    //<![CDATA[
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-REALCODEHERE-1', 'auto');

    ga('send', 'pageview');
    ga('require', 'ecommerce')
    ga('ecommerce:addTransaction', {
    'id': '100000399',
    'affiliation': 'CompanyName',
    'revenue': '1.0000',
    'tax': '0.2000',
    'shipping': '0.0000'
    });
    ga('ecommerce:addItem', {
    'id': '100000399',
    'sku': 'product-name',
    'name': 'Product Name',
    'category': '',
    'price': '0.8000',
    'quantity': '1.0000'
    });
    ga('ecommerce:send');
    //]]>
</script>
<!-- END GOOGLE UNIVERSAL ANALYTICS CODE -->


texts:
I am researching about events and observers and I have a question about this event

When is this event launched and what is it for?

_merge_after


texts: Configurable product validation doesn't work correct

texts:
When I click add cart it show second option. I think it should show first option.

Now it show:

I think it should show like this

Any help would be greatly appreciated!


texts:
We are looking to implement below requirement. From admin we should be able to create combo offer(Deals) like for example

We have 2 product
Product 1 - Google Nexus 5 mobile phone - Rs.22500
Product 2 - Nexus 5 Case/Cover - Rs. 1000

Now we need to create a combo offer on above Mobile phone, when user purchase nexus 5 mobile phone its cover should be priced at Rs.500.
This combo deal should be visible to buyer on product detail page of Nexus 4 mobile phone

From admin we should be able to set this deal/combo offers, Logically it should when creating Google nexus 5, there should be a way to select combo product Case/cover and its discounted price which should be displayed on product details page as combo offer.

Please browse below url to and Search for "Frequently Bought Together" section.

http://www.snapdeal.com/product/lenovo-essential-g400s-59383670-touchscreen/955085629

Please let us know any way to achieve above requirement, any pointers would be appreciated.

Thanks
Siddharth


texts: Where to find the file that generates the custom options in a new order email?

texts:
I want to find the file that generates the highlighted area.

I have tried order_new_guest.html which is located in app/locale/en_US/template/email/sale

But it only shows the 4 table areas above the highlighted area


texts: How to get stock availability and not QTY?

texts:
It doesn't seem that it is an attribute that I can get the value of Temporary unavailable
is there any way to get exactly this text?
I found this:

'label' => Mage::helper('catalog')->__('Stock Availability'),
            'name'  => 'stock_data[is_in_stock]',

I don't know how it can help
this link doesnt help me because I have a product which is comming soon status and a product which is out of stock and I have temporary unavailable for just the out of stock status but if I use the code the comming soon will be not available


texts: My website got a lot of spam search like 'download', 'en result', 'cn result'. How can I block this? or how to remove from the top search terms list?


texts:
after migration of some tables of customers from magento 1.7.0.2 to magento 2.1.8 . I am unable to create a new customer account. Like customer is unable to signup . SomeOne told me I have to paste  form key   <?php echo $block->getBlockHtml('formkey'); ?>
  in Module_customer / register.phtml
. So where I can paste this ?  Is it really a case ?


texts: Images replaced by placeholder image in frontend

texts:
All immages in frontend were replaced with placeholder image after running the scritp on this post:

Mass change product URL keys to match product names

No cache is active

Any idea why and how to solve this issue?


texts: Confusion on Persistent Shopping Cart documentation

texts:
I was under the impression that the "Persistent Shopping Cart" does exactly that - saves the contents of the cart even for users who does not register.

I have gone through the magento documentation.

I am referrring the below configuration.

I have set "Persist Shopping cart" to Yes and added items into cart as guest users. My session expiry is set to 120 Sec, so after 120 sec my cart become empty and then after login to my account has empty cart only.

I am confused if my interpretation to the document is incorrect. My configurations is as below.

Please advice me on my doubt.


texts: Configure downloadable product dependent on virtual product(subscription) in magento 2

texts:
I am creating magento store which provides downloadable products like PDF's which depends on subscriptions (virtual product)

(Just like Shutterstock)

These downloadable products are not buy able individually.

If customer buys subscription then only he can download the products.

How to configure it properly ?

Right now i have done it very complexly is there any simple approach.

Thanks.

Update1
Right now i have created a table in which consists the data regarding customer's subscriptions like subscription start and end date and the number of downloads.

On product download action it validates customer's subscription for downloading the product.

Update2 (Current Workaround)
I have created a separate table which has some entries on customer buy subscription. And on each download action, this table is checked the customer has bought the subscription or not.


texts: Assign inventory source if distance greater than 20km

texts: I am using the distance priority algorithm for source selection of the inventory. I want to assign a particular source to a product if the nearest available source is greater than 20km distance. Is it possible?


texts: How can I correct price format for arabic store in cart and checkout page

texts: Price format for arabic comes wrong in cart and checkout page.Whereas On Product list and Product View page it shows correctly but in cart and checkout page ( order summary, shipping charge ). If anyone have idea please help me out.


texts: Could not find the source model '"for the attribute" school " .. Eav/Model/Entity/Attribute/Abstract.php(387)

texts:
I see an error in my template when a client tries to register.
You can not register and get an error:
There has been an error processing your request ....

Thanks

a:5:{i:0;s:65:"No se ha encontrado el modelo fuente "" para el atributo "school"";i:1;s:3553:"#0 /app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(387): Mage::exception('Mage_Eav', 'No se ha encont...')


texts: How to send shipping & tax quote straight to update cart totals

texts:
I want to remove the update button process from shipping & estimate in the shopping cart.

We have set up to select shipping by country only removing state and postcode requirements.
We only have one shipping service (standard shipping) but we use table rates to control different country prices and zero tax for export.

I notice that once the update total radio button is checked and the button pressed, if you then change country and use the get quote button this then automatically sends correct postage and tax to the shopping cart total.

I want to update and send values to cart from the get quote button and remove the update stage, is this possible?

I am looking at the shipping.phtml and see that the Get Quote calls for the shipping form: __('Get a Quote') ?>" onclick="coShippingMethodForm.submit

It seems once this form is loaded once it will then update when country changed, how can I get the form to load and update from the one button Get Quote process?


texts: Change Stock Status and update Stock Amount

texts:
We have gotten an API from our manufacturer, now we want to enable stock in these products and give them the right quantity...

We use this code:

$_product->setData('use_config_manage_stock', 0);
$_product->setData('manage_stock', 1); // should be 1 to make something   out of stock
$_product->setData('is_in_stock', 1); // is 0 or 1
$_product->setData('qty', 1234);

try {
    $_product->save();
    echo "done." . PHP_EOL;
} catch (Exception $e) {
    echo "{$e}";
}

But for some reason, stock wont be enabled on these products and the quantity is also not applied... Whats wrong with this code?!

this is how the products are normal and even after the script it stays like that
http://puu.sh/di3RT/f9ecfc32ce.png

Thanks in Advance,


texts:
I'm living in Turkey and our legal systems are sucks. Maybe some of you heard of it.
Anyway.

I have to edit magento's standard invoice template to this;

How can i do this?
When it comes invoices, im just a fool.


texts: Magento 2: Shipping methods are not displayed while checkout process when cart quantity is 1

texts:
I have integrated custom theme, when i add product in the cart and go to checkout page the shipping methods are not displayed and sometimes its shows shipping method error

  sorry, no quotes are available for this order at this time

but when i change the product quantity or I add more than 1 product in cart the shipping methods works fine.

Is there any solution for this type of issue?

This is the screen shot of shipping configuration setting


texts: Magento 2 : What is PCI Compliance And How To Test It?

texts:
Can any one please Explain about PCI Compliance and any method for the testing site.

Thank you in advance.


texts: Magento 2 Mini cart items are shown twice

texts:
I have Magento 2 and I enabled ajax add to cart and the mini cart.  I added 5 products to my cart, it shows a count of 5 but when I click on the cart icon to show the listing it shows the product list twice.  The 5 products are shown and then the list is repeated although the cart total is correct.

Once I go to the checkout page the listing is correct.  Any come across this issue before?  Ideas where to look to track down what is going on?


texts: Make specific page in magento as not cacheable

texts:
I want to make a specific cms page to be set as a non-cacheable page.

Is there is a way to add XML code in layout update to achieve same

I'm calling block in page HTML with code as below

<p>{{block class="Magento\Framework\View\Element\Template" template="Magento_Theme::html/test.phtml"}}</p>


texts: Magento 1.9 Get customer data an products in Observer on invoice save on php 7.1

texts:
I want to get on event sales_order_invoice_save_after customer data / products to put on external billing sistem:

    public function factura(Varien_Event_Observer $observer){
    $order = $observer->getEvent()->getOrder();
    $incrementId = $order->getIncrementId();
    $custName    = $order->getCustomerFirstname();
    $orderPrice  = $order->getGrandTotal();
    $orderId     = $order->getId();
   foreach ($order->getAllItems() as $item) {
        $items[] = array(
            'id'            => $order->getIncrementId(),
            'name'          => $item->getName(),
            'sku'           => $item->getSku(),
            'Price'         => $item->getPrice(),
            'Ordered Qty'   => $item->getQtyOrdered(),

        );
    }
    $arrOrder = array(
        'id'            => $order->getIncrementId(),
        'store'         => 'magento',
        'status'        => $order->getStatus(),
        'name'          => $order->getCustomerName(),
        'email'         => $order->getCustomerEmail(),
        'telephone'     => $order->getShippingAddress()->getTelephone(),
        'street'        => $order->getShippingAddress()->getStreet(),
        'pincode'       => $order->getShippingAddress()->getPostcode(),
        'city'          => $order->getShippingAddress()->getCity(),
        'weight'        => $order->getWeight(),
        'items'        => $items,
    );

    Mage::print_a($arrOrder);
    die();
}

all i recive is:

   PHP Fatal error:  Uncaught Error: Call to a member function getIncrementId() on null in /home/anystore/app/code/community/GSMBoutique/Fgoro/Model/Observer.php:8
Stack trace:
#0 /home/anystore/app/code/core/Mage/Core/Model/App.php(1358): GSMBoutique_Fgoro_Model_Observer->factura(Object(Varien_Event_Observer))
#1 /home/anystore/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(GSMBoutique_Fgoro_Model_Observer), 'factura', Object(Varien_Event_Observer))
#2 /home/anystore/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('sales_order_inv...', Array)
#3 /home/anystore/app/code/core/Mage/Core/Model/Abstract.php(466): Mage::dispatchEvent('sales_order_inv...', Array)
#4 /home/anystore/app/code/core/Mage/Sales/Model/Order/Invoice.php(996): Mage_Core_Model_Abstract->_afterSave()
#5 /home/anystore/app/code/core/Mage/Core/Model/Abstract.php(319): Mage_Sales_Model_Order_Invoice->_afterSave()
#6 /home/anystore/app/code/core/Mage/Core/Model/Resource/Transaction.php(151): Mage_Core_Model_Abstract in /home/anystore/app/code/community/GSMBoutique/Fgoro/Model/Observer.php on line 8


texts:
I'd like to assign new product to a default category automatically, so I won't have to pick the category checkbox in Categories tab every time I create a product.

I tried this in my module's Observer.php:

    public function initProduct(Varien_Event_Observer $observer)
    {
        (...)

        $product = $observer->getEvent()->getProduct();
        $productData = $product->getData();

        $productCatalog = Mage::getModel('catalog/product')->load($product->getId());
        $productCatalog->setCategoryIds(array(Mage::app()->getStore()->getRootCategoryId()));
        $productCatalog->save();
    }

but it won't set the category.


texts: how do i extend a magento class from core?

texts:
I know that it is not safe to modify the core, so i want to extend a class. My need is to add a new button. In the image below you can see where:

So, I created a module for that. I think the idea is that my module is triggered when I clicked on a attribute set. I have absoluty no idea how to do that. I tried smth like this:
config.xml content:

   <?xml version="1.0"?>
<config>
    <modules>
        <Netgr_Gradd>
            <version>1.0.0</version>
        </Netgr_Gradd>
    </modules>
    <global>
        <blocks>
            <netgr_gradd>
                <class>Netgr_Gradd_Block</class>
            </netgr_gradd>
            <adminhtml>
                <rewrite>
                    <catalog_product_attribute_set_main>Netgr_Gradd_Block_Adminhtml_Addgroup</catalog_product_attribute_set_main>
                </rewrite>
            </adminhtml>
        </blocks>
    </global>

</config>

After in controllers/AddgroupController.php content is :

<?php

class Netgr_Gradd_Adminhtml_AddgroupController extends Mage_Adminhtml_Controller_Action
{

    public function indexAction(){
        echo   11111;
    }
}

Here I tried to extend from the core class, the function that adds a new button, but with no result. Can anyone help me with this ?

The content of adminthml.xml is:

  <?xml version="1.0"?>
<config>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <netgr_gradd before ="Mage_Adminhtml">Netgr_Gradd_Adminhtml</netgr_gradd>
                    </modules>
                </args>
            </adminhtml>
        </routers>

    </admin>

</config>

and this is the content from Block/Adminhtml/Addgroup.php:

class Netgr_Gradd_Block_Adminhtml_Addgroup extends Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main
{

     public function  __construct() {

        parent::_prepareLayout();

        $this->_addButton('button_id', array(
            'label'     => Mage::helper('xxx')->__('Some action'),
            'onclick'   => 'jsfunction(this.id)',
            'class'     => 'go'
        ), 0, 100, 'header', 'header');
    }
}


texts:
Around Christmas we have a problem with orders and in the end it looks that is problem from one of the extension. So while we search a issue and try to solve something else happens. All the attributes that are in layered navigation are gone, except for Brand and Product line. For all of the rest attributes when I check for the items with getItemsCount() I get a 0. Which is not true. I try to refresh all of the indexes and clear cache, the final result is the same.

When I go deeper and deeper the situation become more and more strange for me.

So i try to edit a product attribute value, when i click "Save and continue edit" the new value is saved. Example: I open the "Product one" and change "Attribute 1"(it is a multi select field) from "Value 1", "Value 3" to "Value 2" when I click "Save and continue edit" after page refreshed I see message "The product has been saved." and for "Attribute 1" is selected only "Value 2". Then I go and refresh the page with layered navigation and I still see only two filters "Brand" and "Product line".

Then I decide to go to "Catalog -> Attributes -> Manage attributes" and select the "Attribute 1" attribute. Then I set the "Use In Layered Navigation" from "Filterable (with results)" to "Filterable (no results)" and save it. Now refresh the page with layered navigation and I see the "Attribute 1", but all values are inactive. So I return the "Use In Layered Navigation" to "Filterable (with results)" on "Attribute 1" attribute. At this point I go to edit the "Product one" product again and when i change the "Attribute 1" attribute for that product and "Save and continue edit", after page reload I see the old value are still selected. If I use the same example as on top when I save the product and page reload I see the for "Attribute 1" is still selected "Value 1" and "Value 3". Then i decide to refresh the page with layered navigation and I see the "Attribute 1" attrubute in layered navigation with "Value 2" value active to filter. Then I go again to edit the product and change some other attribute they seems to be saved normally.

I am using Magento 1.9.2.4.

This is really strange to me. Do you have any explanation and fix for it?


texts: I can't access frontend or backend after changing file/directory permissions

texts:
I installed Magento 1.9.2.4 and completed all the instructions in the "Setting Privileges and Ownership After You Install Magento" section found here: http://devdocs.magento.com/guides/m1x/install/installer-privileges_after.html

Now I can't access any part of my website...did I miss a step?


texts: How to fetch data from custom table using REST API in Magento2?

texts: How can we fetch Custom table data by using Magento 2 REST API ?


texts:
I am new to magento 2.1
Could you please tell me how to install magento 2.1.3 via composer or manually and what is the structure of a theme for magento 2?


texts: Magento - How To Show Order Comments to PDF Invoice

texts:
This questions was originally posted on stackoverflow but I got no responses.
But I still need a help solving this problem I've been having.

I have installed Magemaven OrderComment into my CE 1.8.0 and it works fine on both front and back end but wated to show thoes comment when we print invoices. I have been googling and searching but none is working so far.

I found below codes from Magento forum:

foreach ($invoices as $invoice) {
   $comments = $invoice->getCommentsCollection()->getItems();
    foreach ($comments as $comment) {
          print_r($comment->getData());
      //echo $comment->getData('comment');
      //echo $comment->getData('created_at');
   }
}

and

/*************************** This Is The Invoice Comments ***********************************/

$this->_setFontRegular($page, 10);

// Begin table header
$page->setFillColor(new Zend_Pdf_Color_RGB(0.93, 0.92, 0.92));
$page->setLineColor(new Zend_Pdf_Color_GrayScale(0.5));
$page->setLineWidth(0.5);
$page->drawRectangle(25, $this->y, 570, $this->y -15);
$this->y -= 10;
$page->setFillColor(new Zend_Pdf_Color_RGB(0, 0, 0));
// end table header

$_tempY = $this->y;

$commentsCollection = $invoice->getCommentsCollection(true);

$orderComment = "Order Comments";
$page->drawText($orderComment, 35, $this->y, 'UTF-8');

$this->y -= 15;

foreach($commentsCollection as $comm)
{
        $textChunk = wordwrap($comm->getData('comment'), 120, "\n");
        foreach(explode("\n", $textChunk) as $textLine){
                if ($textLine!=='') {
                        $page->drawText(strip_tags(ltrim($textLine)), 35, $this->y, 'UTF-8');
                        $this->y -= 15;
                }
        }

 }

/*************************** End Invoice Comments ***********************************/

Tried each code into the same place after:

/* Add totals */
            $this->insertTotals($page, $invoice);
            if ($invoice->getStoreId()) {
                Mage::app()->getLocale()->revert();
            }
        }

in code/core/Mage/Sales/Model/Order/Pdf/Invoice.php file. But no luck. (Second code was able to show title for Order Comment in PDF but not actual comments) Even tried "ordercomment", "OrderComment" or "customer_note" instead of "comment" but nothing showed on PDF invoice.

Surprisingly to see on those forums no one actually figure out, or I just couldn't find the right answer?

As our shop needs to show these comments to a courier, it really helps speed up our whole process. I desperately need you these geniuses help in this forum!

Thanks in advance!


texts: How to remove static block from footer at contact us page?

texts:
I have added two static blocks in footer.phtml. Now I want to remove the those blocks from footer at contact us page for this I go to app/design/frontend/default/MY TEmplate/layout/contacts.xml and in paste the following code there:

<reference name="footer">
    <remove name="shopper_footer_banners"/>
</reference>`

Where shopper_footer_banners is the name of the block which I want to remove then I will right this code in local.xml file but couldn't succeed so anyone please help me.


texts: magento 2: cleaning customer and order info

texts:
I know a solution was posted for this in magento 1: Clearing Magento after testing

I altered this to work for M2 tables, are there any tables I am missing?

Magento 2 SQL

SET FOREIGN_KEY_CHECKS=0;
-- reset customers
TRUNCATE customer_address_entity;
TRUNCATE customer_address_entity_datetime;
TRUNCATE customer_address_entity_decimal;
TRUNCATE customer_address_entity_int;
TRUNCATE customer_address_entity_text;
TRUNCATE customer_address_entity_varchar;
TRUNCATE customer_entity;
TRUNCATE customer_entity_datetime;
TRUNCATE customer_entity_decimal;
TRUNCATE customer_entity_int;
TRUNCATE customer_entity_text;
TRUNCATE customer_entity_varchar;

ALTER TABLE customer_address_entity AUTO_INCREMENT=1;
ALTER TABLE customer_address_entity_datetime AUTO_INCREMENT=1;
ALTER TABLE customer_address_entity_decimal AUTO_INCREMENT=1;
ALTER TABLE customer_address_entity_int AUTO_INCREMENT=1;
ALTER TABLE customer_address_entity_text AUTO_INCREMENT=1;
ALTER TABLE customer_address_entity_varchar AUTO_INCREMENT=1;
ALTER TABLE customer_entity AUTO_INCREMENT=1;
ALTER TABLE customer_entity_datetime AUTO_INCREMENT=1;
ALTER TABLE customer_entity_decimal AUTO_INCREMENT=1;
ALTER TABLE customer_entity_int AUTO_INCREMENT=1;
ALTER TABLE customer_entity_text AUTO_INCREMENT=1;
ALTER TABLE customer_entity_varchar AUTO_INCREMENT=1;
SET FOREIGN_KEY_CHECKS=1;

SET FOREIGN_KEY_CHECKS=0;
TRUNCATE `sales_creditmemo`;
TRUNCATE `sales_creditmemo_comment`;
TRUNCATE `sales_creditmemo_grid`;
TRUNCATE `sales_creditmemo_item`;
TRUNCATE `sales_invoice`;
TRUNCATE `sales_invoice_comment`;
TRUNCATE `sales_invoice_grid`;
TRUNCATE `sales_invoice_item`;
TRUNCATE `sales_order`;
TRUNCATE `sales_order_address`;
TRUNCATE `sales_order_grid`;
TRUNCATE `sales_order_item`;
TRUNCATE `sales_order_payment`;
TRUNCATE `sales_order_status_history`;
TRUNCATE `sales_shipment`;
TRUNCATE `sales_shipment_comment`;
TRUNCATE `sales_shipment_grid`;
TRUNCATE `sales_shipment_item`;
TRUNCATE `sales_shipment_track`;
TRUNCATE `sales_invoiced_aggregated`;
TRUNCATE `sales_invoiced_aggregated_order`;
TRUNCATE `sales_payment_transaction`;
TRUNCATE `sales_order_aggregated_created`;
TRUNCATE `sales_order_tax`;
TRUNCATE `sales_order_tax_item`;
TRUNCATE `sendfriend_log`;
TRUNCATE `wishlist`;
TRUNCATE `report_event`;
ALTER TABLE `sales_creditmemo` AUTO_INCREMENT=1;
ALTER TABLE `sales_creditmemo_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_creditmemo_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_creditmemo_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_invoice` AUTO_INCREMENT=1;
ALTER TABLE `sales_invoice_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_invoice_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_invoice_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_order` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_address` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_payment` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_status_history` AUTO_INCREMENT=1;
ALTER TABLE `sales_shipment` AUTO_INCREMENT=1;
ALTER TABLE `sales_shipment_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_shipment_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_shipment_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_shipment_track` AUTO_INCREMENT=1;
ALTER TABLE `sales_invoiced_aggregated` AUTO_INCREMENT=1;
ALTER TABLE `sales_invoiced_aggregated_order` AUTO_INCREMENT=1;
ALTER TABLE `sales_payment_transaction` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_aggregated_created` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_tax` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_tax_item` AUTO_INCREMENT=1;
ALTER TABLE `sendfriend_log` AUTO_INCREMENT=1;
ALTER TABLE `wishlist` AUTO_INCREMENT=1;
ALTER TABLE `report_event` AUTO_INCREMENT=1;
SET FOREIGN_KEY_CHECKS=1;

Note:

I see that a plugin exists that does this for M1, does one exist for M2?


texts: How would I run a report to see all the new signups which havent placed any orders yet?


texts:
I've been working through Magento U's Fundamentals of Magento 2 Development course, and I'm currently working on the second unit, which covers request processing. This morning, I was finishing the videos and exercises on routers in Magento 2. One of the exercises that was provided involved writing a custom router.

I added the router to the routerlist with the following code in etc/di.xml:

<type name="Magento\Framework\App\RouterList">
    <arguments>
        <argument name="routerList" xsi:type="array">
            <item name="training" xsi:type="array">
                <item name="class" xsi:type="string">Module\Router\Name</item>
                <item name="disable" xsi:type="boolean">false</item>
                <item name="sortOrder" xsi:type="string">70</item>
            </item>
        </argument>
    </arguments>
</type>

I was surprised, when I ran the application, to find that the router wasn't working as expected. I stepped into the code with Xdebug and realized that Magento 2 wasn't even loading the router into the RouterList. After doing a bit of Googling, I realized that I had put the type in etc/di.xml, while others were putting the type declaration in etc/frontend/di.xml. I didn't think this would make a difference, but I moved my file into the frontend area, and to my chagrin, it worked.

I was under the impression that Magento 2 merged the DI files together, including the global and the applicable area-specific files; however, if I were correct, my first attempt would have worked.

So, how does Magento 2 handle merging the global and area-specific di.xml files together, specifically when processing types, and why didn't declaring the code in the etc/di.xml work, when etc/frontend/di.xml did?


texts: How can I set up CRON to automatically re-ndex each night

texts:
We have an issue on our website where the search functionality periodically stops working.  I'm not sure why but when we re-index * Catalog Search Index* & Category Products it works again.

One solution we would like to use is to re-index these each night.  At them moment we have this in our crontab.

*/5 * * * * /bin/sh /var/www/magento-root/cron.sh
30 4 * * * /var/www/magento-root/rediscli.php -s 127.0.0.1 -p 6379 -d 1

Do I just need add the following to it:

30 2 * * * php -q /var/www/magento-root/shell/indexer.php --reindex catalog_category_product,catalogsearch_fulltext

I'm not too familiar with CRONTABS


texts: Magento Filter collection by create times (today, yesterday, week, hour etc)

texts:
I have a custom collection that I wish to filter by created date and het entries created "yesterday"

Collection Entries

//dates are set in controller using
setCreatedTime(Mage::getModel('core/date')->gmtDate());

Created Yesterday (does not work)

//3 products items Yesterday
//below filtering outputs incorrect entries
$collection = Mage::getModel('things/things')->getCollection();

I have tried, but outputs incorrect entries;

//thought strtotime('yesterday') would work..
$collection->addFieldToFilter('created_time', array('gt' => Mage::getModel('core/date')->date('Y-m-d H:i:s', strtotime('yesterday'))));
$collection->addFieldToFilter('created_time', array('gt' => Mage::getModel('core/date')->date('Y-m-d H:i:s', strtotime('-1 day'))));
$collection->addFieldToFilter('created_time', array('from'=> strtotime('-1 day', time()),'to'=> time(),'datetime' => true));
$fromDate = date('Y-m-d H:i:s', strtotime($fromDate));
$toDate = date('Y-m-d H:i:s', strtotime($toDate));
$collection->addFieldToFilter('created_time', array('from'=>$fromDate, 'to'=>$toDate));

Created Today (current Day)(works)

//5 products items today with timestamp 2016-05-01 05:22:53
//below filtering outputs correct entries
$collection = Mage::getModel('things/things')->getCollection();
$collection->addFieldToFilter('created_time', array('gt' => Mage::getModel('core/date')->date('Y-m-d H:i:s', strtotime('today'))));

Created past week (works)

//23 products items with timestamps for this week
//below filtering outputs correct entries
$collection = Mage::getModel('things/things')->getCollection();
$collection->addFieldToFilter('created_time', array('gt' => Mage::getModel('core/date')->date('Y-m-d H:i:s', strtotime('-1 week'))));


texts: customerAccountManagementV1 SOAP Module WSDL broken since upgrading from v2.3.4 to v2.3.5

texts:
As mentioned in the title, the WSDL returned for the customerAccountManagementV1 module now contains an error in the response since upgrading from version 2.3.4 to version 2.3.5. Error shown below:

    <env:Fault>
        <env:Code>
            <env:Value>env:Receiver</env:Value>
        </env:Code>
        <env:Reason>
            <env:Text xml:lang="en">The &quot;\DateTime&quot; parameter type is invalid. Verify the parameter and try again.</env:Text>
        </env:Reason>

I'm new to Magento, and I am not in control of the web host. Any ideas what could be causing this please?


texts: Passing PHP Variables with requireJS in phtml

texts:
On my text.phtml template I'm trying to add js by requirejs but can't get the php variables to pass through with them coming up as undefined.

Relevant text.phtml

$_option = $block->getOption();
$txtValue = $_option->getNoOfTextbox();

<script type="text/x-magento-init">
{
    "*": {
        "Option_Customoption/js/charCount": {
        "id": "<?= $_option->getId(); ?>",
        "boxCount": "<?= $txtValue; ?>",
        "maxChar": "<?= $_option->getMaxCharacters(); ?>"
        }
    }
}
</script>

charCount.js

define(['jquery'], function($) {
      'use strict';
console.log('#engraving'+config.lineId+'_'+config.id);

      console.log(config.id);
      console.log(config.maxChar);
        console.log(config.boxCount);

function updateCountdown() {

    var count = document.getElementById('#id'+config.lineId+'_'+config.id)
    var remaining = config.maxChar - $(count).val().length;

    document.getElementById('count' + config.lineId + '_' + config.id).innerHTML = remaining;
}

$(document).ready(function($) {
    updateCountdown();
    $(count).change(updateCountdown);
    $(count).keyup(updateCountdown);

});

});

requirejs-config.js

var config = {
  map:  {
    '*': {
      charCount: 'Customoption/js/charCount'
    }
  }
}

Can anyone tell me why the PHP variables aren't passing to the js?


texts: How to declare and use custom configuration file for less compilation with grunt?

texts:
According to devdocs which is located at

https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/tools/using_grunt.html#grunt_config

Now I simply can't understand what it is trying to say.Can anyone explain in brief?

Thanks in advance

Found the solution.Actually there was an error in theme name.So execution stopped in local-themes.js.


texts: Magento2. How to add custom three field on custom payment method in magento 2

texts: I want to add custom fields on the custom payment method in magento2. I have to add three input fields and I don't want the CVV field and expiry date field. If anyone knows then help me out. Thanks in advance.


texts: Magento 2 : An ID is needed. Set the ID and try again

texts:
I am trying to perform order checkout on 2.4 EE and getting the below error:
An ID is needed. Set the ID and try again.
What can be the cause of this issue? I checked in the logs but can not see any error on this?


texts: Though we can activate captcha in our Magento 2 store but being recaptcha offers more security would like to know How can I install and enable reCAPTCHA in my Magento 2 Store.


texts: Why phpseclib takes time in magento 2.3.3?

texts:
Recently we have upgraded Magento 2.2.8 to 2.3.3 and PHP 7.2.11, post that we are facing more performance issues. When we put site in maintenance mode phpseclib related changes keep takes time.

We are not sure why this phpseclib taking more time. in PHP 7.1 we didn't have this issue. mcrypt won't be there in PHP 7.1. Whether PHP 7.2 has any specific issues in Magento 2.3.3?


texts: Insert into goes with empty value and attribute magento1.9

texts:
I try to insert the static value I have here

public static function saveBrandsAction()
{
    $api = new Ns_Thorleif_Adminhtml_IndexController();
    $arr = array();
    $arr[] = array('brandId' => '123', 'name' => 'test', 'globalIdentifier' => '1020002020');

    $model = Mage::getModel('thorleif/brand')->addData($arr);
    var_dump($model);
    try {
        $insertId = $model->save()->getId();
        echo "Data successfully inserted. Insert ID: ".$insertId;
    } catch (Exception $e){
        echo $e->getMessage();
    }
}

but in the debug the query is like this

INSERT INTO `linio_brands` () VALUES ()

and my var dump looks like

  object(Ns_Thorleif_Model_Brand)#314 (15) { ["_eventPrefix":protected]=> string(13) "core_abstract" ["_eventObject":protected]=> string(6) "object" ["_resourceName":protected]=> string(14) "thorleif/brand" ["_resource":protected]=> NULL ["_resourceCollectionName":protected]=> string(25) "thorleif/brand_collection" ["_cacheTag":protected]=> bool(false) ["_dataSaveAllowed":protected]=> bool(true) ["_isObjectNew":protected]=> NULL ["_data":protected]=> array(1) { [0]=> array(3) { ["brandId"]=> string(3) "123" ["name"]=> string(4) "test" ["globalIdentifier"]=> string(10) "1020002020" } } ["_hasDataChanges":protected]=> bool(true) ["_origData":protected]=> NULL ["_idFieldName":protected]=> NULL ["_isDeleted":protected]=> bool(false) ["_oldFieldsMap":protected]=> array(0) { } ["_syncFieldsMap":protected]=> array(0) { } }
     Data successfully inserted. Insert ID: 5

something is wrong?


texts: Remove Magento default js in custom theme

texts:
In custom theme which I want to apply to some page, I don't want to include magento default Js.
Based on this docs - https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html#layout_markup_css_remove

so like for example I am trying to remove 'storage.js','storage-manager.js','query-builder.js' etc.
as per the instructions -

  that if a static asset is added with a module path (for example
  Magento_Catalog::js/sample.js) in the initial layout, you need to
  specify the module path as well when removing the asset.

but the files I referred above are included, I am unable to locate. what I should include in remove src like

<remove src="storage.js" />

The full path on inspection shows

https://mysite/pub/static/frontend/Iaz/iaz_home/en_US/Magento_Catalog/js/product/query-builder.js

Looking for a suitable solution.


texts:
I installed magento on my ubuntu local machine, and I connected that to github, when I make changes to the magento CMS for example, on my local machine I changed the content of the home page, I expected to see the differences by running a git status, but no differences shows up, and when I push the magento to git, still the changes I have made don't show up. At the beginning I initialized the git and I have added the entire content of the directory to the repository, there's no git ignore files or any missing files.
What can I do?


texts: Dutch zipcode table rates doesn't work if added characters

texts:
I have added some zipcodes to my tablerates.
We deliver only in the Netherlands.
I would like to add delivery costs when a zipcode is (for example) "3141 AA"

I noticed that this only works when clients fill in 3141 on the zipcode and when the zipcode is "3141 AA" it doesn't work anymore...
But in the Netherlands zipcodes are with 2 characters like 1234AB or 1234 AB.
So this method doesn't work! I guess because USA isn't using characters in their zipcodes?

Is there any way to fix this?

My tablerates CSV:

NLD,*,3141,0.0000,7.5000
NLD,*,3142,0.0000,7.5000
NLD,*,3143,0.0000,7.5000

I have tried this but doesn't work:

NLD,*,3141*,0.0000,7.5000


texts: Magento 2 : Send custom credit memo email

texts:
Here is the scenario - I have credit memo id's, I need to check in those id's if credit memo is created from same order (if credit memo created for same order, then i need to merge those credit memo data (such as product, credit memo amount etc) then i need to send a credit memo to customer. So eventually it will be like ONE EMAIL SENT AS CREDIT MEMO FOR 3 INDIVIDUAL CREDIT MEMO. I hope it makes sense.
Actually I have created a script that is used to bulk refund to store credit
based on given order number & item & qty.
The only issue I face is when there are consecutive orders(same order id), then also it creates credit memo for for each item at once so two credit memo created for two items for same order.
That is fine. but two times email sent of credit memo to customer.
I am trying to find a way that I can send credit memo email of processed
credit memo by its id. (If same order's multiple credit memo generated for item single mail should send for two items).


texts: Products only appear when saved in Magento

texts:
I have imported 3,000+ products into Magento successfully.

The products are all present and correct in the back end.

But none of the products appear in the front end.

All the products are:

Visible in Catalog.
Enabled.
Have a stock quantity of 10.
In Stock.
Assigned various Categories.
Assigned to the correct website.

I have refreshed my Cache and Indices, just to make sure. But the products do not appear on the front end at all.

Here are the columns used in my CSV file:

status, type, attribute_set, tax_class_id, visibility, qty, is_in_stock, product_id, name, short_description, description, rrp, weight, mpn, gtin, sku, price, color_text, size, stock_weight, category_ids, brand, small_image

But there is a solution!

If I view a product in Magento's back end, and simply hit Save, it appears on the front end.

Does anyone have a better solution for me, than opening up all 3000+ products and hitting save on each one of them?


texts: Magento1 to Magento2 import only catalog configuration and its associated product query

texts:
I have 2 website first is magento1 and second is magento2.

so i have import only configurable(with associated product) product from magento1 to magento2 .

so what table to be taken magento1 and import magento2 table

or any query to be magento1 and magento2.

or tool for how to import or plugin

Lets me know


texts: Adding Custom Attribute to Admin Users - Magento 1.7

texts:
Currently in creating Admin Users we collect:

Username, First Name, Last Name, Email, Password, Password Confirmation

I would also be interested in adding Address as a field but am not sure how to do so without manually adding it to the database which would take like 10 seconds but I'm pretty sure that's not the intended way by Magento.

Could someone please walk me through the steps and what files I need to create to add this attribute to Admin Users?  I've successfully created custom attributes for customers before using the following 3 files:

app/code/local/Sean/CustomerAddCustomAttr/etc/config
app/code/local/Sean/CustomerAddCustomAttr/Model/Resource/Eav/Mysql4/Setup.php
app/code/local/Sean/CustomerAddCustomAttr/sql/CustomerAddCustomAttr_setup/mysql4-install-0.1.0.php

So I'm familiar with how this should be done but not entirely sure how different it is from adding attributes to customers, because they have an EAV attribute table yet Admin Users don't.

Thank for reading!  Hopefully you can help me out.  Please leave any further questions if im unclear on anything and I'll update the question or follow up your question with  a comment.


texts: How to get admin base Url or ajax request to any controller in magento2?

texts:
I have not any phtml file to set base url.

How can i call ajax form admin side in customjs magento2

form.xml

<field name="type">
    <argument name="data" xsi:type="array">
        <item name="options" xsi:type="object">Ktpl\BannerManagement\Model\Config\Source\Type</item>
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string">Type</item>
            <item name="visible" xsi:type="boolean">true</item>
            <item name="dataType" xsi:type="string">select</item>
            <item name="formElement" xsi:type="string">select</item>
            <item name="dataScope" xsi:type="string">type</item>
            <item name="component" xsi:type="string">Ktpl_BannerManagement/js/form/element/element</item>
        </item>
    </argument>
</field>

I am using custom js in form using ui component

In custom js

       define([
        'underscore',
        'uiRegistry',
        'Magento_Ui/js/form/element/select',
        'mage/url'
    ], function (_, uiRegistry, select, url) {
        'use strict';
        return select.extend({

            initialize: function (){
                var obj = this;
                var type= this._super().initialValue;
                this.makevisilibily(type);

                var defaultTemplate=uiRegistry.get('banner_form.areas.general.general.default_template');

                this.displayTemplateImage(defaultTemplate.value());

                defaultTemplate.on('update',function(){
                   obj.displayTemplateImage(defaultTemplate.value());
                })
                return this;

            },

            /**
             * On value change handler.
             *
             * @param {String} value
             */
            onUpdate: function (value) {
                this.makevisilibily(value);
                return this._super();
            },

            makevisilibily: function (value) {

                var field1 = uiRegistry.get('banner_form.areas.general.general.default_template');
                var field2 = uiRegistry.get('banner_form.areas.general.general.default_image');
                var field3 = uiRegistry.get("banner_form.areas.general.general.content");

                if (value == 1) {
                    field1.visible(true);
                    field2.visible(true);
                    //field3.visible(true);
                } else {
                    field1.visible(false);
                    field2.visible(false);
                   // field3.visible(false);
                }

                return this._super();
            },
              displayTemplateImage: function (defaultTemplate) {

                 var requestUrl = url.build('bannermanagement/banner/defaultTemplatePath');

                      jQuery.ajax({
                        url: requestUrl,
                        type: 'POST',
                        showLoader: true,
                        data: {
                            defaultTemplate: defaultTemplate,
                        },
                        /**
                         * @param {*} data
                         */
                        success: function (data) {
                          jQuery("#mp-demo-image").attr("src",data.imageSrc);
                        },
                        error: function (response) {
                            console.log(JSON.parse(JSON.stringify(response.responseText)));
                        }
                    });
            }
        });
    });


texts: What is the cause of "Front controller reached 100 router match iterations" error?

texts:
As a Magento developer I have faced this problem tons of times, I know it is a misconfiguration problem when it occurs some modules are not loaded, neither their routers, causing the error. Most of the times it is solved with no action, other times you may flush the cache

I've read multiple posts about this, trying to debug placing some extra code in Magento core Front controller app/code/core/Mage/Core/Controller/Varien/Front.php, but at the end this only shows which module routers are missing, not why they are not being loaded. Every time it occurs I try to look which URLs are giving the error, but this is useless information, same as the code trace. It's always the same

Maybe it is caused by module conflicts? Maybe it is some cron task doing something wrong? Maybe some wrong code in older Magento versions? The thing is this problem does not occur since 1.7 version (or if it occurs then it is totally sporadic). I have found some code differences in the main flow, such as

Mage::register('application_params', $params);

In run() method of app/code/core/Mage/Core/Model/App.php, or the

$this->_shouldSkipProcessModulesUpdates()

check in _initModules() method...

I want to believe there should be someone who has definitively found the cause. Any tips?


texts:
I have overwritten the _beforeToHtml() method in the class Magento\CatalogWidget\Block\Product\ProductsList. After doing this, I received the following error:

Invalid template file: 'product/widget/content/grid.phtml' in module: 'My_Module'

When I move the product/widget/content/grid.phtml template from my theme to my module, the error message dissapears. When I add the Magento_CatalogWidget:: prefix to the template in widgets.xml, the error doesn't go away.


texts: Ability to view old orders in new system

texts:
I have built a new site in Magento 1.9.2.2 and have imported all previous orders made on our old site.
Some of these orders have payment methods associated with them that no longer exist in the new system.
In order to keep the new system as clean as possible, is there a way to make Magento understand and display these old orders without installing those old payment method addons into the system?

Example: The new Magento system has a bank payment option built in, whereas the old system did not, so an addon was plugged in to allow that functionality on the old site. It doesn't make sense to install that same addon into the new system, but I would like to view those orders in the admin area.

How can this be done?


texts: Magento 2.2.5 custom js not working when I call it from phtml file using uiComponent

texts:
I have created admin form using uiComponent. I have called phtml file using <htmlContent name="html_content"> in xml file. I tired to call custom.js using below code but its not working.

<script type="text/x-magento-init">
    {
        "*": {
            "Namespace_Module/js/custom": {
                "Data": <?= /* @noEscape */ json_encode($data, JSON_HEX_QUOT) ?>,
                "isSortable":  <?= (int)(!$block->getReadOnly()) ?>,
                "isReadOnly": <?= (int)$block->getReadOnly() ?>
            }
        }
    }
</script>

This code is working fine if I call it using simple block method without uiComponent.

Please let me know how can I use my custom js file with uiComponent form.


texts: Get product from save event observer - Magento 2

texts:
Following a product save event I am trying to access the product within magento 2.

I have configured the listener on:

controller_action_catalog_product_save_entity_after

the xml looks as follows:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="controller_action_catalog_product_save_entity_after">
        <observer name="wire_products_update" instance="TBS\WireProductsHook\Observer\WireProductsUpdate" />
    </event>
</config>

The observers class is then called when a product is saved but I can not find any info on how to access the product that was saved. The observer class is as follows:

<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace TBS\WireProductsHook\Observer;

use Magento\Framework\Event\ObserverInterface;

class WireProductsUpdate implements ObserverInterface {

    public function execute( \Magento\Framework\Event\Observer $observer ) {

        // echos name of event: controller_action_catalog_product_save_entity_after
        echo 'name of event: ' . $observer->getEvent()->getName();

        // tried using the same method as the save class: <magento>/module-catalog/Controller/Adminhtml/Product/Save.php on line 76
        $controller = $observer->getData('controller');

        // Fails: Fatal error: Cannot access protected property ...
        $product = $controller->initializationHelper->initialize($controller->productBuilder->build($controller->getRequest()));

    }

}

Within /module-catalog/Controller/Adminhtml/Product/Save.php the event is fired on line 114:

$this->_eventManager->dispatch(
    'controller_action_catalog_product_save_entity_after',
    ['controller' => $this]
);

This Passes the controller as an argument. However I am unsure how to to use this to access the product.

I would like to get the products sku


texts: How do I install Magento 2 on Mac OSX with Laravel Valet?

texts:
Question

How do I install and setup Magento with sample data to run locally?

Background

I'm using Laravel Valet to manage my local development on Mac OS Sierra and want to do some work on a Magento 2 project.

Pre-requisites

PHP Version 7.0.24
MySQL Ver 14.14 Distrib 5.7.19, for osx10.12
Laravel Valet Version 2.0.4
Composer Version 1.5.2
mmv brew install mmv

Desired result

Magento is available with admin / Admin123 at https://magento-2.dev


texts: “Type Error occurred when creating object: Magento\\Eav\\Model\\Entity\\Attribute\\Source\\Config”

texts:
I have migrated from ver 1.9 to 2.3

  Blockquote


texts: How to redirect form frontController to another module's admin controller in magento2?

texts:
I have two modules

1)Paypalrec with action fornt - Index/Index

2) unsubscribe with action admin/Index/UnsubscribeFinal

I want to redirect Index/Index controller to admin/Index/UnsubscribeFinal here.

Can anyone help?