texts: The code in the home page does not show on the front end

texts:
this code should be working fine last month but just few days ago, i check my website and the layout are change. I do not change any script but suddenly the script are not working anymore, the below are not showing at the front end. I am not sure what it cause. Please advise how to make this code show in the front end or i can use other code to add at the home page. thanks.

&nbsp;

 {{block type="ultimo/product_list_featured" product_count="12" is_random="1" block_name="Featured Products:" hide_button="1" template="catalog/product/list_featured_slider.phtml" breakpoints="[0, 1], [320, 2], [480, 3], [768, 4], [960, 5], [1280, 6]" pagination="1" centered="1" hide_button="1" block_name="Our Products"}}

{{block type="ultimo/product_list_featured" template="catalog/product/list_featured_slider.phtml" category_id="52" product_count="8" breakpoints="[0, 1], [320, 2], [480, 3], [768, 2], [960, 2], [1280, 3]" timeout="4000" centered="1" size="size-s" hide_button="1" block_name="Surveillance"}}

{{block type="ultimo/product_list_featured" template="catalog/product/list_featured_slider.phtml" category_id="59" product_count="8" breakpoints="[0, 1], [320, 2], [480, 3], [768, 2], [960, 2], [1280, 3]" timeout="4000" centered="1" size="size-s" hide_button="1" block_name="Self Defense"}}

&nbsp;

{{block type="ultimo/product_list_featured" template="catalog/product/list_featured_slider.phtml" category_id="66" product_count="8" breakpoints="[0, 1], [320, 2], [480, 3], [768, 2], [960, 2], [1280, 3]" timeout="4000" centered="1" size="size-s" hide_button="1" block_name="Electronics"}}

{{block type="ultimo/product_list_featured" template="catalog/product/list_featured_slider.phtml" category_id="75" product_count="8" breakpoints="[0, 1], [320, 2], [480, 3], [768, 2], [960, 2], [1280, 3]" timeout="4000" centered="1" size="size-s" hide_button="1" block_name="Computer & Tables"}}

&nbsp;

{{block type="ultimo/product_list_featured" template="catalog/product/list_featured_slider.phtml" category_id="85" product_count="8" breakpoints="[0, 1], [320, 2], [480, 3], [768, 2], [960, 2], [1280, 3]" timeout="4000" centered="1" size="size-s" hide_button="1" block_name="Outdoor"}}

{{block type="catalog/product_list_featured_slider" template="catalog/product/list_featured_slider.phtml" category_id="88" product_count="8" breakpoints="[0, 1], [320, 2], [480, 3], [768, 2], [960, 2], [1280, 3]" timeout="4000" centered="1" size="size-s" hide_button="1" block_name="Home & Beauty"}}

Please help to advise


texts: Showing payment details on any email template

texts:
I have made a test putting the var {{var payment_html}} inside the email template order_update.html however when Magento sends an email using this template, any payment information is printed on the box "Payment Details". After that, I searched about it and I found out on this link that some variables don't make effect for some templates. I would like to know if is possible to show off the payment details on the order update email template.

Does anybody have idea about how to do that?


texts: Magento 1.9 . 3 .8 : merchant countries drop-down list dosent have jordan

texts:
Merchant Country (jordan) Not Present in the drop down list.

How I can add this in dropdown ?

Any solution for this ?


texts: Magento 1.9.x and PHP? I had 5.5, now upgraded to 5.6 and it seems to work! Is that OK or shall I switch back to PHP 5.5?

texts:
I currently have Magento version 1.9.1.0 on store/domain1 which I plan to eventually upgrade to Magento version 1.9.2.4. Now , I also want to install the latest version of Magento Community Edition (2.1) to a different domain/account on the same VPS server so my hosting company installed the cPanel supported easyapache 4 method which should give me the option to select different versions of PHP on different accounts/domains.

I had this on my 1.9.1.0 store:

Apache Version  2.2.29
PHP Version 5.5.27
MySQL Version   5.6.30

Now it has this:

Apache Version  2.4.23
PHP Version 5.6.24
MySQL Version   5.6.30

The funny thing is that it actually seems to work fine! Is this OK or shall I revert that account Magento 1.9.1.0 back to PHP 5.5?

What is the difference anyways?


texts: In Config.xml of an Extension i have seen <drewrite> tag used to rewrite the block. What is the difference between <rewrite> and <drewrite> tag?


texts: Product page gives 404 - even though the product exists?

texts:
Magento 1.9.3.7

My product has the id 541 and the URL is https://example.com/catalog/product/view/id/541/s/presse-marburg/. Now when I open the URL, it always gives me a 404.

The product is activated, visible and I cleared the cache and reindexed several times. The product can not be found by searching, even though its visible in catalog and search.

Any ideas what might be causing this?

Thanks!


texts: Show loading image after clicking submit button magento prototype

texts:
I want to show loading image after clicking the submit button using prototype. I want loading image appear after successful validation. I used this code

var dataForm = new VarienForm('form-validate', true);
dataForm.submit = function(button, url) {
    if (this.validator.validate()) {
        //image code
        document.getElementById('processing').style.display = 'block';
    }
}.bind(dataForm);

Code flow doesn't go inside dataForm.submit = function(button, url) { .. }.
Can anyone told me how to do it using prototype?


texts: Magento2 cannot remove item from wishlist

texts:
I'm trying to remove an item from the wishlist programmatically. My code snippet as following:
/**
     * @param integer $customerId
     * @param integer $productId
     * @return boolean
     * @throws NoSuchEntityException
     */
    public function removeProductFromWishlist($customerId, $productId) {
        try {
            $this->_productRepository->getById($productId);
        } catch (NoSuchEntityException $e) {
            $product = null;
        }

        try {
            $this->_customerRepository->getById($customerId);
        } catch (NoSuchEntityException $e) {
            $customer = null;
        }

        $wishlist = $this->_wishlistFactory->create()->loadByCustomerId($customerId, true);
        $ids = $this->_wishlistCollectionFactory->create()->addCustomerIdFilter($customerId)->load()->getAllIds();
        try {
            foreach ($ids as $itemId) {
                $item = $this->_itemModel->load($itemId);
                if ($item->getProductId() == $productId) {
                    $item->delete();
                    $wishlist->save();
                }
            }
        } catch (\Exception $e) {
        }
        return true;
    }

But it's doesn't work, when I calling this method from Postman, I'm getting an error:
{
    "messages": {
        "error": [
            {
                "code": 500,
                "message": "Fatal Error: 'Uncaught Error: Call to a member function getId() on boolean in /home/logbasex/IdeaProjects/clique-omnyfy/vendor/dotmailer/dotmailer-magento2-extension/Observer/Customer/RemoveWishlistItem.php:52\nStack trace:\n#0 /home/logbasex/IdeaProjects/clique-omnyfy/vendor/magento/framework/Event/Invoker/InvokerDefault.php(88): Dotdigitalgroup\\Email\\Observer\\Customer\\RemoveWishlistItem->execute(Object(Magento\\Framework\\Event\\Observer))\n#1 /home/logbasex/IdeaProjects/clique-omnyfy/vendor/magento/framework/Event/Invoker/InvokerDefault.php(74): Magento\\Framework\\Event\\Invoker\\InvokerDefault->_callObserverMethod(Object(Dotdigitalgroup\\Email\\Observer\\Customer\\RemoveWishlistItem), Object(Magento\\Framework\\Event\\Observer))\n#2 /home/logbasex/IdeaProjects/clique-omnyfy/vendor/magento/framework/Event/Manager.php(66): Magento\\Framework\\Event\\Invoker\\InvokerDefault->dispatch(Array, Object(Magento\\Framework\\Event\\Observer))\n#3 /home/logbasex/IdeaProjects/clique-omnyfy/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magen' in '/home/logbasex/IdeaProjects/clique-omnyfy/vendor/dotmailer/dotmailer-magento2-extension/Observer/Customer/RemoveWishlistItem.php' on line 52",
                "trace": "Trace is not available."
            }
        ]
    }
}

Any solution? Thank you!


texts: How to save custom data in quote item and sales order item table?

texts: I have created custom field i.e details field in quote_item and sales_order_item table. Now I want to store custom field data in details field. How to do that?


texts: Magento 2: Group Products How to set Data Position Column Wise

texts:
I want to add one custom column in group product table for displaying Tier Price, but in that case, The products who don't have tier price than it strucure got broken and it does not display data in correct position. i just want to display "-" or anything where tier price is not available. but in that case column's data shifts one step backward. and last column display blank always.
Any solution for this? Please help!


texts: ERROR: Could not load Sales Channels for Stock in magento 2.4.2

texts:
When I load my home page then shows that type of error .

so Please suggest me what i do for this error ,how i solve this
Thanks in advance.


texts: How to add $ (dollar) symbol in front of all price field attributes in a backend form?

texts: I want to know that how to add dollar $ symbol in front of price field in a form which is placed in backend?


texts:
Can anyone let me know, How an alert box getting delete an item popup, from minicart:
location below:

line 71:

vendor/magento/module-checkout/view/frontend/web/js/view/minicart.js

Where defined the alert for this, Please let me know the location of alert. in magento2.


texts: Images and CSS not loading on local installation

texts:
I am trying to take a live magento installation, pull it down and make a local install work. Here are the steps that I have taken:

Pulled down all files from live
Exported db from live site
Made server in MAMP
Imported db through phpmyadmin and changed base urls
Updated local.xml w/ localhost root root

Now when I go to the local url I get the contents of the home page w/ all images broken and no css file loading. Any ideas are appreciated.


texts:
I created an email template which appears to be set up correctly. I say this based on it appearing in the System->Transactional Emails section. I tested this by changing the label a few times to make sure and all seemed as it should be.

Issue: when I try to send the email it doesn't send. It is being called from the indexController.php of the same module as the config.xml where I list the email template. The indexController.php itself seems fine to me because it works apart from this.

email template (app/locale/en_US/template/email/sales/new_mto.html)

ActiveCodeline custom email example by Branko Ajzele

Hi there {{var myvar1}} {{var myvar2}} from {{var myvar3}}. This is just some example template to test custom email module.

config.xml section

 <?xml version="1.0" encoding="UTF-8"?>

 <config>

<modules>

    <Company_Mto>
        <version>0.0.1</version>
    </Company_Mto>

</modules>

<adminhtml>
    <layout>
        <updates>
            <slider>
                <file>mto.xml</file>
            </slider>
        </updates>
    </layout>
</adminhtml>

