texts: Magento 2 Issue with email template loaded in admin Marketing >> Email templates

texts:
I have added custom code in footer.html for email footer.
{{var store.getFormattedAddress()|raw}} is being used to display the store address.
If I load the footer template in Marketing >> Email templates, and assign the same in Content >> Configuration >> Transactional emails >> Footer Template, store address is not displayed in footer.
But that is not the case if defaut footer is set in Content >> Configuration >> Transactional emails >> Footer Template.
What could be the reason?
UPDATE
I removed custom code from footer and added back default code with {{var store.getFormattedAddress()|raw}} in it.
The issue still exists.


texts: Magento 2 - How to install a new currency?

texts:
I get following error message when I try to add a new currency,

Selected allowed currency "US Dollar" is not available in installed currencies.


texts: I've set up a Magento 2.3.0 shop, and I have also translated it. Everything seems fine on the front-end, but one part that I can't get translated, are the .pdf invoices. I have tried to add those words from the invoice into the translate .csv as well, but nothing is working, the invoice is still in English.


texts: Magento 2: How to generate Product URL Key when creating Product from Rest API?

texts:
I am creating Product in magento usign Rest API. Using the below format:

{
"product": {
"name": "Product Name",
"sku": "product_name_1498227094",
"attribute_set_id": "18",
"status": 1,
"visibility": 4,
"type_id": "simple",
"price": 0,
"weight": 0,
"product_links": [],
"options": [],
"tier_prices": [],
"custom_attributes": [
  {
    "attribute_code": "description",
    "value": "Product About content"
  },
  {
    "attribute_code": "short_description",
    "value": "Product Mini content"
  },
  {
    "attribute_code": "meta_title",
    "value": "Product Name"
  },
  {
    "attribute_code": "meta_keyword",
    "value": "Product Name"
  },
  {
    "attribute_code": "meta_description",
    "value": "Product Name"
  }
]
},
"saveOptions": true
}

Its creating Product first time. But If I use the same data to create product again. I am getting the below error:

[message] => URL key for specified store already exists.

As you can check, I am not passing url_key in custom_attributes array.

{
  "attribute_code": "url_key",
  "value": "10090-white-xl"
}

Here my question is: Do magento2 not create Unique URL key automatically? How can we generate Unique URL key in magento2 with consideration of SEO also ?


texts:
On the checkout shipping section the first and last name input fields have validation on them which doesn't accept hyphens (-) or ' characters

I had a look in lib/mage/validation.js but can't see where this validation criteria would be coming from

Does anyone know where this can be changed please? As if some has a double barreled name like Smith-San or O'leary it throws a validation error


texts: How do i display a string using Blocks in magento?

texts:
the etc/config.xml file content is :

<config>
    <global>
        <modules>
                <attila3_helloworld>
                        <version>0.1.0</version>
                </attila3_helloworld>
        </modules>
        <blocks>
            <helloworld>
                <rewrite>
                    <helloworld>Attila3_HelloWorld_Block_HelloWorld</helloworld>
                </rewrite>
            </helloworld>
        </blocks>
    </global>
    <frontend>
        <routers>
            <helloworld>
                <use>standard</use>
                <args>
                    <module>Attila3_HelloWorld</module>
                    <frontName>helloworld</frontName>
                </args>
            </helloworld>
        </routers>
        <layout>
            <updates>
                <helloworld>
                    <file>helloworld.xml</file>
                </helloworld>
            </updates>
        </layout>
    </frontend>
</config>

The IndexController content is :

<?php
    class Attila3_HelloWorld_IndexController extends Mage_Core_Controller_Front_Action{

        public function indexAction(){
            $this->loadLayout(array('default'));
            $this->renderLayout();
        }
    }

the Block/HelloWorld.php content is :

<?php
    class Attila3_HelloWorld_Block_HelloWorld extends Mage_Core_Block_Template{
        // aici vor fi metodele
    }

the etc/modules/Attila3_HelloWorld.xml content is :

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

the layout/helloworld.xml content is :

<?xml version="1.0"?>

    <layout version="0.1.0">
        <helloworld_index_index>
            <reference name="root">
                <action method="setTemplate"><template>page/1column.phtml</template></action>
            </reference>
            <reference name="content">
                <block type="helloworld/helloworld" name="hello" template="helloworld/helloworld.phtml"/>
            </reference>
        </helloworld_index_index>
    </layout>

and finnaly the template/helloworld/helloworld.html content is :
"Hello World ! I am a Magento Guy."
So I want to display that string when I access this link :http://attin.netlogiq.info/magento/index.php/helloworld. As you can see the result is different? can someone help me with this ? thx

this is the result :


texts:
I tried to add some javascript in details.html in vendor/magento/module-checkout/view/frontend/web/template/billing-address like in code below.

details.html :

    <input type="hidden" id="test3" value="">
    <input type="hidden" id="test2" data-bind="value: currentBillingAddress().prefix"/>

    ,

    <button style="visibility:hidden;" type="button"
            class="action action-edit-address"
            data-bind="visible: !isAddressSameAsShipping(), click: editAddress">

    </button>

I want to change the input with id test3 with the value of input with id test2, but it's not work with my code below, is there something wrong with my script?


texts: Magento 2 how to add a widget Recently viewed products

texts: If you have add product review and rating and approved admin side. After you have seen on recently view product.


texts: catalog_category_product_index table empty (Magento 2.2.5)

texts:
Our indexer re-fills the table catalog_category_product_index_store1, but the table catalog_category_product_index remains empty.

I have found this issue https://github.com/Smile-SA/elasticsuite/issues/991 , but even after an upgrade of the smile/elasticsuite module to 2.5.13, the table remains empty.

In some of our development environments, the table is filled. But when I truncate it and reindex, it stays empty.

This is how I reindex:

bin/magento indexer:reindex catalog_product_category

Any ideas?


texts:
We had a Magento site built for us a while back by a local developer but he has just vanished. We do not have any of his login details, only a few accounts with limited access to the backend and cannot do many of the things we need to be able to do to keep the site running properly.

Is there a way we could get in or create a new admin account with full access?


texts:
I am creating multiple staging servers for my Magento 2 website.

staging1.mywebsite.com
staging2.mywebsite.com
staging3.mywebsite.com

Is it possible to have single database for all 3 of my staging servers? the only problem that I am facing is the base URL.

Previously I had used 1 database for multiple local accounts, database was on network server and all the developers was using same database and it was working fine. But for staging domain name are different, so is it possible to do it for staging?


texts: Magento 2: Refresh a widget at regular interval

texts: I have developed an extension to provide a widget to list featured random products on CMS pages. The requirement is to refresh this list at regular interval without caching. Is there any option to avoid caching for widgets? Please suggest a best approach to refresh the .phtml template of the widget?


texts: Magento 2 - Plugin explanation and magento core code

texts:
I've been creating my own plugins in Magento 2 however I'm struggling to understand references to the Magento core libraries. Say I have a plugin like the one below, why do we know that GetName is in this directory \Magento\Catalog\Model\Product) and how do we know it requires $product, $name?

If I wanted to change the price of a product, how would I know which library to call? Do I guess at the function name GetPrice or is there a way to be able to know for sure the name of the function I wish to change in order to create a plugin?

  <?php

 namespace Inchoo\Custom\Plugins;

 Class AfterProduct {
 public function afterGetName(\Magento\Catalog\Model\Product $product,
 $name){

  $price = $product ->getData('price');
  if ($price < 60 ) {
    $name .= " -> cheap" ;
}
  else {
    $name .= " -> expensive";
}
  return $name;
    }
}


texts:
How to add custom module content in magento 2.0.7  list.phtml

Without modifying core list.phtml i need to append my custom module content in magento 2.0.7 list.phtml


texts: Magento2 how to add product options images_data programmatically whis "Mageworx Advanced Product Options Suite Extension"

texts:
I installed Mageworx Advanced Product Options Suite Extension. I want to add product data programmatically. I need to add images_data to the options. Is there a code?
foreach ($options as $arrayOption) {
    $product->setHasOptions(1);
    $product->getResource()->save($product);
    $data_str = 'optionfeatures[media_gallery][images][psehr948hpe][position]=1&optionfeatures[media_gallery][images][psehr948hpe][file]=/_/-/_-4_1.jpg&optionfeatures[media_gallery][images][psehr948hpe][value_id]=&optionfeatures[media_gallery][images][psehr948hpe][label]=&optionfeatures[media_gallery][images][psehr948hpe][disabled]=0&optionfeatures[media_gallery][images][psehr948hpe][media_type]=image&optionfeatures[media_gallery][images][psehr948hpe][removed]=&optionfeatures[media_gallery][images][psehr948hpe][custom_media_type]=image&optionfeatures[media_gallery][images][psehr948hpe][color]=&optionfeatures[media_gallery][images][p1asnnkpco5][position]=2&optionfeatures[media_gallery][images][p1asnnkpco5][file]=/_/-/_-5_3.jpg&optionfeatures[media_gallery][images][p1asnnkpco5][value_id]=&optionfeatures[media_gallery][images][p1asnnkpco5][label]=&optionfeatures[media_gallery][images][p1asnnkpco5][disabled]=0&optionfeatures[media_gallery][images][p1asnnkpco5][media_type]=image&optionfeatures[media_gallery][images][p1asnnkpco5][removed]=&optionfeatures[media_gallery][images][p1asnnkpco5][custom_media_type]=image&optionfeatures[media_gallery][images][p1asnnkpco5][color]=&base_image=&tooltip_image=&replace_main_gallery_image=';
    parse_str($data_str,$data_str);
    $arrayOption['values'][0]['images_data'] = $data_str;
    print_r($arrayOption);
    $option = $objectManager->create('\Magento\Catalog\Model\Product\Option')
        ->setProductId($product->getId())
        ->setStoreId($product->getStoreId())
        ->addData($arrayOption)
        ->setOptionId(null);
    $option->save();
    $product->addOption($option);
}

I tested these codes, but it doesn't work.


texts:
I've ripping my hair out trying to understand this
I would think that Magento is capable of doing what I am about to describe, but I haven't the slightest clue how to do it.
, Basically, my question is:
 How can I have one attribute constitute a set of fixed attributes/values?

As an example, I will describe my ideal product input method.

Add New Prodsuct
Fill out product attributes
Select a value for one particular attribute which will add a set of attributes depending on the value selected.
Save the Product, without ever having had to enter redundant information.

Lets say a particular product has the following attributes available