<frontend>
    <routers>
        <Mto>
            <use>standard</use>
            <args>
                <module>Company_Mto</module>
                <frontName>Mto</frontName>
            </args>
        </Mto>
    </routers>
</frontend>

<global>
    <template>
        <email>
            <mto_index_index translate="label" module="mto">
                New MTO
                <file>sales/new_mto.html</file>
                <type>html</type>
            </mto_index_index>
        </email>
    </template>

    <helpers>
        <mto>
            <class>Company_Mto_Helper</class>
        </mto>
    </helpers>
</global>

</config>

indexController.php (from same module as the config.xml where the email template is referenced above

 $emailTemplate  = Mage::getModel('core/email_template')->loadDefault('new_mto');
 $emailTemplateVariables = array();
 $emailTemplateVariables['myvar1'] = 'Branko';
 $emailTemplateVariables['myvar2'] = 'Ajzele';
 $emailTemplateVariables['myvar3'] = 'ActiveCodeline';
 $processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
 $result = $emailTemplate->send('myemail@changedforprivacy.com','John Doe', $emailTemplateVariables);
 echo '
' . $result;

I have followed this tutorial and looked at some other email questions (which I know have already been asked) but I can't figure out where I'm going wrong.


texts: How do I move a product attribute (size guide) closer to the product description?

texts: We have a client website which has been built on Magento 1.9 by a third-party. We would like to move the size guide attribute further up the page so it's closer to the size drop down or product description. We've been able to display the attribute label by adding some code to the required product view template but we can't seem to get the size guide text and link appearing.


texts: Magento 2 get Collection Data From Two different Third Party Module and Merge

texts:
I have Two Module "Module A" and "Module B" ,In Module A there is a listing page where data is fetching the table by collection and listing on frontend and same doing Module B.

I want to customize Module A so that collection data modified in a way that we can merge data from Module B collection and display both table data in frontend.

Please help me what we need to do.


texts:
In my code I've got a

$connection->query("TRUNCATE TABLE $tableName");

Works great. However using the official https://github.com/magento/magento-coding-standard ruleset it showed the following warning.

  Possible raw SQL satement.

Which I understand because it is.

My question is: is it possible to truncate a table within Magento without using raw SQL?


texts: Magento2: create custom attribute description with wysiwyg editor in Category page?

texts:
how to create custom attribute description with wysiwyg editor in Category page?
like this


texts:
I'm trying to clear some space on our server and I can see that there is quite a lot used up in the  Var/Moogento folder.
Are these files safe to remove? I looked online but couldn't find anything relevant.


texts: Magento 2.1.3 Multi Website or Multi Store

texts:
I have a requirement like this:

"Single backend admin site. Front end shows a main eCommerce website from which another website should open based on Product Category selection.
I mean there will be one site. If one user selects a Product Category named "Men" then the user should go to another website called "menshopping.com" or some other domain name."

At present i have created two websites in magento 2.1.3 admin panel. One website url is called "womenshops.local". This is the main website. so admin url will become "womenshops.local/admin_test".  Then i have created another website with url "menshops.local" having separate store and store view.

I am able to load these two domains separately. womenshops.local has a root category of "women" and menshops.local has a root category of "men". Therefore each websites shows different top level menu.

Now my issue is I don't know how to connect these two websites together and share customer and cart details between these websites. I had searched so many blogs and tried some solutions. But nothing worked.

My Magento root .htaccess file change:

SetEnvIf Host .*womenshops.local.* MAGE_RUN_CODE=base
SetEnvIf Host .*womenshops.local.* MAGE_RUN_TYPE=website
SetEnvIf Host .*menshops.local.* MAGE_RUN_CODE=men_site
SetEnvIf Host .*menshops.local.* MAGE_RUN_TYPE=website

I hope someone can point me in the right direction with this issue.


texts: Magento 2 : Blank/White Category Pages after migration to 2.1 Enterprise

texts:
I am facing this problem from quite long time as some of the categories are coming with blank white pages while some pages are working fine.

In some cases I have updated and saved from admin and it started working , but it was not with other categories.

Error in support_log.txt

  [2017-04-18 05:43:24] report.INFO: Cache file with merged layout:
  LAYOUT_frontend_STORE1_49278eaafaf9de4c42d5b55412f9e812e and handles
  default, catalog_category_view, catalog_category_view_type_layered,
  catalog_category_view_type_layered_without_children,
  catalog_category_view_id_75, restriction_privatesales_mode: Please
  correct the XML data and try again.  [] []

  [2017-04-18 05:43:24] report.INFO: Cache file with merged layout:
  LAYOUT_frontend_STORE1_45dcc9f48fb8f2751b136e5b4ab591b22 and handles
  wide_left: Please correct the XML data and try again.  [] []

Please suggest , how to fix?


texts: Add product to cart programatically and update shopping cart using block and template file in Magento2

texts:
I have to add product from home page using custom module. so how to add products in shopping cart by clicking Add to cart button.

Please anyone help me


texts:
In the order entry process we use First name,  last name, Bill To, Ship to, address 1, address 2... etc.
I like to know how many characters each field will allow?
An can I control how many characters can be entered?


texts:
I met a problem that how to translate the module's phrase into other languages(eg. Japanese).

For example, some code may like this:

  app/code/My_vendor/My_module/Controller/i18n/jp_JP.csv

"test","Japanese character"

  app/code/My_vendor/My_module/Controller/index.php

......
$form = '
test
';
$this->getResponse()->setBody($form);
......

If STORES->Configuration->Locale Options is selected with English(United States), it will show "test" to users; if Japanese(Japan) is selected, it will show "Japanese character".

I had seen the tutorial
http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/translations/xlate.html
but I'm not sure what should I do next.


texts: Magento : Which Event Observer Used For "Move to Shopping Cart" in Admin

texts:
I want to know which event observer is used in admin while do following.

Step for better understanding (Do from admin).

Create a new order
Add a product to the order
Select "Move to shipping cart" in the "Action" menu
Click on "Update Items and "Qty's"

See this screen-sort.

Any one have idea, which event observer used when we click on "Update Items and Qty's" buttion after selecting "Move to Shopping Cart" option in action.


texts: Get configurable option (of a configurable product) on category page

texts:
I want to callout my configurable options of a configurable product on category page. Respectively these are the attribute values of the simple products included within its configurable product.

Standard use case:

Callout configurable options e.g. as a simple string (or advanced as fieldset)  to have a teaser for the customer which options he can then choose on product page.

On product page configurable options appear automatically as "select fieldset":

            Größe/Gebinde

            <select name="super_attribute[154]"
                    data-selector="super_attribute[154]"
                    data-validate="{required:true}"
                    id="attribute154"
                    class="super-attribute-select">
                                <option value="">Option auswählen...</option>
                                <option value="52" selected="selected">2.5</option>
                                <option value="53">5</option>
                                <option value="56">10</option>
                                <option value="58">15</option>
            </select>

How to get configurable options on product page (!) using jQuery:

            $(".super-attribute-select option:eq(1)").attr('selected', true);
            initial_size = $(".super-attribute-select option:eq(1)").text();

My question: How to get configurable options on CATEGORY PAGE?

Is there any attempt to get those configurable options elsewhere than on product page?

Within my special use case I want to take for example the first option content –

  <option value="52" selected="selected">2.5</option>

– and do a simple calculation with my product price.

My Status right now:

I know how to callout product attributes (like color, size,..) if values have been entered in e.g. admin but NOT if product attributes have been used for configurable options.

Further comments:

I am using Magento 2.1.3


texts: product image missing from backend after updating

texts:
After upgrading to Version 1.9.2.3 will not product images are displayed in the backend only in frontend. All run on a single web server with the same rights on apache user.
Someone who can help?


texts: Interconnecting two different Knockout "apps" on the same page in Magento 2

texts:
I have two blocks with a jsLayout in the layout XML on a single page. Both are initialized via

<script type="text/x-magento-init">
        {
            "#checkout": {
                "Magento_Ui/js/core/app": <?php echo $block->getJsLayout(); ?>
            }
        }
</script>

In another Magento .phtml block:

<script type="text/x-magento-init">
        {
            "#sidebar": {
                "Magento_Ui/js/core/app": <?php echo $block->getJsLayout(); ?>
            }
        }
</script>

(with different BlockNames)

It is the checkout and a sidebar. The reason two have different Magento blocks is, that I want to use the sidebar also on other pages.

Now in my .html (not .phtml!) there are data-bindings:

 <form class="form methods-shipping" id="co-shipping-method-form" data-bind="submit: setShippingInformation" novalidate="novalidate">

setShippingInformation referes to the current knockout js view as I understand it. There is also the possibility to use parent.something().

But Is there also a way to access the sidebar view form a checkout template and vice versa?


texts: Magento2: allow cusotmer to customize a product

texts:
I am developing a store on Magento 2.1.x which has a particular product that can be customized by the customer.
In detail It is a t-shirt on which can be printed a custom message inserted by the customer on the product page.
So, what I need is to show a text field on the product page where the customer can write his own message and, once the sale has been made, the store admin can read it on the backend and process the order.

Is it possible natively in Magento or should I use some extensions?


texts: Custom attribute custom_attribute to quote & order table save from controller

texts:
I have added one Custom attribute custom_attribute to quote & order table I am sending a response to my controller I want to save the response in my custom_attribute to sales_flat_quote & sales_flat_order table
can someone please help me how to achieve this

  $response = $this->getRequest()->getParam('data'); // i am getting response here in my controller

      $quoteModelInstance = Mage::getSingleton('checkout/session')->getQuote();
        $customerModelInstance = Mage::getSingleton('customer/session');

        $order = Mage::getModel('sales/order');
        $order->setQuote($quoteModelInstance);
        $order->setCustomAttribute($response);
        try {
            $order->save();

        } catch (Exception $e) {

            Mage::logException($e);
        }


texts:
i want to add payment gateway, and i've to follow these steps.

but i don't know how to

  php bin/magento setup:upgrade

3rd step
i tried but so Difficult


texts: How can I implement large product photos without affecting the layout of my theme?

texts: I want to add large product photos to my store. At the Momemt I can add like 600x 400 images to my score without affecting the layout of my product page. However If I change the width to let's say 1200 pixel, the product options will appear under the photos instead beside them. What can I do?


texts: How to change canonical urls for products

texts:
I have used canonical tags for products. It is taking from root as:

    www.example.com/product.html

But, I don't want this structure, instead I want the URL to be like this:

    www.example.com/category/sub-category/product.html

I am not able to find out how can we achieve this, if there is any possibility to do so from back-end or at code-level. Guys, please help me out in here.


texts: How can I remove the language from dropdown,


texts: How to get featured product list in home page in magento 2?

texts:
I want featured product list in home page as below screenshot:-

Thank You.


texts: Magento:2 How to Image upload in custom module

texts:
Image upload working fine in tmp folder, then store in DB. I want to after saving data image stored in the base folder  pub/media/events

var_dump($data);

" ["events_url"]=> array(1) { [0]=> array(10) { ["name"]=> string(39) "Screenshot_from_2018-04-30_18-07-01.png" ["type"]=> string(9) "image/png" ["tmp_name"]=> string(14) "/tmp/phpGvtNFv" ["error"]=> string(1) "0" ["size"]=> string(6) "744010" ["path"]=> string(45) "/var/www/html/magento8/pub/media/faq/tmp/icon" ["file"]=> string(39) "Screenshot_from_2018-04-30_18-07-01.png" ["url"]=> string(88) "http://127.0.0.1/magento8/pub/media/faq/tmp/icon/Screenshot_from_2018-04-30_18-07-01.png" ["cookie"]=> array(5) { ["name"]=> string(5) "admin" ["value"]=> string(26) "tcq6loa96ki11qfiri6j2llua5" ["lifetime"]=> string(3) "900" ["path"]=> string(15) "/magento8/admin" ["domain"]=> string(9) "127.0.0.1" } ["previewType"]=> string(5) "image" } } ["events_date"]=> string(24) "2018-05-25T11:45:00.000Z" } ["form_key"]=> string(16) "H3xhipTLApQ77NfQ" }


texts: How to create multiple shipping methods from one module in Magento 2

texts: I am creating custom shipping module, module should be able to create multiple shipping methods and shipping methods will render depending on the product in the cart. How can I achieve this.


texts: Does anyone know how I can change the admin reordering so that either an order that is reordered automatically gets assigned to a different site or allows the operator to change the site the reorder is made from?  Basically we are closing a site down soon (it won't be deleted as that would get rid of old orders) and need to be able to allow reordering to continue working.


texts:
Please refer this following url http://www.trendycollections.in/kids-wear/boys-wear.html

All sorting is working Fine. But I have different issue. In the above url if i chose Price lowest under the sort by option then i will move to http://www.trendycollections.in/women-collections/sarees/designer-sarees.html, That category page also having Price lowest sorting.

If i chose price highest,Next category page also sorting by price highest

I think, i need to reset sort by option. I have set default sorting under system->config->catalog->front end->Product Listing Sort by as Best value. I can’t find where am i doing wrong here. if anybody know, please help me guys


texts:
We saw a blank page at /checkout/* after applying SUPEE-10752 and compiling

version: 1.9.1.0

Triggering conditions:applying SUPEE-10752 + enable compiler + login as a customer, then visit /checkout/*

Just to clarify: With deactivated compiler all things went well, with activated compiler we only could see a blank cart page when logged in without any log entries (even after activating all possible logs and developer mode).


texts: What is the flow of execution of UI COMPONENT in Magento 2?

texts: Basically, I want to know the flow of execution how UI component render?


texts:
i use magento ver 2.1.1 and create persian language . but some word not translate to persian In the event that the word translated !

my language is fa_IR .

Thanks


texts:
I updated a extension in a working magento 1.7.0.2 (running on localhost), after updating it stopped working, so I got back with git and restored the database.

After going to the previous version and restoring the database I got the following error:

Warning: simplexml_load_string(): Entity: line 18: parser error : Premature end of data in tag config line 17  in /Applications/MAMP/htdocs/magento/lib/Varien/Simplexml/Config.php on line 510

#0 [internal function]: mageCoreErrorHandler(2, 'simplexml_load_...', '/Applications/M...', 511, Array)
#1 /Applications/MAMP/htdocs/magento/lib/Varien/Simplexml/Config.php(511): simplexml_load_string('loadString('loadFile('/Applications/M...')
#4 /Applications/MAMP/htdocs/magento/app/code/core/Mage/Core/Model/Config.php(318): Mage_Core_Model_Config->loadModulesConfiguration(Array, Object(Mage_Core_Model_Config))
#5 /Applications/MAMP/htdocs/magento/app/code/core/Mage/Core/Model/App.php(414): Mage_Core_Model_Config->loadModules()
#6 /Applications/MAMP/htdocs/magento/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#7 /Applications/MAMP/htdocs/magento/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#8 /Applications/MAMP/htdocs/magento/index.php(87): Mage::run('', 'store')
#9 {main}

So I added some debug in lib/Varien/Simplexml/Config.php

public function loadString($string)
{
    if (is_string($string)) {
        $xml = simplexml_load_string($string, $this->_elementClass);
        if(!$xml){
            Mage::log('XML_ELEMENTCLASS: '.$this->_elementClass);
            Mage::log('XML_ERROR: ' . $string);
        }
        if ($xml instanceof Varien_Simplexml_Element) {
            $this->_xml = $xml;
            return true;
        }
    } else {
        Mage::logException(new Exception('"$string" parameter for simplexml_load_string is not a string'));
    }
    return false;
}

and also a Mage::log('XML_FILE: ' . $filePath); in the loadFile($filePath) function on line 489.

Now I get the following log:

2018-05-07T13:07:30+00:00 DEBUG (7): XML_FILE: /Applications/MAMP/htdocs/magento/app/etc/config.xml
2018-05-07T13:07:30+00:00 DEBUG (7): XML_FILE: /Applications/MAMP/htdocs/magento/app/etc/local.xml
2018-05-07T13:07:30+00:00 DEBUG (7): XML_ELEMENTCLASS: Mage_Core_Model_Config_Element
2018-05-07T13:07:30+00:00 DEBUG (7): XML_ERROR: <config/>
2018-05-07T13:07:30+00:00 DEBUG (7): XML_FILE: /Applications/MAMP/htdocs/magento/app/etc/modules/Mage_All.xml
2018-05-07T13:07:30+00:00 DEBUG (7): XML_FILE: /Applications/MAMP/htdocs/magento/app/etc/modules/Mage_Api.xml
// the list is too long and I think the problem is in the beginnning so I cut it here

This log makes me think that the error is on app/etc/local.xml the last file before the error, and a file in the gitignore. I checked this xml file in a online xml validator and it is ok. I also checked app/etc/config.xml, and it is ok too.

So I tried to delete app/etc/local.xml and reinstall magento, but this leads me to a ERR_TOO_MANY_REDIRECTS

As a last resource I copied the config.xml and local.xml from other working projects, even the same working project in test changing the fields crypt.key, connection.host, connection.username, connection.password, connection.dbname but exactly same result.

At this point I don't know what else I should look or change to make the project run again.


texts: Non-transactional emails are not being sent (email confirmation, welcome email, shipping)

texts:
I've looked at the core-email queue in the SQL database and only "new order" and "update order" are being sent in the queue for the CRON job.

I've read somewhere that there might be an exception and that only transaction-email are being sent to the queue and the rest is being handle by the server.
Magento 1.9.1 - Emails being sent by the new email queue?

So, I found this guide to see how to debug it
http://www.hummingbirduk.com/magento-not-sending-emails/
and followed the steps and was able to see receive test emails from the server. So the problem lies in the magento configuration and settings.

I've been spending quite some time figuring the problem and now I am out of idea and was wondering if someone my have hints about how to solve this problem or what step could I take to narrow the solution.


texts:
I am attempting to add a slide-out menu to my Magento site, and I would like to inject the HTML by using the <?php echo $this->getChildHtml() ?> method. This menu would be universal to the entire desktop version of my website, so I want it to appear on all of the page templates (1column, 2column-right, 2-column-left, etc). I got the menu working perfectly on all templates by copy/pasting it into all of the aforementioned page templates, but this strikes me as bad coding practice—every time I edit the menu, I don't want to have to make the same change in 4 other files. That's why I want to use the getChildHtml() method; I would edit my menu.phtml and all layouts would be affected uniformly.

I followed the simple tutorial here but my getChildHtml('menu') is returning empty. I'll post my relevant code below. If someone could spot where I messed up—or failing that, suggest a different way to inject HTML dynamically (similar to JSP's <jsp:include page="..." /> method, maybe?)—I would really appreciate it. FYI I am using Magento CE 1.9.0.1.

Code:

template/theme = warrior/default

in app\design\frontend\warrior\default\layout\local.xml, I have:

<layout>
    <default>
        <reference name="root">
            <block type="core/text_list" name="menu" as="menu" translate="label">
                Slide Menu
            </block>
        </reference>

        <reference name="menu">
            <block type="core/template" name="menu" template="menu.phtml" />
        </reference>
    </default>
</layout>

in app\design\frontend\warrior\default\template\page\1column.phtml, I have (excerpt):

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

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

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

in app\design\frontend\warrior\default\template\menu.phtml, I have:

 sup dawg

And the resultant HTML in my browser is this:

 in the correct place, after the content block (I only have it in that specific spot to test this method. The actual menu code will go before the header).

Thanks in advance,Ezra ♡


texts: How to block/remove registration of new customers in Magento 2?

texts:
I want to disable the possibility to register as a new customer on the frontend of my Magento 2 Community Edition store (new customers are being created through a different process).

I think I could remove the "Create an Account" link from the top menu and remove the "New Customers" block on the right of the Customer Login page, but I'm looking for a more tight blocking of this functionality. I assume you could still enter the example.com/customer/account/create/ URL manually and see the registration form.


texts: Ways to test/check MAGENTO SUPEE-10975 PATCH ON WEBSITE

texts:
I am wondering how to test/check SUPEE-10975 patch on site.
What are ways to test it properly & make sure it does not disturb site functionality ?
Any thoughts ?


texts: How can I import product names only in one store view

texts: I need to import a CSV to deal only with French titles. So I need to update names ONLY in the fr store without affecting any of the default values and or any of the other stores. Every time I upload a test csv it changes the default value and if I include the default value in the csv it changes the the _de store value.


texts:
I am trying to update shipping and billing address for an order in Magento2. Here is my code below.

namespace Namespace\Module\Helper;
class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
    protected $order;
    protected $orderRepoInterface;
    protected $orderAddressInterface;

    public function __construct(
        \Magento\Sales\Model\Order $order,
        \Magento\Sales\Api\OrderAddressRepositoryInterface $orderRepoInterface,
        \Magento\Sales\Api\Data\OrderAddressInterface $orderAddressInterface
    ) {
        $this->_order = $order;
        $this->_orderRepoInterface = $orderRepoInterface;
        $this->_orderAddressInterface = $orderAddressInterface;
    }

    public function saveShipping(){
        $shipAddress = $this->_orderRepoInterface->get('shipping address id');
            if($shipAddress->getId())
            {
                $this->_orderAddressInterface->setFirstname('name');
                $this->_orderAddressInterface->setCountryId('US');
                $this->_orderAddressInterface->setRegion('region');
                $this->_orderAddressInterface->setPostcode('code');
                $this->_orderAddressInterface->setCompany('company name');
                $this->_orderAddressInterface->setStreet('some address');
                $this->_orderAddressInterface->setCity('city');
                //print_r($shipAddress->getData());
                $shipAddress->save($this->_orderAddressInterface);
            }
    }

But its not saving anything. Any idea about which class i should use or why its not saving any data.


texts: Magento IN email invoices showing multiple currency symbols

texts:
Hi I am having problem with currencies which repeats twice.. in order invoice and order mails too..

Can anybody help me pls?


texts: When payment not done automatically cancel the order

texts:
I'm using payu for Payment and it works good. When customer place an order, it goes to payu page to fill the details. If the customer don't want to pay, they simply close the window.

If the browser window is closed, the order status become still "pending" or "processing". The problem is the stock availability and quantity couldn't revert. I just found the solution to cancel the order using cron job after some time interval.

I reffered the links,

http://inchoo.net/magento/cancel-pending-orders/
https://stackoverflow.com/questions/11079915/how-to-change-the-order-state-programmatically-inside-a-cron-job
https://nikunjvadariya.wordpress.com/2014/03/22/magento-change-order-status-automaticaly-after-selected-days-using-crontabjob/

I'm using magento 1.9.1 and couldn't find the better solution. Please help me here.


texts:
Magento 1.9.3.10

I thought I'd done everything correctly, but something isn't working.

All I want to do is move the domain I used on a staging Magento to a Live Magento.

I created the new Website/Store View and categories in the Live Magento, enabled it and disabled the Store View in the Staging Magento.

I removed the DNS I thought I'd put in to point the domain at the Staging Magento.

I then added the domain name into the System > Config > General > Web > Un/Secure fields in the Live Magento, did a full re-index and Cache dump.

I'm getting "The web page at ****** might be temporarily down or it may have moved permanently to a new web address."

What have I missed?


texts: I've hosted my website on Amazon AWS server and everything is working fine with HTTP (http://ec2-52-77-101-230.ap-southeast-1.compute.amazonaws.com/) but when I'm trying to open website with HTTPS I'm getting message "refuse to connect".


texts:
I need to create the Rest API in magento in 1.x or 2.x and I need to expose to the third party , I have doubt on the authentication how its going to be carried out for the OAUTH

->How the 3rd party get the consumer key ,Request token and Access token if all are other is Automatic process for the usage of the rest API using OAUTH.

->The process is getting the consumer key ,Request token and getting the Access Token.

If anybody done with same scenario.


texts: Magento2.3.0 How to brand filter sorting left side layer navigation

texts: I am using Magento2.3.0 i need to  brand filter sorting for left side layer navigation. I attached image for layered navigation to clearly understand, where am i need.


texts: I want result like suppose i have 3 products with their name like sony tv, led tv and led test Tv. so if I search only by name Tv then all products should be display and other condition if i search test Tv then it should only disply (led test Tv) not other results.


texts: Magento 1 : Is it possible restrict admin user view only selected store details by using observer or anything?

texts: How can i restrict admin user view only selected store details by using observer or anything?


texts: Invoice ID Column Null in Credit Memo Table

texts:
Has anybody else noticed that the invoice_id column in sales_flat_creditmemo is always Null?

The order_id column is populated, but nothing in the invoice_id column. Is this just me?


texts:
i have create custom  button  for place order on WhatsApp  but
place code at code place at app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product/view/addtocart.phtml
code is php if($_product->isSaleable()):  getWhatapp_button_name() ;?>" class="action primary" onclick=" window.open('https://wa.me/0000000000?text=I want to order this product *getName() ?>* Price getPrice() ?> Link getProductUrl() ;?>/ ')">/button> `
i have create 2 store so please tell me how to hidden button at 2nd store


texts: We are getting Fatal error: Call to undefined function getResource() in Magento

texts:
We are getting fatal error in phtml page after paste this code

$cmsstatic = getResource()->getAttribute('size_chart')->getFrontend()->getValue($_product);
echo $this->getLayout()->createBlock('cms/block')->setBlockID($cmsstatic)->tohtml();

any body can help please


texts: Unable to add configurable product to shopping cart using soap api

texts:
I'm having some troubles adding configurable products to the shopping cart via shoppingCartProductAdd. Lets say that I have:

a Configurable product with the sku configurable-shirt
that has options size (optionId 92) and color (optionId 134)
that has an associated (simple) product with option selection for the size ExtraLarge (selectionid 20) and for the color Green (selectionid 5)
the color Green has a fixed price configured at 5eur

As I understand, I should add the configurable-shirt to the shopping cart as follows:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:shoppingCartProductAddRequestParam>
         <sessionId>91b24f514cfc125bac900a682586ecd0</sessionId>
         <quoteId>254</quoteId>
         <productsData>
            <complexObjectArray>
               <sku>configurable-shirt</sku>
               <qty>1.0</qty>
               <options>
                  <complexObjectArray>
                     <key>92</key> <!-- size -->
                     <value>20</value> <!-- ExtraLarge -->
                  </complexObjectArray>
                  <complexObjectArray>
                     <key>134</key> <!-- color -->
                     <value>5</value> <!-- Green -->
                  </complexObjectArray>
               </options>
            </complexObjectArray>
         </productsData>
         <store>default</store>
      </urn:shoppingCartProductAddRequestParam>
   </soapenv:Body>
</soapenv:Envelope>

But all I get is a response telling me to define the product options which, if you ask me, I just did in the soap message.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultcode>1022</faultcode>
         <faultstring>Please specify the product's option(s).</faultstring>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

If I however use the sku of the associated simple product whis is configurable-shirt-Green-ExtraLarge the products is added to the shopping cart, but the 5eur price addition to color green is not added to the products total sum.

The configurable product works as expected if I use the magento frontend.
I'm using 1.8.0.0


texts:
One of my recent project in Magento there are two stores. First is Default and second is Mobile Store. On mobile devices Mobile Store works. We face an issue when user do purchasing from mobile devices. We are not able to generate Invoice of that order from admin. Whenever I try to Submit Invoice it throw an error "Unable to save the invoice.". But if order comes from Default store it works well. I did some research over this and found in InvoiceController.php file $transactionSave->save(); throw exception. Full transaction code is below;

$transactionSave = Mage::getModel('core/resource_transaction')
                    ->addObject($invoice)
                    ->addObject($invoice->getOrder());
$transactionSave->save();

Does anyone have ideas how to fix it?


texts:
Hi have download the sidebar navigation

As you can see in the picture the works fine ... but this extencion only appear  when i search for a product or in the category navigation ... i want this extencion on my home page

i want to see my home page in the same way that you are seeing my result of search

desing with columns its by default


texts: Swapping product images for custom lists using a new image attribute

texts:
I want to be able to display a list of products on the homepage of the site I am working on with a different image to what is displayed on the category page.

I have created a new image attribute called 'featured_image' and have set a number of featured products with images filled in however the modified template I am using for the homepage is only showing the placeholder images for this new image type and I am at a loss to why.

The code I am using for my featured home page block is

<?php if($_collectionSize > 0): ?>

<?php foreach ($_productCollection as $_product): ?>
    <?php $i++; ?>
    <li class="<?php if($i-1==0): ?> first<?php elseif($i==$_collectionSize): ?> last<?php endif; ?>">

            <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'featured_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'featured_image')->resize(250); ?>" width="250" height="250" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'featured_image'), null, true) ?>" />

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>

    <?php if($i==$_limit): break; endif; ?>
<?php endforeach ?>

Many thanks, I'm sure this is something simple I am missing


texts: Search multiple attribute by label not by value and use like condition

texts:
I have a problem, i have 2 attributes both are multiselect. When i apply search one of them is text box, now how search query would frame because it would on the basis of label not value.
Please help


texts: Where I need to create backend admin theme(vendor_name) in magento 2?

texts:
I'm Getting Started in Magento 2. Here I created theme From app\design\frontend\Magento\<vendor_name>\<vendorname_modulename> it's working fine (under Vendor modules showing store front).

And I have created Adminhtml theme from app\design\adminhtml\<vendor_name>\<backend>\<vendorname_modulename> it's not working (under vendor modules from admin area).

Here I have a question.

Where I need to create backend admin Vendor_Theme?

Need to Create Vendor_Theme inside app\design\adminhtml\Magento\<backend>\<vendor_name>\<vendorname_modulename>?

or

Need to Create Vendor_Theme inside app\design\adminhtml\<vendor_name>\<backend>\<vendorname_modulename>?

Please suggest me Where I need to create backend admin theme in magento 2??

Thanks.


texts: Report showing the days with the most orders per day

texts:
I'd like to get a list of orders per days. Sorted from most to least so that I can easily see on which days the most orders where placed.

A text report (SQL statement) is enough, I do not need a fancy report in the backend.


texts:
I like to configure and check the code flow using the X-debug break-point, so followed the below tutorial and successfully configured the X-debug in my PHP-storm, I am using php-7.2
https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html
Then I set some break point and trying to understand the flow of the coding, but when ever i reload the page, it always start working from index.php after the php.cs and php-cs-fixed.
I've tried lot but still i could't able to find the best way to make work the xdebug in my machine.

In my local I've installed the X-debug Version-2.9.8 and it's working fine.
It's start from magentoroot/index.php then jump into the phpcs and php-cs-fixed file.
Thanks in advance for your great support


texts: How to create select dropdown field in phtml file dynamically in Magento2.2.5?

texts:
I want to create a select dropdown field in contact form(phtml file) which must be called dynamically in magento2.2.5?

Refer screenshot

This is my from I have override my contact form, I want a dropdown for Subject field.


texts: How To Use GraphQL To get Product Entity?

texts:
I want to built custom extension to get product entity using GraphQL.

I referred below links.

https://www.rakeshjesadiya.com/get-product-collection-using-graphql-magento-2/

https://amasty.com/blog/magento-2-api-updates-graphql/

Still if anyone have good reference extension then please help me.


texts: Multilanguage store as symlinked subdirectory on nginx returning 'no route to page'

texts:
we needed to set-up our multi language store using the subdirectory/symlink method described here. (read why @ bottom)

How we did it.
We copied index.php to a subdirectory and symlinked all folders. The base url was set to domain.com/en

Problem/Question
Now when I open domain.com/en I can see the website and it shows the English version. Only thing is that all category and product links produce a 'no route to page' error. Instead of showing the category or product. Now how can this be?

Example
So https://domain.com/en/funkyshoes does not open the category funkyshoes, and neither does funkyshoes https://domain.com/funkyshoes for that matter.
https://domain.com/en/funkyshoes returns => no route to page
https://domain.com/funkyshoes returns => https://domain.com/en

why not? because we have more than 1 multistore and cannot give every store a lang store_code like en/de/fr & also we have one multistore with different domains per store and the other using the /en, /de, /fr method from the main domain.


texts:
I'm trying to get visitor customer data as following in my resolver to connect with my pwa frontend
use Magento\Customer\Model\Visitor;
public function __construct(
Visitor $customerVisitor
){
$this->_customerVisitor = $customerVisitor;
}

    public function resolve(
        Field $field,
        $context,
        ResolveInfo $info,
        array $value = null,
        array $args = null
    ) {
        /** @var ContextInterface $context */
        $productId = $args['productId'];

        $customerId = $context->getUserId();
        $visitor = $this->_customerVisitor->getData();
}

But i'm getting an empty array as the result.Please help


texts: Magento_Db_Adapter_Pdo_Mysql not found in Resource.php

texts:
Firstly, I have little knowledge of the workings of Magento as I'm mainly a WordPress developer so please be gentle.

I have been tasked with moving an existing Magento install onto a VPS. The VPS is setup correctly and meets all the minimum requirements for Magento as noted via their magento_check.php document

When working offline (read: developer environment), The site is visible and seems to function as expected however after copying the files onto the new VPS, uploading the database to the host and ensuring that local.xml database credentials authenticate, I have been faced with an unexpected error.

The error simply reads:

  Fatal error: Class 'Magento_Db_Adapter_Pdo_Mysql' not found in
  //app/code/core/Mage/Core/Model/Resource.php
  on line 165

I have tried reading articles from the Magento forums, namely: http://www.magentocommerce.com/boards/view./viewthread/667511/ and have attempted to perform the solutions listed here http://turnkeye.com/blog/disable-magento-compiler/
 however this has proven ineffective as when attempting to perform this:

php -f compiler.php clear
php -f compiler.php disable

in the /shell directory, via SSH, as root, I am unable to progress and are faced with the same error:

  Fatal error: Class 'Magento_Db_Adapter_Pdo_Mysql' not found in
  //app/code/core/Mage/Core/Model/Resource.php
  on line 165

Any advice on how to resolve this issue, or perhaps some links to potential fixes would be very much appreciated.

I'm can't provide any versioning info at this time, however, if you require it please tell me where I can find specific information.


texts: How to get custom admin field value of specific Storeview in magento 2.3.2

texts:
I want to add a custom text area for contact info for a particular store view from configuration and get that custom field value and display it on the contact us page in Magento 2.3.2.
so can anyone have an idea then please share it with me.
Thanks in Advance...


texts:
I noticed a strange behavior in a M2 System, I think this is related to a 3rd party module. All layouts which should be 1column layouts are 2 column layouts actually so something overwrites the default behavior. In conclusion, they got the wrong body class page-layout-admin-2columns-left instead of page-layout-admin-1column. I followed this thread How can I debug layout file processing in Magento 2? to debug this, but can't see anything wrong. So my questions are, how to debug this? Any hints are helpful.

Cheers,
Jan


texts: Magento 2 Change the block style of Luma theme?

texts:
I've seen solutions to extend and change the subject. I have created my own theme. I could change colors and some styles that are predefined in the file _theme.less

But I can not change other styles that does not come preset in that file.
Specifically I wanted to change the styles that apply to static blocks of the home page and/or category view pages.

I have located the style and I copied in _theme.less:

`.training-erin .content { width: 30%; top: 16px; bottom: 16px; right:` 16px; }

I have emptied the cache, the store is in development mode and is compiled on the browser side. But nothing.

Should we use other notations in _theme.less ?, it is necessary to modify the layout to incorporate a custom css sheet?

Thanks in advance.


texts: Magento 2 : Can I create a contact-us page or it should be by default?

texts:
Can I create a contact-us page or it should be by default ?

If it should be by default, then why there is no admin?

can anyone help me ?

Thanks


texts:
I want to run my cron job every 2 hour for importing product . so i have use below code for that.

Using this code my first cron is run perfectly but i don't know when it will run second time ? is it run after two hour consider after completion of first one ?

        <schedule_generate_every>120</schedule_generate_every>
        <schedule_ahead_for>120</schedule_ahead_for>
        <schedule_lifetime>20</schedule_lifetime>
        <history_cleanup_every>10080</history_cleanup_every>
        <history_success_lifetime>21600</history_success_lifetime>
        <history_failure_lifetime>21600</history_failure_lifetime>
    <use_separate_process>1</use_separate_process>

i just need to run this cron while completion of my product ( 1000 number of product ) import every time. and it will take approx 2 hour to complete this import process of importing .
so what i need to set value in this code ?

any idea please share !

If i set 15 minute then second cron is waiting till complete previous process then start after complete first process ?

 <schedule_generate_every>15</schedule_generate_every>
 <schedule_ahead_for>15</schedule_ahead_for>