Attribute 1
Attribute 2
Attribute 3
and then there is Attribute 4.

After giving Attribute 4 it's value, that value should grab a completely different set of attributes.,... such as price, weight, style number, material, et cetera.
So, when that product is finally added, it will show those attributes imported from Attribute 4 on the Website Product Page.
a more realistc example
I am selling phones.  I have thousands of phones to sell.  Some of these phones, however, have the same attributes, such as : weight, model, model description, brand, wired/cordless...  The only thing that differentiates one of these phones from another is the Color and Price.  All colors will be the same price, weight, model, and so on, but they will differ in:

Quantity
Quality
Location in warehouse
Reference number
Color
Price
Cost

Furthermore, the brand will also have a brand description.


texts: Magento 2- Redirect customer to home page after customer session expires instead login page?

texts: i want to redirect the customer to the home page after session get expired. Right now it get redirected to the login page. How can i achieve it. Any  help welcome.


texts: How to identify to customer is existing or not in magento 1.9?

texts:
When we create an order with the new customer from the backend through then how to detect the programmatically user is existing or not?

I am triggering this event "sales_order_place_after" and  I have tried with below code but submit order then we will get the error: the customer is exist

$customer = Mage::getModel('customer/customer');
        if ($websiteId) {
            $customer->setWebsiteId($websiteId);
        }
        $customer->loadByEmail($email);
        if ($customer->getId()) {
            return true;
        }
        return false;


texts: Magento 2 (ver. 2.3.6) reindex not working

texts:
I have a single view Magento 2, with about 5000 products on it, running on a cloud hosting with 4GB RAM.
What happens is that every time the reindex process is triggered (by the cron job or by hand) it never ends and the website goes down (503 error).
I have checked the cPanel troubleshooting tool and it shows 2 queries being killed due to timeout, both trying to access the table MG_CATALOG_CATEGORY_PRODUCT_INDEX_STORE1.
So I tried to truncate the table but it's not working, the query fails and the e-commerce goes down during the process.
I have tried to reset index status with php bin/magento indexer:reset
I have tried to reset index status by changing the status to invalid directly in the db
but then, when I try the reindex it fails again.
Any guess?


texts: Magento Order Export with custom attribute Magento 1.9.2

texts:
Currently the order export dump only provides

Order #    Purchased On    Bill to Name    Ship to Name    G.T. (Base)    G.T. (Purchased)    Status

We need to add to this,

Invoice Number, SKU, HSN Code (custom attribute), Quantity, Tracking Number,  Product Tax Code, Ship to City, Ship to PinCode, Order Type (Prepaid or COD), Customer Email, Customer Phone, Subtotal, Discount, Shipping, Grand Total

Any suggestion that which file is responsible or any method.

UPDATE: I used this module but this module don`t show custom attributes.

extension

Any one knows which files are responsible for rendering the csv in default magento

Thank You.


texts:
Here I have solution how to disable for M.2.4 - but this solution  no work for M.2.4.2
Run the below command in your SSH to disable MSI in Magento 2.4.0
php bin/magento module:disable -f Magento_Inventory Magento_InventoryAdminUi Magento_InventoryAdvancedCheckout Magento_InventoryApi Magento_InventoryBundleProduct Magento_InventoryBundleProductAdminUi Magento_InventoryCatalog Magento_InventorySales Magento_InventoryCatalogAdminUi Magento_InventoryCatalogApi Magento_InventoryCatalogSearch Magento_InventoryConfigurableProduct Magento_InventoryConfigurableProductAdminUi Magento_InventoryConfigurableProductIndexer Magento_InventoryConfiguration Magento_InventoryConfigurationApi Magento_InventoryDistanceBasedSourceSelection Magento_InventoryDistanceBasedSourceSelectionAdminUi Magento_InventoryDistanceBasedSourceSelectionApi Magento_InventoryElasticsearch Magento_InventoryExportStockApi Magento_InventoryIndexer Magento_InventorySalesApi Magento_InventoryGroupedProduct Magento_InventoryGroupedProductAdminUi Magento_InventoryGroupedProductIndexer Magento_InventoryImportExport Magento_InventoryCache Magento_InventoryLowQuantityNotification Magento_InventoryLowQuantityNotificationApi Magento_InventoryMultiDimensionalIndexerApi Magento_InventoryProductAlert Magento_InventoryRequisitionList Magento_InventoryReservations Magento_InventoryReservationCli Magento_InventoryReservationsApi Magento_InventoryExportStock Magento_InventorySalesAdminUi Magento_InventorySalesFrontendUi Magento_InventorySetupFixtureGenerator Magento_InventoryShipping Magento_InventorySourceDeductionApi Magento_InventorySourceSelection Magento_InventorySourceSelectionApi Magento_InventoryLowQuantityNotificationAdminUi Magento_InventoryShippingAdminUi Magento_InventoryGraphQl


texts: Magento 2 shows current product as recently viewed product

texts:
I've got a problem with my Magento 2.1.4 store. I added recently viewed products block to the product page, but it keeps showing product I''m currently viewing as the 1st recently viewed product (example below).

Please help, I can't figure out why does it happen.

Code that adds the recently viewed product block

<referenceContainer name="content.aside">
    <block class="Magento\Reports\Block\Product\Widget\Viewed" name="related.recently.viewed"
           before="catalog.product.related" after="-"
           template="Magento_Reports::widget/viewed/content/viewed_grid.phtml">
        <argument method="setLimit">
            <argument name="limit" xsi:type="number">4</argument>
        </argument>
    </block>
</referenceContainer>

Example:


texts: get system config data in website,store and default scope

texts:
I have created the custom groups and fields under System->Configuration->Design
I used the below event.

<admin_system_config_changed_section_design>
    <observers>
        <custom>
            <type>singleton</type>
            <class>Custon_Custom_Observer</class>
            <method>save</method>
            </custom>
    </observers>
</admin_system_config_changed_section_design>

There are three types of scope in magento.

1) Default

2) Websites

3) Stores

I want all the values of my custom fields in admin panel to store the values in custom table.

for example,
you get description field value in store level.

Mage::getStoreConfig('design/custom/description');

I want the above value in website level and current store level.
I have tried this link


texts: how do i put a static block in the left or right column using the rwd theme in magento

texts:
How do i put a static block in the left or right column using the rwd theme
in magento?  I can't find any tutorials to about this subject.


texts: Magento 2 follows MVVM architecture or MVC architechure?

texts:
I am understanding the logic behind working in separate folders in Magento 2 and came across bundle of articles talking about same thing in different ways.

Some explain MVC logic behind it and  some say it is MVVM

Meanwhile Official Website says to follow MVC architecture in extension development.

If we are following MVVM (or any other) architecture can somebody explain it by relating it with Magento 2 directory structure.

Thanks.


texts: Magento 2.1 deploy static content production mode fails

texts:
after spending some hours with this issue I now dare to ask. I think I have overseen something stupid. After switching in production mode my, I run static content deploy command wich runs without any errors. But after that admin and frontend are missing all styles. Seems although deploy command works, static files are not written, pub/static is missing files and console error says require.config failed to load. strangely, I seem to have the opposite problem of those who have in the developer mode problems with the symlinks, because the developer mode with the symlinks works wonderfully, the symlinks are written without problems in pub / static.

Cheers,
Stefan


texts: 1.9.3 Internal server error on account login

texts:
Recently, after some reports of customers, I found a strange behavior.

These customers receive an internal server error page while accessing their account.

Sometimes the error occurs for each page of the site.

Investigating I found that these errors correspond to errors reported in the server's errror_log:

[Mon Jul 09 15:38:19 2018] [warn] [client ---.--.--.-- (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Mon Jul 09 15:38:19 2018] [error] [client ---.--.--.--] Premature end of script headers: index.php

At first I was thinking about a bad server configuration, but I noticed that to solve the problem with the account it is necessary to open the account in question in the backend and save it without making any changes.

After this procedure it is possible to log in from the frontend without any problem, at least for a certain period.

When the error occurs on all pages of the site, it is sufficient, instead, to remove the "persistent_shopping_cart" cookie from the browser to restore normal operation.

It seems that the error is only found by users with products in the shopping cart

Has anyone else encountered this problem?


texts: Get product from advanced search page by attribute value

texts:
I am trying to programatically retrieve a list of products that have a attribute with a specific value.

i am working on advanced search page.

i have created two attribute

price_foreach
quantity

1) if customer enter price from 100 to 150 and left blank quantity than it will show all products from price_foreach 100 to 150 its working fine

2) but if customers enter price_foreach 100 to 150 and quantity 100 it should show all product from 100 to 150 but in respect of quantity it should respect 100 and more than 100 products.


texts: Generate layout block on the fly with AjaxController

texts:
I'm trying to generate on the fly a block by clicking on a button. My problem is that the blocks contained by the main block are not displayed.

Here is an example of something who fails :

mymodule.xml layout

<block type="mymodule/level1 name="level1" template="mymodule/level1.phtml">
    <block type="mymodule/level2" name="level2" template="mymodule/level1/level2.phtml">
        <block type="mymodule/level3" name="level3 template="mymodule/level1/level2/level3.phtml" />
    </block>
</block>

level1.phtml

Level 1

<?php echo $this->getChildHtml("level2"); ?>

level2.phtml

Level 2

<?php echo $this->getChildHtml("level3"); ?>

level3.phtml

Level 3

When I use this structure I correctly have all my three p elements.

But if I want to generate level1 block on the fly, I use an ajax call to AjaxController of my module :

echo $this->getLayout()->createBlock('mymodule/level1')->setTemplate('mymodule/level1.phtml')->toHtml();

I'm only getting the first level1 p element and the getChildHtml seems not called.

Can you help me to find another way to do get all the layout structure in my variable ?


texts: Magento2 : How to show the product's attribute value at product details page on PORTO theme?

texts:
I have create drop-down attribute on the name of location with drop-down options.

I'd like to show the value of this attribute at product details page above add to cart.

Copied the file addtocart.phtml from the below location:

  vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml

to my theme like below:

  app/design/frontend/Vendor/theme/Magento_Catalog/templates/product/view/addtocart.phtml

I added my attribute code for my custom attribute like below :

<?= $_product->getAttributeText('location'); ?> //For dropdown

But it is not showing the data.

My product's url is :

http://www.depoto.com/vizag/sample-one.html


texts: Certain Magento Pages returning HTTP Error 500

texts:
Undergoing a Server Migration and Magento has been an issue. The page works just fine but every time that someone clicks on "Check out with PayPal", "PayPal Credit", or "Checkout with other options", it return HTTP Error 500 saying that the page is unable to handle the request.

This also happens on the back-end when an Administrator tries to access "PayPal Methods" under "Sales" and last but not least when we try to access an order. A few hours ago, orders would return an error specifying that it no longer existed when you clicked on it. I checked the sales_flat_order table on the database and it was empty. However, I imported all the data that should be in there and now it returns the same HTTP 500 Error.

For the most part, everything else has somewhat worked as it should. Memory has been increased in .htacces, I have tried messing with permissions according to this, nothing works.

find . -type f \-exec chmod 644 {} \;
find . -type d \-exec chmod 755 {} \;

find ./var -type d \-exec chmod 777 {} \;
find ./var -type f \-exec chmod 666 {} \;

find ./media -type d \-exec chmod 777 {} \;
find ./media -type f \-exec chmod 666 {} \;

chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml


texts: Magento 2. 2 Mail template can not be translated

texts:
I am offering English and Japanese in Magento 2 project.

We respond to customer's inquiries about products.

I want to make the mail template of that module correspond to Japanese, but it is not translated.

Please tell me how to resolve.


texts: i have an new module at app/code/MyVendor/MyModule and i try to understand structure of module magento2. I have some task of trainning list.I have an controller with execute() method echo sometext to with the new route i define in /etc/routes.xml. Can I have some solution to display these text to the some another page like Home, Category, Checkout and Cart ?.Help me!


texts: Magento 2 Enterprise : DB split in Percona

texts:
We can use DB split in Magento 2 Enterprise edition, but with Percona MySql 5.6 can we implement DB split?
Also do we have to add extra connection string in app/env.php or any module?


texts: magento 1.9.2.0 Invalid login alert message displayed twice. on internet explorer 11


texts:
I am constantly getting this error/Notice on my system logs:

Notice: iconv(): Wrong charset, conversion from `MacRoman' to `UTF-16BE' is not allowed  in /data/vhosts/edgars/web/lib/Zend/Pdf/FileParser.php on line 451