texts: Magento 2 - Displaying Data on backend customer grid

texts:
I need help with this line of code.

public function prepareDataSource(array $dataSource)
{
    if (isset($dataSource['data']['items'])) {
        foreach ($dataSource['data']['items'] as & $item) {
            $item[$this->getData('name')];//Value which you want to display
        }
    }
    return $dataSource;
}

XML is,

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="customer_columns">
        <column name="updated_at" class="Mvn\Cam\Ui\Component\Listing\Column\ReferralColumn">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="label" translate="true" xsi:type="string">Updated At</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

Error on Magento admin,

  Notice: Undefined index: updated_at in C:\xampp\htdocs\Buyani\app\code\Mvn\Cam\Ui\Component\Listing\Column\ReferralColumn.php on line 31

I just want to display the updated_at column from the database to the customer grid at Magento admin.


texts: Is it possible to extends virtual type class declared in di.xml ? If yes how ?


texts: get generated Id from custom write connection

texts:
in my plugin I use an additional table. That table has an id, which is set to AUTO_INCREMENT.
When I insert something in there, I do something like:

$resource = Mage::getSingleton('core/resource');
$writeConnection = $resource->getConnection('core_write');
$query = 'INSERT INTO test (column1, column2) VALUES (3, 4)';
$writeConnection->query($query);

In this case the table test has also an id.
Is there a way I could get this id after I inserted it?


texts:
Hi I am using pleks sheduled task to run magento cron.

I would like to know if there something wrong with my settings below.

Plesk settings: */5 * * * *

Note that the */5 * * * * runs properly. while the second one which I've set to run at 01:00AM doesnt run at all

 <crontab>
    <jobs>
        <teser_productimport_fivelog>
            <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
            <run><model>teser_productimport/observer::fiveLog</model></run>
        </teser_productimport_fivelog>
        <teser_productimport_tenLog>
            <schedule><cron_expr>0 1 * * *</cron_expr></schedule>
            <run><model>teser_productimport/observer::tenLog</model></run>
        </teser_productimport_tenLog>
    </jobs>
</crontab>


texts: Install script to get access to root category id

texts:
I have a data install script which requires access to the default stores root category.

If the code for the module is run when the site is first installed, the value is never available i.e.

Mage::app()->getStore()->getRootCategoryId()

returns null

because

Mage::app()->getStore()

returns 0 instead of 1.

I suspect this is something related to the stores not being fully during installation.  How can i get access to the default store views root category id during installation?


texts: Password reset link got expired immediately

texts: I have upgraded my site from Magento 2.2.4 to Magento 2.3.5-p1. I am trying to reset my password, I am getting the link in the email when I clicked on the link I am getting error message as link got expired.


texts: Need help modifying Magento Shipping Extension

texts:
I'm looking to change the front end output of this flat rate shipping extension. It outputs a value no matter what the input field is set too (field is available under General, for each product, to add a fee, you would enter 6.95, 10.00, etc..). If field is empty, it outputs $0.00, which to a customer may mean free shipping. I'd like it output "Not Available" or to not show at all if this field is not populated. I have no idea how to achieve the output i need. Thanks!

 public function collectRates(Mage_Shipping_Model_Rate_Request $request)
    {
    if (!$this->getConfigFlag('active')) {
        return false;
    }
        $shippingPrice =0;
        if ($request->getAllItems()) {
            foreach ($request->getAllItems() as $item) {
                $product = Mage::getModel('catalog/product')->load($item->getProductId());
      if($product->getTypeId()=='configurable' || $product->getTypeId()=='bundle') {
        continue;
      }
                $shipCost= $product->getShipCost();
            if($shipCost==null || $shipCost==0)
            {
                $shippingPrice += $item->getQty() * $this->getConfigData('price');
                }
                    else{
                                $shippingPrice += $item->getQty() * $shipCost;
                    }
            }
        }
            $result = Mage::getModel('shipping/rate_result');
            if ($shippingPrice !== false) {
                $method = Mage::getModel('shipping/rate_result_method');
                $method->setCarrier('flatrateperproduct');
                $method->setCarrierTitle($this->getConfigData('title'));
                $method->setMethod('flatrateperproduct');
                $method->setMethodTitle($this->getConfigData('name'));
                $method->setPrice($shippingPrice);
                $method->setCost($shippingPrice);
                $result->append($method);
                       }
            return $result;
}
public function getAllowedMethods()
{
        return array('flatrateperproduct'=>$this->getConfigData('name'));
}


texts: How can I show only these attributes on frontend that will be only checked in magento2?


texts: Magento 2.x : How to check if use_default is checked for URL key

texts:
Summary:

  How can I get value of "Use Default" checkboxes like
  use_default[url_key].

  Scenario :

  I have a website with multiple store views. the URL key is set in
  Default configurations of product's SEO section. When I switch stores
  in front-end I get an error on product pages. After an investigation,
  I found some products have "Use Default" unchecked for the URL Key
  field.  Now I want to write a custom script that will list all those
  products which have  use_default[url_key] unchecked. And maybe
  next update the field to checked state - with the same script.