which is pointing to this function

    public function readStringMacRoman($byteCount, $characterSet = '')
    {
        if ($byteCount == 0) {
            return '';
        }
        $bytes = $this->_dataSource->readBytes($byteCount);
        if ($characterSet == 'MacRoman') {
            return $bytes;
        }
        return iconv('MacRoman', $characterSet, $bytes);
    }

what could be causing this error I can see it has to do with converting to pdf and that is when encoding happen, and it also have something to do with the languages that verien library does not support, so when you printing and sale > order > invoice in the backend using Thai language or Chinese

And how to get rid of the error ?


texts: magento search autocomplete not working in desktop view but working fine in mobile layout

texts:
Here is the URL:

http://digitalupstarts.com/hof/

Open this URL in desktop and mobile, and type "marco" in the search bar. You will find that in desktop the autosuggest is not working, and in mobile autosuggest is working fine.

Here is the full code of form.min.phtml:

<form id="search_mini_form" action="<?php echo $catalogSearchHelper->getResultUrl() ?>" method="get">

<?php /*$_helper = Mage::helper('catalog/category') */?><?php /*endif; */?>

            <input id="search" type="text" name="<?php echo $catalogSearchHelper->getQueryParamName() ?>" onfocus="if(this.value == 'Search Here...') { this.value = ''; }" onblur="this.value=!this.value?'Search Here...':this.value;" value="Search Here..." class="input-text" maxlength="<?php echo $catalogSearchHelper->getMaxQueryLength();?>" />
            <button type="submit" title="<?php echo $this->__('Search') ?>" class="button"></button>

</form>


texts: Properly setting up the robots.txt for magento

texts:
I want to remove the pages from search engine by using robots.txt to not to index such pages.
The repeated URL's Containing the same content appear as

website.com/category.html?dir=asc&mode=list&order=price&p=anypage


texts: Compilation completes but shows as disabled?

texts:
I am having a weird issue with 1.9.x where after clicking enable / compile, I do get the message saying "The compilation has completed." + "Compiler include path is enabled.", however it still says

Compiler Status: Disabled

Compilation State: Compiled

Collected Files Count: 8134

Compiled Scopes Count: 4

Any ideas? Permissions should be fine as using suPHP with correct ownership


texts: Unable to backup mysql database using mysqldump(php code)

texts:
I am trying backup my mysql database of linux hosted website(remote server-cpanel account) using mysqldump and executing this code through php file(db_backup.php).

db_backup.php
{

exec('mysqldump --user=MYUSERNAME --password=MYPASSWORD --host=localhost MYDBNAME> \home\kmnazar\public_htm\db\file.sql')

?>
}

Unfortunately unable to produce any backup file.Please guide me to resolve the issue.
Thanks in advance


texts:
We are having problems with the paypal extenion. The extension displays the $blockinstance array in the product page, see image. And The shopping cart button stops working too.  The logs do not show any errors and the only place where I find reference to the $blockInstanceName is on vendor/magento/module-paypal/Observer/AddPaypalShortcutsObserver.php.
Please help.


texts: Can Magento 2 handle REST updates from a Multi-threaded application?

texts:
I have a question regarding Magento 2's REST API.

We've developed an integration between a CounterPoint Database and a Magento 2 website. One of the bottlenecks in performance is updating product changes (inventory level, prices, product descriptions etc).  Currently, we update each product change one at a time.

My question is:

If we were to create multiple threads, and divide all inventory updates into these threads, would Magento 2 be able to handle this "water cannon" approach to sending it data?


texts: Magento 2 : Place Billing Address Above Payments Methods in Checkout

texts:
When using standard checkout in magento 2, I want to place checkbox with address above my payment methods:

I think I have to meddle with knockout JS which I have no experience in. Anyone knows where to start?


texts: Is there any Custom Grid Extension for magento 2

texts:
Recently I have used "BL_CustomGrid" For my Magento1 site.

Need to migrate site on Magento2 And looking for Custom Grid Extension.

Anyone have you experience for this please reply me?


texts: Magento 2 Backend Customer Add Address After Generate Error " One or more input exceptions have occurred."

texts:
Admin Side Create Customer Successfully then Add Address After Generate Error " One or more input exceptions have occurred."

I Want to Save Customer Address without First Name of customer.

Thank You..


texts: I need to import articles from a non magento csv file which does not contain any column names. How can I tell the import that product name is in column 1? Anyway todo this without changing the csv every time?


texts: Magento 2 SKU and URL Key is not generating unique by default

texts:
When I create multiple product with same SKU and same URL Key it is creating, as I know Magento do not allow this.

I googled alot but didn't find any configuration for this,

Please guide me what is the issue?

  Is Magento Stop creating unique url's and sku in 2.3 version?


texts: UI Form Component get weird compile error

texts:
I'm trying to import an UI Component in Adminhtml but i get an error like this:

Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('\n    \xC2\xA0\xC2\xA0\xC2\xA0\xC2\xA0\xC2\xA0...', Array)

#1 /home/alberto.freguco/www/vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Compiled->create('\n    \xC2\xA0\xC2\xA0\xC2\xA0\xC2\xA0\xC2\xA0...', Array)
#2 /home/alberto.freguco/www/vendor/magento/framework/View/Element/UiComponent/Argument/Interpreter/ConfigurableObject.php(60): Magento\Framework\ObjectManager\ObjectManager->create('\n    \xC2\xA0\xC2\xA0\xC2\xA0\xC2\xA0\xC2\xA0...', Array)

I don't understand why i get \xC2\xA0\xC2\xA0\xC2\xA0\xC2\xA0\xC2\xA0... encoding stuff.

Has anyone here the some problem?


texts:
So it looks like one of our sites is targeted by card skimming when you select a payment method a new iframe is loaded which asks the users for their card details.

It quite clever in the fact if you try to load the console it disappears.

Has anyone come across something like this, could you point me in the right direction of where to start fixing the issue.

Thanks.


texts:
I have a file named upgrade-1.0.3-1.0.4.php under CSB/Customer/sql/csb_customer_setup, and I updated the code in config.xml, under CSB/etc, to <version>1.0.4</version>.

On localhost the upgrade is working fine. However, when I put the files in the server the upgrade is not working. I already deleted the content of var/cache.

In PhpMyAdmin, I found a table named core_resource which has the entry CSB_customer_setup set to 1.0.4, both on localhost and on the server. I don't know exactly what this entry is, but at least the value is the last one I defined.

I don't see why in the server it's not working. Any ideas? All help is appreciated.

Edit: here's my code for config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <CSB_Customer>
            <version>1.0.4</version>
        </CSB_Customer>
    </modules>
    <global>
        <helpers>
            <CSB_customer>
                <class>CSB_Customer_Helper</class>
            </CSB_customer>
        </helpers>
        <resources>
            <CSB_customer_setup>
                <setup>
                    <module>CSB_Customer</module>
                    <class>Mage_Customer_Model_Resource_Setup</class>
                </setup>
            </CSB_customer_setup>
        </resources>
    </global>
    <frontend>
        <layout>
            <updates>
                <CSB_customer>
                    <file>CSB_customer.xml</file>
                </CSB_customer>
            </updates>
        </layout>
        <translate>
            <modules>
                <CSB_Customer>
                    <files>
                        <default>CSB_Customer.csv</default>
                    </files>
                </CSB_Customer>
            </modules>
        </translate>
        <routers>
            <customer>
                <args>
                    <modules>
                        <CSB_customer before="Mage_Customer">CSB_Customer</CSB_customer>
                    </modules>
                </args>
            </customer>
        </routers>
    </frontend>
</config>


texts: Magento 2 LUMA based custom theme - Needed extra Div under Menu

texts:
I have create a new Theme based on the Luma theme and I need to add a new div right under the Menu.
This will fall right before the homepage content.

Here is a screenshot to show where I need to add the new div.

How can I do this?


texts: Is this right way to retrive data from context to solve full page caching issue in product detail page Magento2?

texts:
I have refer sign in functionality on header where use customer data from context to check that customet is logged in or not?

So Can we use similar concept for product detail page?

Is this right way or more reliable way than private content?

Can anyone help please?


texts: Accessing Admin data from Magento 2.1 Rest API

texts:
I have integrated laravel 5.5 with magento 2.1

i-e: My magento installation works on http://magento.me
and my laravel part works on http://magento.me/laravel-panel