texts:
Does anyone knows how I can check if an option in the multiple selection attribute is selected?

I have a example here:

For each option that is selected I want to show a image on the frontend. If Lupine is selected I want to display lupine.png, if Noten is selected I want to display noten.png and so on.

But I can't figure out how to check which one is selected.

I use the multiple selection attribute because I also want to be able to filter them on the category page.

Regards


texts:
I would like to sell items with a special price that is activated only if a certain minimum orders threshold is met (E.g. > 50 pieces, 10€ a piece. > 100 pieces, 8€ a piece etc..).

The orders do not need to be for the same buyer, but per website. (before a certain date, to be coupled with  pre-orders). Is it somehow supported? or maybe a good extension?


texts: How to Add custom text before product's price in product details page in Magento 2?

texts: I am working with Magento 2.1.3 and i want to add some custom text before product's price in product details page.


texts:
And yet one more question. I am full of them. I doubt this will be my last.

On my page www.indigomeadowscrafting.com there is a gray bar at the top. How do I change that color? Where is it in the files? I have been through every file I can think of to change that color. I managed to get the rest of the tweaking done I needed but am at a complete loss for that top bar.

I like the bar, I just would like to change the color.

Thanks all!

Rachel


texts: Programatically update magento attribututes per store but code is updating all stores

texts:
I have a Magento multi store setup and have 2 csv files that will be uploaded on a daily bases to update price, qty, and other attributes.

I would like to create two of the following files that run on cron and each file will do the same thing for each store individually.

Currently the code below takes takes store1.csv and applies it to both stores also if i run this code with store3.csv it will apply all price and updates to both stores.

Would like for store1.csv to only update store 1 and store3.csv only update attributes on store 3.

    <?php
 /*Move to our working directory
        $home = getenv("HOME");
        if (! $home) {
                chdir('../'); // We hope we are somewhere where this works
        } else {
                chdir($home.'/project/html');
        }*/
    $csv = "store3.csv";
    if (sizeof($argv) > 1) {
        $csv = $argv[1];
    }
//Turn On Error Reporting
    error_reporting(E_ALL | E_STRICT);
//BOOTSTRAP MAGENTO
    $mageFilename = '../app/Mage.php';
    require_once $mageFilename;
    //require_once 'relatedProducts.php';
    Mage::app()->setCurrentStore(Mage::getModel('core/store')->setStoreId(3));
    Mage::setIsDeveloperMode(true);
    umask(0);

//OPEN CSV
    if (($handle = fopen($csv, "r")) !== FALSE) {
        while (($data = fgetcsv($handle, 2000, "\t")) !== FALSE) {
            $num = count($data);
            if ($num < 1) continue; // skip blank lines
            $sku = trim($data[0]);
            if ($num < 2) {
              echo "Skipping: ".$sku." not enough fields\n";
              continue;
            }
            $qty = trim($data[1]);
            $price = trim($data[2]);
// grab the product based on sku.
            $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku)->setStoreId(3);
            if(!$product) {
                print "Error:  Invalid SKU, ".$sku."\n";
                continue;
            }
            if ($product->getPrice() != $price) {
              $product->setPrice($price);
              $product->save();
            }
// Grab the inventory(stock) model in order to update quantities.
            $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getId())->setStoreId(3);
            if ($stockItem->getData('qty') != $qty) {
              $stockItem->setData('qty', $qty);
              if ($qty > 0) {
                $stockItem->setData('is_in_stock', 1);
              }
              $stockItem->save();
            }
        }
        fclose($handle);
    }
?>


texts: Enable Blank Search Queries to show all products

texts: Currently working with Magento 2.2 -- Looking to enable blank searches which retrieve top 20 products, etc. I don't see any settings to enable something like this, anyone know which module the code for that would be in? I think I found it but not sure if it's modifying the advanced search parameters or not.


texts: Magento2 - How to avoid/ignore PHP Fatal Errors while running magento setup:di:compile

texts:
I am developing a Magento 2 Module that need to reference external packages (through composer).

I added a package in require section inside composer.json:

"require": {
  "php": "~7.3.11",
  "react/zmq": "0.2.*|0.3.*"
}

Then ran composer update to load packages into vendor folder

Then ran bin/magento setup:di:compile, but an error is thrown like this:

PHP Fatal error:

  Trait 'Evenement\EventEmitterTrait' not found in
      /app/code///vendor/evenement/evenement/src/Evenement/EventEmitter.php
  on line 18

Question is: is there a way to ignore or avoid errors from vendor folder?

I could have solved the error manually to let compilation complete, but the problem is this solution need to be repeated each time the module's repo is cloned or if the vendor folder is deleted then composer update/install is run again.


texts: Third party extension issue with custom theme

texts: I have created a custom theme which i inherit from the blank theme, if i applied  third party extension its not applied, i am tried with couple of extensions same issue, what are all the necessary steps to follow for install a third party extension in custom theme


texts:
I am using Magento 2.3.5-p I have managed to hide price using CSS from the frontend, now I want to hide price and order total from transaction email like when a new order email is sent.
How to do that, and which file I have to override in my child theme.


texts:
We need to move a client over from a .Net solution where all MD5 passwords are stored in an MS SQL db to a Magento MySQL database. After much Googling, it seems we cannot decrypt the passwords without a lot of effort.

What we would then like to know is, can one copy the MD5 passwords as is from the MS SQL db to a MySQL db and expect it to work?

We have asked for sample data of customers to test this but not sure when we will be getting it.


texts: Frontend Customer Login - Invalid Form Key. Please refresh the page

texts:
We are having an issue with the frontend customer login, where the users can't login as this error pops up:

I have checked online for this issue and have found mostly back-office login errors, in the admin panel. I have found none regarding the frontend. Anyway, I have tried all or atleast most of them regarding PHP configuration changes:

max_input_vars = 10.000 / 75.000
max_input_time = 600
max_execution_time = 3600

I have also checked the cookie configuration in the admin panel and in the DB;
web/cookie/cookie_domain

Which must be set with the correct domain, it is. We do have custom modifications after login, regarding redirections and other custom developments, but, I've tried disabling those and nothing changed.
I have been able to track that if cache is cleaned, flushed and the browser is refreshed with ctrl + f5 you can then log in without issues, so my guess here is that is something related to cache. Also, the first try after all compilations always work.
I've then researched into the var/ folder in order to find the cache folder and check permissions. They all have the user, not root plus the www-data from nginx. They all generate correctly and none is created with root.
What else could I check? What am I missing here? Thank you.


texts: How to check if product is on sale (special price) in magento 2

texts:
products with special price, I need to display discount percentage.

$_savePercent = 100 - round(($finalPriceAmt / $regular_price) * 100);

If product in sale then and then this will calculate.
Anyone got any idea how to do it?


texts: Magento 2: how Get youtube video in product list page(Category page)

texts:
I want to get product video in product list page(category page) for that i am trying following code . but i am getting blank values. my code is:

$_product->getVideo();

Please guide me for get you tube video url.

I tried code but that works in product listing page but not worked in product details page.

Code what i have tried :