When so ever my customer is logged in on magento site and i hit API /rest/V1/customers/me
It returns me the customer data.

What could i do for getting admin data or know admin is logged via API .
same customer/me API responded like wise when admin is logged in

{"message":"Consumer is not authorized to access %resources","parameters":{"resources":"self"}}

I have also applied admin authorization token with above request having admin level rights and All resources access.


texts: How to remove decimal points from price in Magento 2?

texts:
In app/design/frontend/Vendor/Theme/Magento_ConfigurableProduct/templates/product/price/final_price.phtml of listing page price is appearing like ₹50.00 . I want to show it as ₹50.

I tried using

echo $this->helper('Magento\Framework\Pricing\Helper\Data')->currency(number_format(50,2),true,false);

and

echo $this->helper('Magento\Framework\Pricing\Helper\Data')->currency(number_format(50,0),true,false);

but it gives ₹50.00 and not ₹50. How I can achieve that?


texts: How to use fotorama in my custom widget?

texts:
I want to display my product image gallery in my custom widget.
$images = $_item->getMediaGalleryImages(); is how I got my images for product.
I want to display the image using fotorama? is this possible, how can I do it?


texts: Password strength meter is not working in magento 2

texts:
i want translate data-msg-required

I used data-msg-required="..." like this in register.phtml

        <?= $block->escapeHtml(__('Password')) ?>

            <input type="password" name="password" id="password"
                   title="<?= $block->escapeHtmlAttr(__('Password')) ?>"
                   class="input-text"
                   data-password-min-length="<?= $block->escapeHtmlAttr($block->getMinimumPasswordLength()) ?>"
                   data-password-min-character-sets="<?= $block->escapeHtmlAttr($block->getRequiredCharacterClassesNumber()) ?>"
                   data-validate="{required:true, 'validate-customer-password':true}"
                   data-msg-required="Dies ist ein Pflichtfeld."
                   autocomplete="off">

                    <?= $block->escapeHtml(__('Password Strength')) ?>:

                        <?= $block->escapeHtml(__('No Password')) ?>

It work, but Password strength meter not work. If i delete it, Password strength meter work, please help me.


texts: How to change currency in magento soap api

texts:
I am using Magento 1.8.1 and SOAP API 2. I couldn't find a way to change the currency for the API. How can I do this ? Or is this not possible with Magento ?

And if this is not possible, is there a way to extract currency values(values coming from the webservicex) in Magento ?


texts: Issues with Magento (ZEND MAIL + Customers do not receive the Order Confirmation)

texts:
I'm new here!
I sign up to this forum because I have encountered some problems with my Magento (version: 1.8.1.0).

When a customer ends the checkout by clicking on "Effettua Ordine" ("place an order", in English) I receive the order (in fact, I can see it showed on my backend) but the customer does not, he doesn't receive an order confirmation e-mail. Previously, customers received that e-mail and then they were redirected on a landing page named "Checkout Success", which advised about the order confirmation. So, what did happen?

When I'm into the backend (path: SALES -> Orders -> a specific order I need to ship -> SHIP ) and I try to insert the Tracking Number, then by clicking on "Submit Shipment" I receive a fatal error: "Class 'Zend_Mail_Transport_Sendmail' not found in /home/MYSITE-7public_html/lib/Zend/Mail.php on line 1176".

I've already opened a ticket with my Hosting, asking for some help. Below, I copy-paste our conversation:

HOSTING: Hello, It looks like the code was modified, you may have modified it while trying to fix the original problem in
public_html/lib/Zend/Mail.php. I have gone through it and reviewed
associated logs but don't see any other server side issues. You should
check recent changes/updates on site and also try reverting back them.
This is because I believe it was working before. Consulting with
developer should also help. Upon researching online it looks like the
default shouldn't be changed and for zend mail transport specifically,
an include should be in place instead of 'transport'.
#require_once 'Zend/Mail/Transport/Sendmail.php'; $transport = new Zend_Mail_Transport_Sendmail();
ME: Thanks for your help. By the way, I never modified the code so how it can be? Is it possible that during a  TCH server update, a part
of the code is been modified? And can you revert it for me?  I had no
problems 'til 28th June, but then on Monday 29th since the morning
(UTC+1 hour) I had those problems I have written before. In the last
six months I (as well as the webmaster or developer) never did
anything about the code, and never installed any adding mods, patch,
or whatever. The only "actions" made on the website were about adding
products and receiving and fulfill orders so what change could have
modified the code causing these errors?
HOSTING: First of all we don't manage or monitor your site code and server upgrades/server softwares updates has nothing to do with
your site's internal codes. It doesn't affect to any of your site
data. Let me know what server update you are referring to. All I can
see that the first was logged on the same date and most probably the
same time you mentioned. If time doesn't match that that could be only
because of different time zones but date looks same. I would suggest
you check this with someone else who has access and works/manage your
site/cart. [28-Jun-2020 09:58:23 UTC] PHP Fatal error: Call to a
member function validate() on a non-object in
/home/MYSITE/public_html/app/code/core/Mage/Paypal/Model/Standard.php
on line 137 [28-Jun-2020 12:05:18 UTC] PHP Fatal error: Class
'Zend_Mail_Transport_Sendmail' not found in
/home/MYSITE/public_html/lib/Zend/Mail.php on line 1176*

So in the end, does anyone can help me to fix these two issues with Magento and Zend Mail?
Thank you in advance,
Danilo
(CimaStore)


texts: How to define the order status after placing it for a virtual product in Magento2?

texts:
When I place an order, Mangento2 sets it into STATE = 'complete' and STATUS = 'complete'. However I still need to process the order in some way. I want it to be set to STATE_NEW or in some way pending. Also, the order is charged online using the payment method.

I have made more research. My product type is virtual so Magento2 recognizes that all paid virtual products should be complete. I chose virtual product as I am selling services. So no shipping information is needed.


texts: What value we need to pass for placing order in programatically for cash on delivery?

texts:
I want to place order programmatically using cash on delivery method for COD.

What value I need to pass? please help me to solve this?


texts:
I'm using MAGMI to import additional product images, when viewing the product in the admin it has all the image as expected. Reindexing the data does not show any errors either.

However, when I load the product on the frontend, all the images are removed from the database except for the last one and I cannot figure out why.

I've disabled the cache, reindexed the data, tried disabling all extensions and even tried reverting back to the default Magento theme. But the same thing happens no matter what I try.

Any ideas?


texts: Something went wrong while saving the category

texts:
I get an error on Magento 2.3.5-p1 when trying to add products to an existing category.
The products won't save and I get this message:

Argument 1 passed to Magento\Catalog\Model\Category\FileInfo::removeStorePath() must be of the type string, array given, called in /cache/vendor/magento/module-catalog/Model/Category/FileInfo.php on line 167

If I navigate to the product page to add to a category i get this error:

Unable to unserialize value. Error: Syntax error

and this in the log:

[2020-09-18 19:44:02] main.CRITICAL: Unable to unserialize value. Error: Syntax error {"exception":"[object] (InvalidArgumentException(code: 0): Unable to unserialize value. Error: Syntax error at /cache/vendor/magento/framework/Serialize/Serializer/Json.php:39)"} []

How can I fix this?


texts: How to create virtual product which is configurable as well?

texts:
My scenario is like this. I want to create some products which are virtual (means we are not going to deliver). But at the same time those products need to be configurable as well.

But in Magento I can create either configurable products or virtual products. But my requirement is to create virtual products which are configurable. How to combine these two product types into one?

  Or else are there any solutions to achieve this? (Other than creating
  a new custom product type by combining the features of virtual and
  configurable product types)

Any suggestions will be appreciated.


texts: Magento 2 : Indexing for large database is taking so much time

texts:
I have imported more than 250000 of products for two stores. I am trying to indexing those products but it is taking long time through SSH.Indexing Taking so much time and then after indexer lock. If I reset indexing using below command , then also not working.

php -f magento indexer:reset

Is there is any way that i can perform indexing on those products ?

Magento 2.1.8

Thanks


texts: Invalid Login attempt while accessing Netsuite using SuiteTalk(Web Service)?

texts:
I am trying to get data from NS using WS. for that I'm using the following details in SoapUI:

WHEN I SEND THE request I get the following response :

Anyone had success with this or have any idea what I'm doing wrong?
Also Have you any idea about how we can generate the signature if mine is incorrect!

Thank you for your Help!


texts: Re index For specific product in magento1.9

texts:
i want reindex for some products by id i tried following code but it take all indexing to reindex required i am using magento 1.9.2.

$product = Mage::getModel('catalog/product')->load('84494'); // Product Id

$event = Mage::getSingleton('index/indexer')->logEvent( $product,$product->getResource()->getType(), Mage_Index_Model_Event::TYPE_SAVE,true );

Mage::getSingleton('index/indexer')
    ->getProcessByCode('catalog_url') // Adjust the indexer process code as needed
    ->setMode(Mage_Index_Model_Process::MODE_REAL_TIME)
    ->processEvent($event);


texts:
I'm getting the broken webpage on internet explorer when I have set pub as a root directory. I have attached the output for your reference. Please let me know your suggestion and help me to resolve this issue.

Magento version: 2.2.3

Note: When I have removed pub as a root directory, I didn't get any error and the webpage is rendering correctly.


texts: How to share customer account globally : magento

texts:
I'm trying to share my customer account Globally:

I have two stores :

www.mainstore.com

store1.mainstore.com

I want to add functionality that if customer register any of the store can have access to login any store with same details.

To activate this made some changes in admin panel > system > configuration > customer configuration > Account Sharing Option > Share Customer Accounts > Global.

After changing the setting to Global when i click on save Config button i got below error :
Error : Cannot share customer accounts globally because some customer accounts with the same emails exist on multiple websites and cannot be merged.

Why i am getting this error ?
Suggest me the solution for this issue.


texts: New order Status Field Blank - All orders have no status

texts:
I am having some problems with the New Order Status in Magento CE 1.9.0.1.

When I try to set the new order status for every payment method. The dropdown in blank.

Worldpay

Check / Money Order

This has the effect of all orders except pending payment having a blank order status.

I have no idea how to sort this issue can anyone give me some advice.

I can see all order statuses in the admin


texts: How magento 2 render checkbox column in admin product grid

texts:
I need to disable some checkboxes in a grid based on certain criteria but not able to figure out from where the checkbox column is rendered.

I reached the following two files after some search, but changes in these files are not reflecting on the grid.

  Magento_Ui/templates/grid/cells/multiselect.html

And

  Magento\Backend\Block\Widget\Grid\Column\Renderer\Checkbox


texts: How to delete color attribute option by using label in Magento 2?

texts:
Can we delete product attribute options by using label?

For example say attribute:color has options like green, red, yellow how to delete red from this? I used below code.

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();

        $eavConfig = $objectManager->get('Magento\Eav\Model\Config');

        $attribute = $eavConfig->getAttribute('catalog_product', 'color);

        $id = $attribute->getAttributeId();

        $options = $attribute->getSource()->getAllOptions();
        foreach ($options as $option) {
            $options['delete'][$option['value']] = true;
            $options['value'][$option['value']] = true;
        }

        $eavSetup = $this->_objectManager->get('Magento\Eav\Setup\EavSetup');
        $eavSetup->addAttributeOption($options);

It is deleting all the options. I need to delete specific option.


texts:
I am unable to add custom tabs to my website and I am looking for a bit of help on how to proceed.
The theme controls the tabs within it's own file /template/catalog/product/view/tabs.php so the normal ways seem not to work with it. Can anyone give me a helping hand?

The important part seems to be

        <?php foreach ($this->getTabs() as $_index => $_tab): ?>
            <?php if($this->getChildHtml($_tab['alias'])): ?>
                <li id="product_tabs_<?php echo $_tab['alias'] ?>" class="<?php echo !$_index?' active first':''?>"><?php echo $_tab['title']?>

            <?php endif; ?>
        <?php endforeach; ?>

    <?php foreach ($this->getTabs() as $_index => $_tab): ?>
        <?php if($this->getChildHtml($_tab['alias'])): ?>
            <div class="meigee-tabs-content" id="product_tabs_<?php echo $_tab['alias'] ?>_contents"><?php echo $this->getChildHtml($_tab['alias']) ?>

        <?php endif; ?>
    <?php endforeach; ?>

    <?php foreach ($custom_tabs as $key) {
if(!empty($key)):
?>
<div class="meigee-tabs-content" id="<?php echo $key; ?>_contents"><?php echo $this->getLayout()->createBlock('cms/block')->setBlockId(trim($key))->toHtml() ?>

<?php endif; } ?>

If I was to add a tab to this with the tab header "Manufacturer" and the content pulled a CMS block                 <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId($manu)->toHtml() ?>

My plan is define manufacturer attribute as

<?php $manufacturer = $_product->getAttributeText('manufacturer'); ?>
    <?php $manu = strtolower("manufacturer-" . $manufacturer) ;?>

This is so I can then use it to pull an image and static CMS without issues. I just cannot get by the first hurdle...also when I place in <?php $manufacturer = $_product->getAttributeText('manufacturer'); ?> It gives and error and cuts off the footer.


texts: How can I use the app/bootstrap.php way to load Magento JS?

texts:
Known that we can run Magento 2 Code externally using include('app/bootstrap.php').
After loaded we can  freely to create $objectManager to load different model.
However is it possible to load the Magento javascript library/js widget?
For example, one of the payment integration is using js library to encrypt sensitive information and I want to run this logic in my externally code.
Can I run the js library which is implemented as a method renderer js?
Adyen payment example


texts:
I need to export customers into a excel format cvs would be ok.

I tried System > Export/Import > Profiles but this does not work as the documentation explains: http://www.magentocommerce.com/knowledge-base/entry/tutorial-using-magentos-import-export-profiles.

Note: I don't need to import this data back into Magento.

What's the trick?


texts: Problems with SOAP API authentication and java client

texts:
I need to develop an application driver that connect a CMS with Magento 2.0, using the SOAP API. My application is a Java J2SE and so I choose the axis2 project. I generate the code using the wsdl2Java tool and I'm able to create account using CustomerAccountManagementV1CreateAccountRequest command.
Now I'm trying to get the customer repository using CustomerRepositoryV1GetListRequest, but I get the error message: "customer is not authorized to access %resources".
I think I need to authenticate but I don't know how to do that. I hope someone could help, I do not have much time and I need a fast way to do that.
Thanks


texts:
I'm setting up a sale rule with a coupon which is £10 off if you spend more than £50.

While logged in this seems to work fine however when not logged in the coupon code is flagged as invalid.

http://prntscr.com/lxue5f is a screenshot of the Customer Group rule were everything is added and I'm unable to see any errors for non logged in users.


texts:
I have generate XML file using Product list, there are sections called AttributeValueCode and AttributeValueLabel.

Want to get Label and Value(id) for the options of attribute having type select

Any one have idea about this ?


texts: How to install theme in recent Magento on Centos 7 (no GUI, VM)?

texts:
There are 2 directories of Porto theme.zip on my Windows desktop - "app" and "pub". I put them by simply dropping from desktop into /app/design/frontend Centos directory via WinSCP. In my opinion full default path after dropping looks like (by WinSCP): /var/www/html/magento/app/design/frontend. Than I run commands like (but it is no helps):
setup:upgrade, setup:di:compile, setup:static-content:deploy, indexer:reindex, cache:flush
After that I go to Admin Panel in Content > Design > Themes but nothing. I need any commands, different paths?

Also I have Composer but I still not able to create commands by myself or paths from my Windows desktop to Centos.


texts: Where is the code that assigns the browser's URL when clicking a button?

texts:
When I click a button that sends me to a controller action in Magento, where is the code that directs the browser to a new URL?  I've been trying to trace the code with the debugger, but I can't find the line of PHP code (or lines of code) that actually assign the browser's URL.

The reason I'm asking is that Magento is putting a hash at the end of my checkout URL, and I'm trying to track down what's adding the hash.

Here is the Javascript behind the button that I'm clicking

define([
    'jquery'
], function ($) {
    "use strict";
    return function (config, element) {
        $(element).click(function () {
            var form = $(config.form);
            var baseUrl = form.attr('action'),
            buyNowUrl = baseUrl.replace('checkout/cart/add', 'buynow/cart/add');
            form.attr('action', buyNowUrl);
            form.trigger('submit');
            form.attr('action', baseUrl);
            return false;
        });
    }
});

After clicking the button, I get redirected to example.com/checkout/#93=4.  I'm trying to find the code that's adding the #93=4 to the URL.  My guess is that the #93=4 is addended to the URL for the "add to cart" action because 93 is the EAV ID of the configurable option, and 4 is my selected configurable option, but I can't find where it's getting appended.  My goal is to figure out a way to strip that off when I get redirected to the checkout page.


texts: display only subcategories grid with images on homepage

texts:
I am trying to display my subcategories in a grid with respective images on my homepage. I got everything workin but the images. What am I missing? the link to the page is colagenosnella.com.br, Code follows. Thank in advance.

<?php
/*
* http://fishpig.co.uk - Magento Tutorials
*
* Display top level categories and subcategories
*
**/
?>
<?php $_helper = Mage::helper('catalog/category') ?>
<?php $_categories = $_helper->getStoreCategories() ?>
<?php $currentCategory = Mage::registry('current_category') ?>

<?php if (count($_categories) > 0): ?>

    <?php foreach($_categories as $_category): ?>

            <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
            <?php $_subcategories = $_category->getChildrenCategories() ?>
            <?php if (count($_subcategories) > 0): ?>

                    <?php foreach($_subcategories as $_subcategory): ?>

                            <a href="<?php echo $_helper->getCategoryUrl($_subcategory) ?>">
                            <img src="<?php echo $_subcategory->getImageUrl() ?>" width="200" height="200" />
                                <?php echo $_subcategory->getName() ?>

                    <?php endforeach; ?>

            <?php endif; ?>

    <?php endforeach; ?>


texts: We're sorry, an error has occurred while generating this content M2

texts:
I have checked log file exc.log

  [2020-01-06 11:20:35] main.CRITICAL: Notice: Undefined offset: 2 in
  /var/www/vhosts/exmp.com/httpdocs/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/category/subcategory.phtml
  on line 5 {"exception":"[object] (Exception(code: Notice: Undefined
  offset: 2 in
  /var/www/vhosts/exmp.com/httpdocs/app/design/frontend/Smartwave/porto/Magento_Catalog//category/subcategory.phtml
  on line 5 at
  /var/www/vhosts/exmp.com/httpdocs/vendor/magento/framework/App/
  ErrorHandler.php:61)"} []

subcategory.phtml File Code

<?php

$curr_url = $_SERVER['REQUEST_URI'];
$exp_url = explode('/', $curr_url);
//print_r($exp_url);
if($exp_url[2] == 'xyz.html' || $exp_url[2] == 'xyz'){
    $classType='xyz';
    }else if($exp_url[2] == 'abc.html' || $exp_url[2] == 'abc'){
        $classType='abc xyz;
        }else{
            $classType='tool-another';
            }
?>


texts:
I have a really weird phenomena happening w/ my checkout and paypal.

I'm using paypal express checkout; If I use any of the paypal express buttons to checkout,  when I return from paypal to finish the order and submit it - the quote is processed into an order and invoiced. (THIS IS THE FUNCTIONALITY I WANT)

Invoices orders when used this way

When I use the normal One Page Checkout flow, and select paypal through that workflow, when I return from paypal to finish the order and submit it - the quote is processed into an order but IS NOT invoiced.

Doesn't invoice orders this way

Anyone ever come across this? or ideas how to fix?  I have not modified the or overridden any functionality that deals w/ the payment gateways, and this is a pretty bare-bones site. Not a whole lot of extra functionality that would be messing anything up.


texts: Into which tables/attributes should we upload shipping info?

texts:
We are handling all inventory management and order fulfillment in Salesforce, which will be synced with our new Magento2 implementation.  When products are shipped out to the customer, we would like to push this info back into Magento so that the customer can review on their order status.

Which tables/attributes (objects/fields) should be updated with tracking number, date shipped, etc.?

I know it probably has something to do with http://devdocs.magento.com/swagger/index.html#!/salesShipmentRepositoryV1 but I was hoping someone else has come across this issue before.

Thank you.


texts: How do i add layout to the homepage of my site

texts:
How do I add a layout to the homepage of my site? The homepage content is NOT a full screen and id like to add a full-width banner with a clickable button on it just like what we have here on
this site

However, I tried using the static block for this but it didn't work. I am new to Magento and would really appreciate all the help I can get.


texts: Missing required argument $mainTable on Collection

texts:
I have a custom grid, where it gets some data from the shipment table.
This is the error message received:
Missing required argument $mainTable of Vendor\Module\Model\ResourceModel\Order\Shipment\Order\Grid\Collection.

This is the code from di.xml:
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
    <arguments>
        <argument name="collections" xsi:type="array">
            <item name="vendor_module_grid_data_source" xsi:type="string">Vendor\Module\Model\ResourceModel\Order\Shipment\Order\Grid\Collection</item>
        </argument>
    </arguments>
</type>

and my Vendor\Module\Model\ResourceModel\Order\Shipment\Order\Grid\Collection file:
use Magento\Sales\Model\ResourceModel\Order\Shipment\Order\Grid\Collection as ShipmentGridCollection;
class Collection extends ShipmentGridCollection
{
    /**
     * @var ShipmentHelper
     */
    private $shipmentHelper;

    public function __construct(
        EntityFactory $entityFactory,
        Logger $logger, FetchStrategy
        $fetchStrategy,
        EventManager $eventManager,
        $mainTable = 'sales_shipment_grid',
        $resourceModel = Shipment::class,
        ShipmentHelper $shipmentHelper
    ) {
        $this->shipmentHelper = $shipmentHelper;
        parent::__construct(
            $entityFactory,
            $logger,
            $fetchStrategy,
            $eventManager,
            $mainTable,
            $resourceModel
        );
    }
    /**
     * Filter the sales_order_grid table
     */
    protected function _renderFiltersBefore()
    {
        $this->getSelect()->join(
            ['sales_shipment' => $this->getTable('sales_shipment')],
            'main_table.increment_id = sales_shipment.increment_id',
            ['sales_shipment.entity_id as shipment_entity_id']
        );
        $this->getSelect()->join(
            ['sales_order' => $this->getTable('sales_order')],
            'sales_shipment.order_id = sales_order.entity_id',
            ['status']
        );
        $this->getSelect()->order('main_table.entity_id ASC');
        parent::_renderFiltersBefore();
    }

}

Does anyone know why exactly I got that error ? Thank you


texts:
I've been testin with Magento 1.9.3.9, Ultimo theme and Firecheckout extension.

I've noticed that there are no top menu on success page like on all other pages. I've tried to add the top menu block via local.xml:

<checkout_onepage_success>
    <reference name="top.menu">
        <action method="insert">
            <block>catalog.topnav.menu</block>
        </action>
    </reference>
</checkout_onepage_success>

But got this error message:

Mage registry key "umm_top_menu_exists" already exists

#0 /var/www/html/mage/app/Mage.php(223): Mage::throwException('Mage registry k...')
#1 /var/www/html/mage/app/design/frontend/ultimo/websiteone/template/infortis/ultramegamenu/mainmenu.phtml(56): Mage::register('umm_top_menu_ex...', true)
#2 /var/www/html/mage/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/html/p...')
#3 /var/www/html/mage/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/ultimo...')
...

I understand that this means the block is still initializied and can't be loaded twice but for my understanding medtho insert won't initialize it again but load the existing block. Thats why I wonder why I got this message.

Looks like I miss something but I don't know what.


texts: Static resources cause 404 errors (Magento 2.1.5)

texts:
I have a Magento 2.1.5 installation running, but it only works if I change my document root to /pub. If I don't, I get a bunch of 404 errors:

The problem is that eventually I'll have to move the installation to a hosting provider where the document root cannot be changed.

Only a folder called _requirejs is created within the static folder. There's no version1492703026 anywhere to be found:

I've tried the following:

Modify di.xml as per here
(Re)deploy all static content via the command-line
Rewrite everything to /pub
Restore the .htaccess files within the web root and /pub

Would anybody have any idea what's going on?

Thanks in advance!


texts: Blank Frontend and Backend of Magento 2.2

texts:
I am new to Magento and I am trying to learn it. I installed Magento using CLI and it got installed successfully, but when I navigated to my frontend, nothing was shown, attaching a screenshot below

Same is the case with backend, below is the image for backend

Please help me with this
Thank you all in advance

EDIT

After running 3 commands, mentioned in the below answer, the screen looks like


texts: How to change toolbar limiter dropdown to links

texts:
How i can change the product toolbar limiter dropdown to links,

like: 9 | 15 | 30 | All


texts:
I am trying to find example code to create a category list that provides choice of brands with the option to choose underneath as per the below image. I have searched most of the magento forums and I cannot find any examples.

Any help would be much appreciated.


texts: How is params p added in product listing url on click of pagination?

texts: I Need to know how  www.example.com?p=5 added in magento2 URL ?


texts: Contact-us page captcha not showing on another page using the same template

texts:
I added a captcha on the contact-us page following the guide here: How to implement Magento Captcha in Contact- Us form?

it seems to be working perfectly, the problem is that I have another CMS-page that calls the same contact-us form template like this:

{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}

the problem is that the captcha is not working on that page, yet it keeps working on the default contact-us page, even if the form should be the same.


texts:
How do I delete the following files from the front end?

Here is the code I inserted.
It doesn't work.

  magento/app/design/frontend/Infortis/base/Magento_Theme/layout/default_head_blocks.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0" />
    <remove src="Magento_Theme::mage/calendar.css"/>
    <remove src="Amasty_ShopbyBase::css/swiper.min.css"/>
</head>

Then, after editing and saving, I executed the following command:

sudo php71 bin/magento setup:upgrade
sudo php71 bin/magento setup:static-content:deploy -f
sudo php71 bin/magento cache:clean
sudo php71 bin/magento cache:flush


texts: How to wrap a class between each 2 form fields in checkout page magento2

texts:
I have checkout form fields First Name , Last Name , Country , postal code

I need to wrap fields like this

Firstname field

Lastname field

Country field

Postalcode field

I have added col-md-6 by overriding the Magento UI "Magento_Ui/templates/form" form.html there i have added col-md-6 so for each fields now this class is added. I'm not sure how to add class row for each 2 fields.

Please let me know if someone worked on this thanks in advance.


texts:
I've got an order with two items - and one is out of stock.

What's the proper way to cancel only one item?

If I invoice and ship one item, I end up with a hanging item. And if I hit the cancel button on the order, it still keeps the order total at the original amount and says the customer still owes money ... e.g.

Grand Total: $400
Total Paid: $200
Total Due: $200

But that total due should be zero, as the item's been cancelled. What should I be doing here?

(Magento seems to think that instead of cancelling, I should invoice and refund offline, but that seems ridiculous.)

Using Magento 1.7. Payment is via authorize.net ... And it's authorize only, rather than authorize & capture.


texts: Dynamic Breadcrumbs on Product View with Full Page Cache Enabled

texts:
Situation

We have a breadcrumb block on our product details page. With multiple category trees directing users to a single product page, the breadcrumb trail should change depending on the category which made the referral.

In our case, if Full Page Cache (FPC) is disabled -- the Breadcrumbs are dynamic and it works like I described.

With FPC enabled, the breadcrumb gets fixed on the initial non-cached page request.

Question

How would I go about getting the breadcrumb block to be dynamic on the product page? It's perfectly fine if it's being cached on category results pages.


texts: Magento 2.3.2 How to display custom attribute (image) in CMS Block

texts:
Each one of my products has a custom media image attribute which is an called 'height-image'. I would like to display this image in a CMS Block on the product page. Can anybody explain how to call the custom attribute into the CMS Block.
'height-image' would be one of 5 or 6 different images depending on the product, so I can't just drop a one-time URL into the block.
Any help would be appreciated.


texts:
Ok I've been googling like a possessed person and I can't find anything that helps with this.

We've been running Magento on an NGINX setup nicely for some time but we am stuck on solving an issue with admin based pdf invoices not working.

Nothing in logs - nginx error logs. Only thing I see in Magento exception log is:

[notice] 19794#0: 3321688 "^(..php)/" matches "/index.php/admin/sales_invoice/pdfinvoices/key/**/“, client: , server: **.com, request: "POST /index.php/admin/sales_invoice/pdfinvoices/key/**/ HTTP/1.1", host: "www.domain.com", referrer: "https://www.domain.com/index.php/admin/sales_invoice/index/key/**/"

9794#0: 3321688 rewritten data: "/index.php", args: "", client: 109.*, server: **.com, request: "POST /index.php/admin/sales_invoice/pdfinvoices/key/**/ HTTP/1.1", host: "www.domain.com", referrer: "https://www.domain.com/index.php/admin/sales_invoice/index/key/**/"

I'm wondering if the fact that in the second block the args are empty has anything to do with it, but if that was the case I would expect some form of error instead of a white screen.

I've tried upping PHP memory limits, execution times, time-out limits but to no avail and I still can't get an error logged anywhere. I read (link not to hand) that someone in an earlier version of Magento had a similar error because they were using fast-cgi, switching away from this not a realistic option currently.

Any suggestions on what else to look at, or anyone come across this and have a fix? My gut says it's a nginx/php-fpm tweak that needs to be made but struggling to find it.

Magento 1.7
PHP 5.3.17
Nginx 1.2.3

Cheers,

Adam


texts: How can future magento crons show as 'Too late for the schedule'

texts:
In the picture, the red vertical line represents now. Red bars in the future are showing the message 'Too late for the schedule'. How is this even possible? My web servers and database all have synchronized time (UTC). I'm using Mirasvit Asynchronous index and also AOE Scheduler.

Cron is configured according to system config below. System cron runs every five minutes.

Do the crons fire from top to bottom? Could a fatal error in one of the upper methods be causing aysncindex never to be reached? It still doesn't answer why scheduler shows future tasks as "Too late."

Your insight is appreciated.


texts: "An error occurred while creating the backup" in Magento

texts:
I am trying to backup Magento files and database backup using System-> Tools -> Backups. Database backup is created fine, but when I try to backup the system files using "System Backup" , it throws an error and not creating backup. This is the error I am getting when I click "System Backup" button.

"An error occurred while creating the backup"

In system.log

2014-01-29T11:57:45+00:00 ERR (3): Notice: Undefined index: httponly  in /app/code/local/Mage/Core/Model/Session/Abstract/Varien.php on line 94
2014-01-29T11:57:45+00:00 ERR (3): Notice: Undefined index: secure  in /app/code/local/Mage/Core/Model/Session/Abstract/Varien.php on line 96
2014-01-29T11:57:45+00:00 ERR (3): Notice: Undefined index: domain  in /app/code/local/Mage/Core/Model/Session/Abstract/Varien.php on line 98
2014-01-29T11:57:49+00:00 DEBUG (7): RecursiveDirectoryIterator::__construct(/public_html): failed to open dir: Permission denied


texts:
How to prevent Magento 2.0 from emptying cart after failed payments?

I could find multiple solutions for this problem in Magento 1.X but could not find anything for 2.0

I am sure this must be a common issue with many Mangento 2.0 implementors.

Will be greatfull, if someone can suggest some solution for this problem.


texts: Undefined Index exception in Custom module form submit data

texts:
getting an exception while submitting data in form but data is saving in the database? how to remove that undefined exception
This is the controller code

<?php
namespace Quadone\Caregiver\Controller\Outside;
use Magento\Framework\App\Action\Action;
use Magento\Framework\Controller\ResultFactory;

class Add extends \Magento\Framework\App\Action\Action
{
    protected $_objectManager;
    protected $customerSession;

    public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Framework\ObjectManagerInterface $objectManager,
    \Magento\Customer\Model\Session $customerSession,
        array $data = [])
    {
        $this->_objectManager = $objectManager;
        parent::__construct($context, $data);
        $this->customerSession = $customerSession;
    }
    public function execute()
    {
        $Customer_id = $this->customerSession->getCustomer()->getId();
        $post = $this->getRequest()->getPostValue();
        $item = $this->_objectManager->create("Quadone\Caregiver\Model\Caregiver");
        $item->setData('customer_id', $Customer_id);
        $item->setData('name',$post['name']);
        $item->setData('phone',$post['phonenumber']);
        $item->setData('email',$post['email']);
        $item->setData('reason',$post['reason']);
        $item->setData('behalf patient',$post['behalfpatient']);
        $item->setData('disclaimer', $post['disclaimer']);
        $item->save();
        $this->_redirect('*/*/*');
        $this->messageManager->addSuccess(__('Caregiver is added successfully.'));
    }
}


texts: Magento 1.9.3.1 - Error 500 on products in cart if updated in admin

texts:
I'm running Magento 1.9.3.1 and I'm having a very weird issue I never encountered having multiple Magento websites.
If I add a product to cart then update it in back office, I have an error 500 on frontend on all pages. I have to delete browser history to get the pages back.
Any idea on what could be causing this ? Could it be a Magento bug ?
Logs are giving :

mod_fcgid: stderr: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 130968 bytes) in app/code/core/Mage/Sales/Model/Resource/Quote/Item/Option/Collection.php on line 101 on home page
mod_fcgid: stderr: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 2245 bytes) in app/code/local/Mage/Eav/Model/Entity/Collection/Abstract.php on line 1138 on category page
mod_fcgid: stderr: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 98 bytes) in lib/Zend/Db/Statement/Pdo.php on line 291 on product page
mod_fcgid: stderr: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 256 bytes) in lib/Varien/Simplexml/Element.php on line 195 on cart page

I'm on a dedicated server running multiple Magento stores OK.


texts: Grunt, .less, and Live Reload - Can't get them working

texts:
Good afternoon,

I am having a devil of a time getting my front-end flow working. I have grunt CLI working, along with theme.js setup properly (see images below). Still, when I make changes within my {themeDir}web/css/source/_theme.less I do not see the changes. The only time I can see the change is after running a grunt clear command, and the manually reloading the page.

It seems like the change only gets moved to pub/static after that folder is cleaned, and the contents are reloaded. In other words, this is exactly what grunt should be doing for me, from what I understand.

I have been stuck on this for days.

I am able to get the following from grunt exec:{themeName} & grunt less:{themeName}:


texts: How display specific products at top of list on category in magento 2

texts:
I want to display featured product of category at top of the product list with all filters, pagination and sorting.

For Example:
I have an array of ID's that should show first in collection when category page open.


texts: How to adjust the text Order Summary in shopping cart

texts:
All the text in the Order Summary is dutch, so i want to change ´´Order Summary´´ into ´´Order Totaal``
I cannot find the solution.
For all with the same problem. I managed this problem with function inline translation in backend magento. Thanks for all responding.


texts:
I have two tables user and address, I want to display all the contents from table user and address when id of user table matches the id of address table. I tried something like this:

$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
       $user_table = $this->getMainTable();
       $address_table = $this->getTable('user/address');
       $cond = $this->_getReadAdapter()->quoteInto('$user_table.user_id = $address_table.userid','');
       $where = $this->_getReadAdapter()->quoteInto("user_id = ? OR ", $string).$this->_getReadAdapter()->quoteInto("firstname = ? OR ", $string).$this->_getReadAdapter()->quoteInto("lastname = ? OR ", $string).$this->_getReadAdapter()->quoteInto("email = ? OR ", $string).$this->_getReadAdapter()->quoteInto("dob = ? ", $string);
       $select = $this->_getReadAdapter()->select()->from($user_table)->join(array('t2'=>$address_table), $cond)->where($where);
       $data = $this->_getReadAdapter()->fetchRow($select);
       return $data;

Someone please help. Thanks.


texts: Problem with extending Luma theme using Grunt with Less

texts:
I am trying to extend from the Luma theme in Magento 2.1 but I ran into several problems.

First of all, my theme isn’t extending properly. The templates and xml files all seem to work. My clients logo (defined in default.xml) is showing and I have a footer block which shows some static blocks from the admin and these are showing as well.

Here’s a screenshot of the theme structure: http://imgur.com/ISzZZnF

But when I open the website I seem to be missing some, but not all, parts of the CSS. For example, there is a link “Compare Products ()” in the right side of the header (next to the search field) which has a class “no-display”. When I change back to the Luma theme this class has a “display: none;” in the CSS and therefore doesn’t show. But when I switch to my custom theme, the class “no-display” doesn’t exist in the generated CSS and so the link shows. Yet the same element has a class “action” which does exist in the generated CSS (and comes from the Luma theme).

Here’s a screenshot of the problem: http://imgur.com/SBUy53I

The other problem is that Grunt with Less won’t work. I followed the instructions on Magento devdocs and while we did get Grunt to run without errors, the “watch” command didn’t do anything. I also extended the Less according to Magento devdocs but to no avail. Even manually deleting the files in pub/static en var/view_processed doesn’t fix the problem.

I’m working in developer mode and all caching is disabled. I have run the command php bin/magento setup:static-content:deploy --theme Twm/degr nl_NL and I can see files being generated in pub/static/frontend/Twm and var/view_processed corresponding to my theme.

I have tried several online solutions yet none of them seem to work.

What am I doing wrong?


texts: How to force the base template to be used for a block?

texts:
I'm currently developing a Module and I'm having a problem where if I put my layout in the base template folder instead of the current design template folder, the layout doesn't get loaded/found. I hope someone could enlighten me on how I can configure this properly, since I can't really find it when searching on Google..

This is my (layout).xml for the block/Module:

<?xml version="1.0"?>
<layout version="0.8.0">
    <default>
        <shopcommerce_slider_front_index_index>
            <reference>
                <block type="shopcommerce_slider_front/slider" name="sc_slider" template="shopcommerce/slider/layout.phtml" />
            </reference>
        </shopcommerce_slider_front_index_index>
    </default>
</layout>

frontend section of config.xml:

<frontend>
        <routers>
            <shopcommerce_slider>
                <use>standard</use>
                <args>
                    <module>ShopCommerce_Slider</module>
                    <frontName>scslider</frontName>
                </args>
            </shopcommerce_slider>
        </routers>
        <layout>
            <updates>
                <shopcommerce_slider>
                    <file>shopcommerce.xml</file>
                </shopcommerce_slider>
            </updates>
        </layout>
    </frontend>

blocks section of the config.xml:

<blocks>
    <shopcommerce_slider_adminhtml>
        <class>ShopCommerce_Slider_Block_Adminhtml</class>
    </shopcommerce_slider_adminhtml>
    <shopcommerce_slider_front>
        <class>ShopCommerce_Slider_Block</class>
    </shopcommerce_slider_front>
</blocks>

If any more code/information is needed I'm happy to provide it.


texts: Empty Current Cart Items And Add new cart items programmatically in magento2

texts:
I want to generate a sharecart link to customers , here the problem is when i am sharing cart link i am adding one unique key to the sharecart url. Based on this key added products to customers cart programmatically. Upto now it is working fine.
Problem is in our store we have only one qty available for each product. When a customer opens the link it is showing that product with out any issues. Again that customer comes and click on same link it is not showing cart items any more.
/**
 * {@inheritDoc}
 */
public function share($Token)
{
    /** @var Quote $quote */
   // $quote = $this->getQuote($mpShareCartToken);

    $collection = $this->_sharechatFactory->create()->getCollection()->addFieldToFilter('share_token', $mpShareCartToken)->load();
    $token_generated_date=strtotime($collection->getFirstItem()->getCreatedAt()."+ 2 days");
    $emplist=json_decode($collection->getFirstItem()->getEmpId());

   $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $cart = $objectManager->get('\Magento\Checkout\Model\Cart');

    $allItems = $cart->getQuote()->getAllVisibleItems();
    foreach ($allItems as $item) {
        $itemId = $item->getItemId();
        $cart->removeItem($itemId)->save();
    }

    if($token_generated_date >= time()){
    $items = explode(',', $collection->getFirstItem()->getProductItems());

     foreach ($items as $item) {

                $params = array (
                    'qty' => 1
                );
                $product     = $this->productRepository->getById($item);

                    $this->cart->addProduct($product, $params);

                $item_final = $this->cart->getQuote()->getItemByProduct($product);

                    foreach($emplist as $key=>$value){
                        if($item==$key){
                            $item_final->setEmpId($value);
                        }
                    }

    }
    $this->cart->save();
    $this->cart->getQuote()->setShareToken($mpShareCartToken)->save();
    $this->cart->getQuote()->setSplInstuctions($collection->getFirstItem()->getSplInstuctions())->save();

    return $this->cartRepository->get($this->cart->getQuote()->getId());

    } else {
        $message='Can not add product to cart Your Link Expired';
        return $message;
    }

}

Here is my code. I am first removing cart items and adding new cart items again. But it works sometimes and some times it showing like "We don't have as many "Myhhh" as you requested."


texts:
i want to refresh check out summary based on shipping state and country selection.

We have two different charges both depend on the selection. i used extensions_attribute. how can I do that?


texts:
I use Payments Standard as a payment Method in Magento.

I checkout page I have add a custom discount to my cart and it will work perfectly at cart page.  see the below Image.

When you move to the checkout page then I also got the discount.

When I place order and It will redirect to the paypal then I did not get Discount. please see the below Image.

Please Help me to solve out this issue.

If any body got same issue then help me.

Thanks in advance


texts: My import for products images doesn't show the one from server, but old ones - Magento 2

texts:
I made an import with new images and now the images that are located in public/pub/media/import are the correct ones, so the import was succesfull. But in site are displayed the old ones. I applied the command for reindex, also cleared the cache and flush from terminal.
I also flush catalog images cache from backend on System -> Cache Management -> Additional Cache Management but still not working and shows the old images.

What should I do to see the images that are uploaded in import folder, and not the old ones, that don't exist anymore, maybe cached somewhere.


texts: coupon code at level checkout in Magento 1

texts: kindly note i need to display a coupon code worth 10% for selection of products to all clients once they checkout any product from my store; i.e. I made a transaction for a washer worth 500$, i need to show this user a promo code near the product description, you will benefit a 10% discount on all dryers lets say with a promo code or coupon code.


texts: Magento 2 Insert Data into custom table using Collection Factory

texts:
I am following tutorials at http://alanstorm.com/magento_2_crud_models_for_database_access/ for creating my extension but theres one key part of that tutorial that appears to be out of date.

This Part :

$todo = $this->toDoFactory->create();
$todo->setData('item_text','Finish my Magento article')
->save();

SetData and Save no longer work this way.

So how can I use a Collection Factory to create a new item in my table?


texts:
I am Created one custom module but Edit Action Can not work ?

Here is my Controller

public function editAction()
    {
        echo "Harshil";
       $manageoutofstockId     = $this->getRequest()->getParam('id');
        var_dump ($manageoutofstockId);
        $manageoutofstockModel  = Mage::getModel('manageoutofstock/manageoutofstock')->load($manageoutofstockId);
        var_dump ($manageoutofstockId);
        if ($manageoutofstockModel->getId() || $manageoutofstockId == 0) {

            Mage::register('manageoutofstock_data', $manageoutofstockModel);

            $this->loadLayout();
            $this->_setActiveMenu('manageoutofstock/items');

            $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
            $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));

            $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);

            $this->_addContent($this->getLayout()->createBlock('manageoutofstock/adminhtml_manageoutofstock_edit'))
                 ->_addLeft($this->getLayout()->createBlock('manageoutofstock/adminhtml_manageoutofstock_edit_tabs'));

            $this->renderLayout();
        } else {
            Mage::getSingleton('adminhtml/session')->addError(Mage::helper('manageoutofstock')->__('Item does not exist'));
            $this->_redirect('*/*/');
        }
    }

And here is my Form.php

<?php
class Vrinsoft_Manageoutofstock_Block_Adminhtml_Manageoutofstock_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
{
protected function _prepareForm()
{

    $form = new Varien_Data_Form();
    $this->setForm($form);
$fieldset = $form->addFieldset('manageoutofstock_form', array('legend'=>Mage::helper('manageoutofstock')->__('Item information')));

    $fieldset->addField('product_id', 'text', array(
        'label' => Mage::helper('manageoutofstock')->__('Product Id'),
        'class' => 'required-entry',
        'required' => true,
        'name' => 'product_id',
    ));

    $fieldset->addField('email', 'text', array(
        'name' => 'email',
        'label' => Mage::helper('manageoutofstock')->__('Email ID'),
        'title' => Mage::helper('manageoutofstock')->__('Email ID'),
        //'style' => 'width:98%; height:400px;',
        'wysiwyg' => false,
        'required' => true,
    ));

    $fieldset->addField('status', 'select', array(
        'label' => Mage::helper('manageoutofstock')->__('Status'),
        'name' => 'status',
        'values' => array(
            array(
            'value' => 1,
            'label' => Mage::helper('manageoutofstock')->__('Active'),
            ),
            array(
            'value' => 0,
            'label' => Mage::helper('manageoutofstock')->__('Inactive'),
            ),
        ),
    ));

 if ( Mage::getSingleton('adminhtml/session')->getManageoutofstockData() )
{
$form->setValues(Mage::getSingleton('adminhtml/session')->getManageoutofstockData());
Mage::getSingleton('adminhtml/session')->setManageoutofstockData(null);
} elseif ( Mage::registry('manageoutofstock_data') ) {
$form->setValues(Mage::registry('manageoutofstock_data')->getData());
}
return parent::_prepareForm();
}
}

Can any one help me ? Any kind of help will appreciate.


texts: Is there any way to modify tracking.phtml?

texts:
When we choose one of the option below, the field 'title' automatically filled with selected value from carrier options.

I want to do the same for 'number' field, it would be filled with something when I choose my custom carrier. Is there any way to modify this tracking form? If yes, how?

Thank's in advance


texts:
I have extended Mage_Checkout_Model_Type_Onepage class via my custom module and overriding saveOrder() method. All this code is written inside saveOrder() method.

I am trying to get every item from the current quote object and save it to a new array.

Here is the code:

    $quote = $this->getQuote();

    //following line printing the quote id
    Mage::log("Quote id is : " . $quote->getId() , null, 'mylog.log');

    $myArray = array();

    foreach ($quote->getAllItems() as $item)
    {
        $myArray[] = $item;
    }

    //====following lines doesn't log anything=========
    Mage::log($myArray,null,'mylog.log',true);
    Mage::log(print_r($myArray,1),null,'mylog.log');

    foreach ($myArray as $currItem)
    {
        // Empty current quote
        foreach ($quote->getAllItems() as $item)
        {
            $quote->getItemsCollection()->removeItemByKey($item->getId());
        }

        //inserting item to quote from myArray
        $quote->addItem($currItem);
    }

But I think quote item is not inserting into $myArray and that is why $quote->addItem method is also not working here.


texts: Magento 2: Need to show the custom attribute in the customer address grid

texts:
I have created the custom customer address attribute (set the input type as a dropdown) and tried to show it on the customer address grid but its not working as expected.
I think we need to do some additional thing in order to show the attribute which is set as a dropdown type. Below is my code which is not working
    <column name="attribute_code">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="sortable" xsi:type="boolean">true</item>
                        <item name="label" xsi:type="string" translate="true">Attribute Label</item>
                        <item name="sortOrder" xsi:type="number">95</item>
                    </item>
                </argument>
   </column>

I have referred multiple forums but couldn't get the working solution for this issue.
Please guide.


texts: How can I override controller with module in Magento 2?

texts:
I want to override this file vendor/magento/module-sales/Controller/Adminhtml/Shipment/AbstractShipment/View.php

So I can change line 49 from setModule('adminhtml') to setModule('adminhtml')

Any help is very appreciated

I've tried creating app/code/MyCompany/ModuleName/Controller/Adminhtml/Shipment/AbstractShipment/View.php with this in the file:

namespace
MyCompany\MyModule\Controller\Adminhtml\Shipment\AbstractShipment;

class View extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShipment\View {

public function execute()
{
        /** @var \Magento\Backend\Model\View\Result\Forward $resultForward */
        $resultForward = $this->resultForwardFactory->create();
        if ($this->getRequest()->getParam('shipment_id')) {
            $resultForward->setController('order_shipment')
                ->setModule('adminhtml')
                ->setParams(['come_from' => 'shipment'])
                ->forward('view');
            return $resultForward;
        } else {
            return $resultForward->forward('noroute');
        }
    }
}

module.xml:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="MyCompany_MyModule" setup_version="0.0.1"/>
</config>

di.xml:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Sales\Controller\Adminhtml\Shipment\AbstractShipment\View" type="MyCompany\MyModule\Controller\Adminhtml\Shipment\AbstractShipment\View"/>
</config>


texts: Magento 2:How to enable google customer review survey email from google merchant center

texts:
I am implementing the google customer review on success page. It's working fine.

But survey email  confirmation is not sending to customer after complete the order.

Any suggestions?


texts: Create Custom Product Details Page for specific category in Magento 2.3?

texts:
I want to create custom product details page for specific category ? how to i'll do this or 'll override catalog_product_view.xml ?
Please share any help.
Thanks


texts: Product Page without www redirect to home instead of itself

texts:
If I type mysite.com/myproduct-name or mysite.it/myproduct-name without www it brings me to the respective homepage (I have 2 domains: www.mysite.com and www.mysite.it).

.htaccess part:

RewriteCond %{HTTP_HOST} !^mysite.it$ [NC]
RewriteRule ^(.*)$ http://www.mysite.it/ [R=301,L]

# RewriteCond %{HTTP_HOST} !^mysite.com$ [NC]
# RewriteRule ^(.*)$ http://www.mysite.com/ [R=301,L]

SetEnvIf Host www\.mysite\.com MAGE_RUN_CODE=en
SetEnvIf Host ^mysite\.com MAGE_RUN_CODE=en
SetEnvIf Host www\.mysite\.it MAGE_RUN_CODE=it
SetEnvIf Host ^mysite\.it MAGE_RUN_CODE=it

In this situation redirect of product is resolved but I can access only to www.mysite.it
If I uncomment row 3 and 4 I'm not able to access both domains anymore.
If I remove ! from both conditions I can access to both domains but redirect to www product page doesn't work anymore

How can set it so that redirect me to the www version of the content (e.g. www.mysite.com/myproduct-name)?


texts: Does updating URL keys for products keep the original URL in rewrites?

texts:
I would like to update all my product URL keys because they are an absolute mess (and hoping to boost SEO).

Found a solution to recreate the URL keys  as Manufacturer / Product Name / SKU Here

My question is: When recreating URL keys for products, do the old URL's stay in URL Rewrites?

My concern is that if the URL's are not preserved, that search engines would no longer be finding the products page and thus remove them from index (and having to wait until they are re-crawled)


texts:
I want to turn the SQL below into a Zend Db query.

Select * from catalog_product_entity where entity_id not in ( select Distinct(product_id) from sales_flat_order_item)

Can anyone help me with this, I am currently new to magento and it still confuse me.
Any help is appreciated.


texts:
I'm quite new in programming and especially in magento2.

For me to find information I need, it takes a lot of time, mostly enormous amount of time. Very often I can't even find what I am looking for.

Maybe someone could give me some tips and advice?


texts: How to add Bcc and Cc to mail that sent by 'core/email_template' model send()

texts:
I am sending mail by following code,

$template = Mage::getModel('core/email_template')->loadDefault('customer_email');
$template->addSenderName("MyName");
$template->addSenderEMail("myname@gmail.com");
$template->send("tomail@some.com","toname",$data);

Can i add Bcc and Cc to this $template.if yes or no how it can be?