<?php if($_product->getVideo()): ?>`

            <iframe width="560" height="315" src="http://www.youtube.com/embed/<?php echo $_product->getVideo() ?>" frameborder="0" allowfullscreen></iframe>

        <?php endif; ?>


texts: Data Migration error In magento 2 intergrity constraint violation : duplicate entry :1-Migration_Default

texts:
Error : SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-Migration_Default' for key 'EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME'

I reinstall the setup with a fresh database and it did not solve the issue. Please suggest a solution for this.

After reinstalling magento2 setup: a new error occured : Notice: Undefined offset: 8 in /opt/lampp/htdocs/namuk/NAMU/branches/namuk2.2.5/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php


texts: Display simple product attribute set with values in shopping cart and order page?

texts:
I want to display all the attributes of product attribute set on shopping cart page and sales order,invoice pages only for simple products.Suggest me some solution.

I have used the following code.

<?php $_item = $this->getItem()?>
<?php $_product= Mage::getSingleton('catalog/product')->load($_item->getProductId()) ?>
<?php //echo $_product->getResource()->getAttribute('attribute_code')->getFrontend()->getValue($_product); ?>
$_item->getProduct()->getResource()->getAttribute('attribute_code')->getStoreLabel();

I want all the attributes of product from its attribute set and not particular attribute using attribute code.


texts: Integrate Magento 2 into WordPress when WordPress 404 error thrown

texts:
I would like to integrate Magento 2 into WordPress.

What I want is to load Magento 2 before any WordPress 404 error thrown.

I put Magento 2 under shop folder from root directory. Then if I go to http://magento2.dev/shop/, I can view the normal Magento front-end. Magento Admin page is http://magento2.dev/shop/cms. Every Magento stuff works fine under shop folder.

       function wpd_do_stuff_on_404( $preempt, $wp_query ) {
            load_magento();
        }

        add_filter( 'pre_handle_404', 'wpd_do_stuff_on_404', 10, 2 );

The above code is to load Magento 2 before WordPress 404 error thrown.

    function load_magento() {
        require_once __DIR__ . '/../../shop/app/bootstrap.php';

        $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
        $app = $bootstrap->createApplication('Magento\Framework\App\Http');

        \Magento\Framework\Profiler::start('magento');
        $response = $app->launch();

        $magento_http_status = $response->getHeader('Status');
        $magento_header_location = $response->getHeader('Location');
        $magento_content = $response->getContent();
        \Magento\Framework\Profiler::stop('magento');

        var_dump($magento_content);die;
    }

I try to browse to http://magento2.dev/men/tops-men/jackets-men, then the above script is run. However, $magento_content is always empty string. I expect the full page of html returned.

I try to dump $response->__toString() and I get

HTTP/1.1 302 Found Location: http://magento2.dev/shop/men/tops-men/jackets-men/ pragma: no-cache Cache-Control: max-age=0, must-revalidate, no-cache, no-store expires: Tue, 31 Jul 2018 07:22:30 GMT

Does anyone have any idea how to return the html correctly?


texts: magento 2 module's css and js files include

texts:
I have created a basic plugin in magento 2 and also included .css file in correct place as I have seen in many tutorials but when I open frontend page of magento 2(luma page) and do page inspect and in the console after open the issue in tab , it shows :- Unable to resolve the source file for 'frontend/Magento/luma/en_US/Excellence_Hello/css/style.css'

#0 C:\xampp\htdocs\magento\vendor\magento\framework\App\StaticResource.php(97): Magento\Framework\View\Asset\File->getSourceFile()
#1 C:\xampp\htdocs\magento\vendor\magento\framework\App\Bootstrap.php(258): Magento\Framework\App\StaticResource->launch()
#2 C:\xampp\htdocs\magento\pub\static.php(13): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\StaticResource))
#3 {main}

what to do to ??? I am also sharing my extension on's link


texts: Magento 2 - Custom Payment Module Order Email

texts: I have a custom payment module and I can see the method in the frontend and in the order form in the admin.  Where I don't see it is in the order email.  What do I need to do to get it there?


texts:
I am working on Magento 2. Currently I configured the tax calculate based on shipping address. We have option for store pickup also.

So the issue is that when user enter the shipping address, tax is calculating , but after that if user select the shipping method to "Store Pickup" then tax should calculate based on store address. We have one store address.

If user don't select store pickup then tax should calculate based on shipping address. If store pickup is selected then tax should calculate based on store address.

Any suggestion will be appreciated.


texts: Magento 2.3: How Magento knows that a certain patch is already executed while it didn't use any versioning?

texts: As Magento introduces patches instead of upgrade data and upgrade schema. In earlier version of Magento upgrade data and upgrade schema works by versioning but in Magento 2.3 it only executed the one patch files only one time. So how should Magento knows that this patch file is already executed??


texts:
I am working on one Magento Commerce store and want to change name of 45000+ products via single import. There are too many products on website with all CAPITAL product name.

This is creating big issue in Google merchant center data feed. So, I would like to make it proper via CSV import. I have compiled one CSV file which contain Product ID & Product Name with require format.

But, I am not able to import entire CSV file in Magento commerce Admin panel via Import / Export section. It shows me Time Out warning.

So, I have to split one CSV to multiple CSV files and continue this task. This is really frustrating to me. So, How do I change name of 45000+ products via single import?


texts:
I'm still figuring Magento out just wasted 2 hours searching how to remove the newsletter block from the footer in the RWD theme (I'm using a child theme of this).

Here is my app/design/frontend/rwd/mytheme/layout/local.xml

    <?xml version="1.0"?>
<layout>
<default>
<reference name="head">
    <action method="removeItem"><type>skin_js</type><name>js/slideshow.js</name></action>
    <action method="removeItem"><type>skin_js</type><name>js/lib/jquery.cycle2.min.js</name></action>
    <action method="removeItem"><type>skin_js</type><name>js/lib/jquery.cycle2.swipe.min.js</name></action>
    <action method="removeItem"><type>skin_css</type><name>css/madisonisland.css</name></action>
    <action method="removeItem"><type>skin_css</type><name>css/madisonisland-ie8.css</name></action>
    <action method="addLinkRel"><rel>stylesheet</rel><href>//fonts.googleapis.com/css?family=Raleway:300,400,500,700,600</href></action>
    <action method="addlinkRel"><rel>stylesheet</rel><href>css/custom.css</name></href></action>
    <action method="addlinkRel"><rel>stylesheet</rel><href>css/what-we-buy.css</href></action>
</reference>

<reference name="footer">
    <remove name="footer.newsletter" />
    <remove name="footer_links" />
    <remove name="footer_links2" />
</reference>

</default>
</layout>

but nothing changes. I think everything in the 'head' section is applying since I do not see any of that when I ->view source. I even tried removing

    <!-- Mage_Newsletter -->
    <reference name="footer">
        <block type="newsletter/subscribe" name="footer.newsletter" as="newsletter" before="footer_store_language" template="newsletter/subscribe.phtml"/>
    </reference>

from newsletter.xml but even that doesn't work. I have flushed the cache multiple times as well. None of the other blocks remove from footer either.

So the question is, what am I not understanding and how do I remove the newsletter box from the footer in 1.9 RWD theme?

Edit: Added my local.xml info. Also, removing code directly from newseltter.xml (or page.xml for other footer blocks) does seem to work when cache is disabled. I know this is not the correct way though.


texts:
Magento 1.9.3.2

I am trying to save the order PDF right after an order is placed / saved. The event I am using is sales_order_place_after. This is working fine, except for the payment information. That is not printed on the PDF whenever an external payment was made using PayPal+ or eBay.

  This is the Observer.php code:

$pdf = Mage::getModel('emailattachments/order_pdf_order')->getPdf(array($order));
$pdf->render();
$pdf->save("my.pdf");

I guess the payment data is not available at this point in the event chain? Is there another event maybe that I can use? I checked, it does not seem so.

  Thanks!


texts: after flashing cache files magento 2 showing 500 Error

texts:
After flashing cache Static files under admin -> cache management in magento 2 showing 500 Error and vendor folder got automatically deleted during this process. I don't know why it happend.

They shown me following error.

Vendor autoload is not found. Please run 'composer install' under application root directory.

Kindly suggest any solution.


texts: Live Website Shipping Method Problem in Magento

texts:
We are not getting the UPS Shipping Methods in Checkout Section. When We have change the Mode as Development it's working correctly, after changing the Mode as Live it's not working (UPS Shipping Methods) and not getting in Checkout Section. And earlier it's working fine either Mode as Development or Live. We have recently changed the SSL Certificate for Magento Website. From now when I have change the Mode as Development it's working and getting shipping methods, but Live Mode it's not working.

Could you please suggest me on this.


texts: Can't login in Magento 1.6.2 admin panel through the newest firefox and chrome (IE is fine)

texts: can't login in admin panel by Firefox Ver. 52.0.2 or Google Chrom Version 57.0.2987.133 but the oldest version of both are working. What is the solution?


texts: Get number of configurable products with at least one in-stock associated product

texts:
I used following code to retrieve number of in-stock associated products in a category ($cat) for a huge store with thousands of products.

$cnt = 0;
$prods = $cat->getProductCollection()
             ->addAttributeToSelect('entity_id')
             ->addAttributeToFilter('status',Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
             ->addAttributeToFilter('visibility', array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG))
             ->addAttributeToFilter('type_id',  'configurable');

foreach( $prods as $product) {
             $simpleProducts = Mage::getModel('catalog/product_type_configurable')
                                                  ->getUsedProducts(null,$product);

            foreach( $simpleProducts as $simple ){
                   $cvc = Mage::getModel('cataloginventory/stock_item')->loadByProduct($simple);

                   if($cvc->getIsInStock() && $cvc->getQty() > 0) {
                          $cnt++;
                          break;
                   }
           }
}

Above code works but its really slow. I mean it takes almost half an hour to calculate number of products for all categories in my store. What's the problem ? I know I can use caching (and I already did) but the question is that how can I make the code faster or what I missed in the above code that made it really slow ?

UPDATE

I want to count all configurable products with at least one simple product in stock. I don't care about configurable product stock by it self, only its associated products matter because in my store configurable product's in-stock availability don't matter. Only its associated products is important. I.e: if a configurable have 3 in-stock products, we should count it once.


texts: Add category attribute in collection filter (search)

texts:
I've created an attribute for my categories (it's displayed on back-office and I can save values).

In sur php file Result.php for the research process, I want to add this attribute as a filter.

how to I do that ? In _getProductCollection I've added this line :

    $this->productCollection = $this->getListBlock()->getLoadedProductCollection();
    $this->productCollection->getSelect()->join(array('cats' => 'catalog_category_product'), 'cats.product_id = e.entity_id');
    $this->productCollection->getSelect()->group("cats.attribute");

But it shows non filtered result

Any thoughts ?


texts: Require the customer to authenticate before placing an order

texts: Is there any functionality in magento 2 that will force the user to register when passing the checkout. If the user does not have an account, do not allow him to buy


texts: Export products using cron job Magento 2.1.x

texts:
I need to export products several times a day using cron job. I have little experience with Magento 2.1 and I don't know how to develop the script.
I hope you can help me.
Thank you.


texts: Disable Order Confirmation Email for particular customer group

texts:
Is there a way to disable a Magento Order Confirmation Email for a particular customer group ?

I won't mind someone giving me a guide on how to create a custom module for this function.

Thanks


texts: Disable All Functionality of Arbitrary Module With My Module

texts:
Let's say you are writing an improved reviews extension for Magento 2. Due to the vast differences to the core magento/module-review module, it makes sense to create an entirely new extension, while completely disabling the core module.

A requirement is that an admin, via the admin interface or command line, is not able to enable the core module again. It should be completely disabled while the custom module is enabled.

How might one do this via a module setup?

What I've tried/considered

Simply disabling the core module. Although easy enough to do, it's unclear how to ensure enabling the module again is not possible.
Magento 1 had a concept of setting arbitrary modules as active/inactive via config.xml in your custom extension -- however, I'm not seeing a means of doing this in Magento  2.


texts: Magento 2 : How can i read Xml file data

texts:
I have product file in XML format. I just need to read this file and import those data.

I have already use simplexml_load_file(file path) but it will work only small size of file. Is there any other way to read this large XML file ?


texts: Purchase Proccessed with Fatal Error : Maximum Execution Time Exceeded

texts:
After a customer hits submit order, the order gets processed & confirmation email goes out.. However, the page never loads and a PHP Fatal Error: Maximum Execution time occurs. We have increased the max_execution_limit from 30 to 60 to 90 seconds and it's still happening. We also have plenty of system resources available.

Outside customers telling us when they experience this. We can detect this happening because the order shows up in our Magento order history and doesn't in our Analytics (which requires a complete page load for the Javascript)

Below are the 5 errors logs from the past 24 hours.. All these errors coincide with the exact time an order was placed that wasn't picked up by our Javascript analytics:

[03-May-2015 15:46:42 UTC] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /lib/Zend/Locale.php on line 1637
[04-May-2015 03:57:46 UTC] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /app/code/core/Mage/Core/Model/Config.php on line 636
[04-May-2015 04:00:10 UTC] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 997
[04-May-2015 14:03:03 UTC] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /app/code/core/Mage/Catalog/Model/Resource/Abstract.php on line 201
[04-May-2015 15:23:54 UTC] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /lib/Zend/Locale/Format.php on line 1306
[05-May-2015 23:52:59 UTC] PHP Fatal error:  Maximum execution time of 90 seconds exceeded in /app/code/core/Zend/Date.php on line 1084

It's strange that it's not the same file creating the same error every time..


texts:
To speed up the import process we added the index:
ALTER TABLE catalog_product_entity_varchar
ADD INDEX IDX_CATALOG_PRODUCT_ENTITY_VARCHAR_VALUE (value ASC);
After these changes the "search product" code executes less than 0.1sec
And now we are importing 40 items/minute (10 times more)

Is this approach good or bad?
Can they leave the index in the database permanently?

And if we do think it is OK, should we have them add it to the Dev\Test environment?


texts: How to apply a custom filter logic for selected filter layered navigation product count

texts:
We have installed a extension for the Layered Navigation. Here we need to modify the logic for the product count.

We have already written code for the getting the count by overriding the the following page.

  Mage/catalog/Model/Resource/Layer/Filter/Attribute.php

public function getCount($filter)
{
    // clone select from collection with filters
    $select = clone $filter->getLayer()->getProductCollection()
                ->addAttributeToFilter('is_master_record',1)
                ->addAttributeToFilter('num_of_child',array('gt' => 0))
                ->getSelect();
    // reset columns, order and limitation conditions
    $select->reset(Zend_Db_Select::COLUMNS);
    $select->reset(Zend_Db_Select::ORDER);
    $select->reset(Zend_Db_Select::LIMIT_COUNT);
    $select->reset(Zend_Db_Select::LIMIT_OFFSET);

    $connection = $this->_getReadAdapter();
    $attribute  = $filter->getAttributeModel();
    $tableAlias = sprintf('%s_idx', $attribute->getAttributeCode());
    $conditions = array(
        "{$tableAlias}.entity_id = e.entity_id",
        $connection->quoteInto("{$tableAlias}.attribute_id = ?", $attribute->getAttributeId()),
        $connection->quoteInto("{$tableAlias}.store_id = ?", $filter->getStoreId()),
    );

    $select
        ->join(
            array($tableAlias => $this->getMainTable()),
            join(' AND ', $conditions),
            array('value', 'count' => new Zend_Db_Expr("COUNT({$tableAlias}.entity_id)")))
        ->group("{$tableAlias}.value");

    return $connection->fetchPairs($select);
}

This seems to be working while loading the page initially. However if user clicks in one of the filter, the logic in above page is not working instead its getting the count from some other function. It would be really helpful if someone could tell where is the logic for Selected Filter In Layered Navigation is located so that we can modify it.


texts: Cant create a custom category attribute in admin

texts:
I used the link  http://www.magentocommerce.com/magento-connect/custom-attributes-4340.html and i can create customer attribute and also customer address attribute , but i can not create category attribute.

When i went throw the code i found in the "CategoryController.php", in the saveAction  function wrote like bellow

            Mage::getSingleton('eav/config')
            ->getAttribute($this->_type, $attribute->getAttributeCode())
            ->setData('used_in_forms', $data['customer_form'])
            ->save();

When i print the $data by print_r($data['customer_form']), i could not find any 'customer_form' in the $data. So is there any alternative way to add the custom category attribute dynamically.


texts: How for 'Automated Email Reminder Rules' add to email template cart items

texts:
In Magento EE we have "Automated Email Reminder Rules" and standard template. I need add to template - abandonment cart items, But when magento send email (in app/code/core/Enterprise/Reminder/Model/Rule.php::sendReminderEmails (145 line)), for template set variable:

             $templateVars = array(
                'store'          => $store,
                'coupon'         => $coupon,
                'customer'       => $customer,
                'promotion_name' => $storeData['label'],
                'promotion_description' => $storeData['description']
            );

If i want add cart items i need rewrite this class and add to template variable cart entity?

Maybe someone will offer another solution?


texts: Why Add to cart not working for complete magento 2 website in Internet Explorer

texts:
Here in our website Addtocart option not working in magento 2 for
  Internet Explorer latest version also.


texts: Downloadable product link does not work for customer after purchase

texts:
I created a downloadable product type in magento 1.7, successfully and uploaded the files using filezilla to the media/downloadable/folder. The product is an e-book or flip book that the customer is supposed to read from their account.
I did a test purchase the purchase is successful, a download link goes to the customer's account, but nothing happens.
The url I used in the downloadable configuration was: http://sitename/media/downloadable/filename/index.html
I've searched all over for solutions and you were the closest I found.
After reading a post here I created  files/links/first_letter of filename/second letter of filename and placed the product accordingly. Still no success. I even ran the magento check on the host site.
I am literally stumped now...what am I missing?


texts:
I'm running magento project on c5dxlarge with 8GB RAM. storefront was working fine but suddenly server get out of memory and memory usage became 80 percent. Also I had about 300 running processes even if storefront not used

the only thing I've changed before it goes out of memory was uploading data. I have more than 25000 products.

May too much data cause the problem? and what are the causes if not data?

Note: I'm checking on an attribute before uploading data and do some processing through for loop. Does this cause any problems when uploading many products?


texts: How can I get the metadescription of every product?

texts:
I have made a new Controller and inside there a new Action in which I want to be able to get the metadescription of every product. My code snippet is the following:

public function metaDescriptionAction()
{
    $collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
    foreach ($collection as $product) {
        var_dump($product->getData());
    }
}

But I can't see any information associated with metadescription in the output. What I'm getting is:

array (size=52)
'entity_id' => string '20869' (length=5)
 'type_id' => string 'configurable' (length=12)
 'attribute_set_id' => string '4' (length=1)
 'color' => null
 'color_value' => null
 'cost' => null
 'created_at' => string '2016-05-21 07:58:42' (length=19)
 'gift_message_available' => null
 'has_options' => string '1' (length=1)
 'image_label' => null
 'is_recurring' => null
 'links_exist' => null
 'links_purchased_separately' => null
 'links_title' => null
 'msrp' => null
 'msrp_display_actual_price_type' => null
 'msrp_enabled' => null
 'name' => string 'Jean καμπάνα με patchwork' (length=34)
 'news_from_date' => null
 'news_to_date' => null
 'price' => string '99.9000' (length=7)
 'price_type' => null
 'price_view' => null
 'recurring_profile' => null
 'required_options' => string '1' (length=1)
 'shipment_type' => null
 'short_description' => string 'Jean καμπάνα με patchwork' (length=34)
 'sku' => string '9905202' (length=7)
 'sku_type' => null
 'small_image' => null
 'small_image_label' => null
 'special_from_date' => null
 'special_price' => string '30.0000' (length=7)
 'special_to_date' => null
 'status' => string '1' (length=1)
 'tax_class_id' => string '2' (length=1)
 'thumbnail' => null
 'thumbnail_label' => null
 'updated_at' => string '2017-03-27 10:58:54' (length=19)
 'url_key' => string 'jean-kampana-me-patchwork' (length=25)
 'url_path' => string 'jean-kampana-me-patchwork.html' (length=30)
 'visibility' => string '4' (length=1)
 'weight' => null
 'weight_type' => null
 'size' => string '435' (length=3)
 'size_value' => string 'XL-14' (length=5)
 'barcode' => string '9905202' (length=7)
 'cvg_smartprice' => null
 'season' => string '20' (length=2)
 'season_value' => string 'ΧΕΙΜΩΝΑΣ ' (length=17)
 'is_salable' => string '0' (length=1)
 'stock_item' =>
   object(Varien_Object)[61]
     protected '_data' =>
      array (size=1)
        'is_in_stock' => string '0' (length=1)
    protected '_hasDataChanges' => boolean false
  protected '_origData' => null
  protected '_idFieldName' => null
  protected '_isDeleted' => boolean false
  protected '_oldFieldsMap' =>
    array (size=0)
      empty
  protected '_syncFieldsMap' =>
    array (size=0)
      empty

Any help would be appreciated. Thank you


texts: Adding TinySlider to Magento 2 Custom Module

texts:
I have been tasked with developing a USP banner. This banner is to display simple, short and snappy items to the entailing user.

I have been looking at using TinySlider(OwlCarousel) to help add a simple animation to the different items (Carousel of items). For example, The ability to have the banner scroll automatically to display the multiple items (more than 6) that have been created within the Magento 2 backend. Adding the ability for the user to click and drag the USP Banner is also essential with this module.

The problem I have encountered trying this myself is not knowing what files from the TinySlider download directory are actually needed and what isn't. adding to this, I was wondering where the files from this directory get added to?

My assumption would be that it gets added to the view/frontend/web/js folder of the module.

I'm open to any suggestions on alternative methods of achieving this.


texts: Magento EE 1.13 - static block permissions based on customer segment or attribute

texts:
I need to restrict access to certain product categories and product information for some of my customers in a particular store.

I would like to be able to set up a custom attribute on my customer, and based on that attribute's value, control what product categories and products are displayed, what CMS pages are available from the menu, and control whether a static block would be displayed or not if added to a CMS page.

I purchased an extension to control access to a CMS page, but it doesn't control the cms page menus.

Is there a way to do this with magento EE?

It seems like the customer segment infrastructure should be able to at least provide a way of defining which customers see which sets of information, but there doesn't seem to be a way to tie the segments to product / CMS content.


texts: Magento 2 override core Model class with psr-4 by replacing in app/code/Magento

texts:
"autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/"
        },
        "psr-0": {
            "": "app/code/"
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ]
    },

This is composer autoload part from composer.json on magento2 root

as per this i have successfully overirde

  vendor/magento/framework/View/Element/Html/Link.php

by replacing this file in

  lib/internal/Magento/Framework/View/Element/Html/Links.php

Now i have tried same for

  vendor/magento/module-catalog-import-export/Model/Import/Product/Validator/Media.php

By replacing this file in

  app/code/Magento/CatalogImportExport/Model/Import/Product/Validator/Media.php

above override method is not working.can anyone point me in right direction ?

PS : i want to change const  URL_REGEXP = '|^http(s)?://[a-z0-9-_]+(.[a-z0-9-_]+)*(:[0-9]+)?(/.*)?$|i'; of above class as it cause issue in product import which has double underscore in image url

Can i override using psr-4 or not ? I do not want to go for "preference" if above solution fix my issue.


texts:
Why is my keyword not displaying  Search results for: 'searched keyword'
 after overriding CatalogSearch module

My Result.php

<?php
 namespace Tagalys\Tglssearch\Block;
 use Magento\Catalog\Block\Product\ListProduct;
 use Magento\Catalog\Model\Layer\Resolver as LayerResolver;
 use Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection;
 use Magento\CatalogSearch\Helper\Data;
 use Magento\Framework\View\Element\Template;
 use Magento\Framework\View\Element\Template\Context;
 use Magento\Search\Model\QueryFactory;
 use Magento\Catalog\Model\Layer\FilterList;
 use Magento\Catalog\Model\Layer\Category\FilterableAttributeList;

class Result extends \Magento\CatalogSearch\Block\Result
{
    //my custom methods
}

I dont get this: