texts: How can I add a information for a view and apply it to all the similar views

texts:
My Magento is divided in multiple stores. One for each country that we sell too. And in views that are the different languages.

Here is a screenshot of my setup:

My question is: can I change something for all the English views at the same time without needing to repeat the process over and over again?

Also when I create a category in "All Store Views" in the section "Categories", why is it not applying it to all the other views?

UPDATE

Here is an example:

I have a category named: Business

I want to use Affaires as the French name for my category.

The problem is that I have to change it for each country that as a French view.

Isn't there a way to automate this?


texts: How to learn Magento (1.9) Layout, Block, Template from the beginning the right way?

texts: Alan Storm's tutorial and official Magento (I am interested in v1.9, not v2.0) tutorials on this look very difficult and obscure to me. Considering I have actually learned and went through Symfony, Moodle, Wordpress tutorials without any problems (I am an experienced programmer), I am probably learning Magento the wrong way, because it's terribly difficult to digest. What is some of the advice on how to learn Layouts and Blocks of Magento, the right way?


texts: Magento2 How To Export Product Custom Attribute With Value

texts:
I have export product from backend and getting custom product attribute but it shows empty data in csv file.
does anyone know how i can export custom attribute with value?


texts: Insert multiple records to multiple custom tables through install script in magento2

texts:
I have created multiple table schema using setup script like below.

Setup/InstallSchema.php

   namespace Vendor\Module\Setup;
   use Magento\Framework\Setup\InstallSchemaInterface;
   use Magento\Framework\Setup\ModuleContextInterface;
   use Magento\Framework\Setup\SchemaSetupInterface;

 class InstallSchema implements InstallSchemaInterface
{

  public function install(SchemaSetupInterface $setup,
   ModuleContextInterface $context)
  {
    /**
     * Create table 'tbl_test1'
     */
    $table = $setup->getConnection()
        ->newTable($setup->getTable('tbl_test1'))
        ->addColumn(
            'id',
            \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
            null,
            ['identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true],
            'Pod ID'
        )
        ->addColumn(
            'name',
            \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
            255,
            ['nullable' => false, 'default' => ''],
            'name'
        );
    $setup->getConnection()->createTable($table);

   /**
     * Create table 'tbl_test_2'
     */
    $table = $setup->getConnection()
        ->newTable($setup->getTable('tbl_test_2'))
        ->addColumn(
            'id',
            \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
            null,
            ['identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true],
            ''
        )
        ->addColumn(
            'mage_order_id',
            \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
            255,
            ['nullable' => false, 'default' => ''],
            'magento orderid'
        );
    $setup->getConnection()->createTable($table);

I need to insert multiple records for each table.

How this can be achieved using installer. Can anyone look into this and update me your answer please.


texts: I have add item option dropdown in my sales order edit now i want to save this value on my product option where i can make changes


texts: Magento 2.3 show Block only when customer not logged in

texts:
I need to show a Block on my product detail page when the customer is not logged in only.
What is the best way to achieve that in Magento 2.3?
Thanks in advance!


texts: Can Magento show quantity price breaks as per example link

texts:
The below link shows a category of General, then on the page shows the sub categories highlighted in red.
I am especially interested in being able to show Quantity price breaks against each pruoduct.
http://www.aaapackaging.com.au/packaging-tape-c-3_17.html

I am brand new to Magento.


texts: Magento 2: Pass variable from phtml to js

texts:
here is my layout

    <referenceContainer name="minicart.addons">
  <block class="Vendor\Mymodule\Block\Cart\Sidebar" name="shipping_bar" template="Vendor_Mymodule::cart/minicart.phtml">
   <arguments>
     <argument name="jsLayout" xsi:type="array">
       <item name="components" xsi:type="array">
         <item name="minicart-addons" xsi:type="array">
           <item name="component" xsi:type="string">Vendor_Mymodule/js/view/minicartaddons</item>
           <item name="config" xsi:type="array"></item>
         </item>
       </item>
     </argument>
   </arguments>
 </block>

here is variable in phtml file

<script>
  maxpriceShipping = <?= /* @escapeNotVerified */ $maxpriceShipping ?>;
</script>

here is js file

define([
       'ko',
       'uiComponent',
       'Magento_Customer/js/customer-data',
   ], function (ko, Component, customerData) {
       'use strict';
       var subtotalAmount;
       var maxPrice = maxpriceShipping;
       var percentage;
       return Component.extend({
           displaySubtotal: ko.observable(true),
           maxprice:maxPrice.toFixed(2),
           /**
            * @override
            */
           initialize: function () {
               this._super();
               this.cart = customerData.get('cart');
           },
           getTotalCartItems: function () {
               return customerData.get('cart')().summary_count;
           },
           getpercentage: function () {
               subtotalAmount = customerData.get('cart')().subtotalAmount;
               if (subtotalAmount > maxPrice) {
                   subtotalAmount = maxPrice;
               }
               percentage = ((subtotalAmount * 100) / maxPrice);
               return percentage;
           }
       });
   });

How can I pass variable maxpriceShipping in phtml to js file without using a "script" tag. but can use "script type="text/x-magento-init""


texts: Magento DHL This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us

texts:
I am using DHL shipping methods in Magento. I have all the credentials Correct in Admin. After That Showing error in checkout "This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us."

and in DHL log not showing error but showing this DEBUG message:

2016-07-29T04:56:50+00:00 DEBUG (7): Array
(
    [0] => Zero shipping charge for 'Domestic express'
    [1] => Zero shipping charge for 'Express easy'
    [__pid] => 17282
)

What Should I do. Please suggest me.


texts: How to load database table records into the Magento CMS page

texts:
We have created a form using Magento CMS page. As you know, Form has many fields like Name, Email, etc. In our form, we have an input field called School.
We have a list of schools in the database.

Now, we want to load the school database records into the Form(CMS page). How can I do that?

Could anyone please help me throughout this?

Thanks in advance. Hope I will get a solution for this.


texts: Magento 2: How to Override the whole Admin Dashboard

texts:
is there any way, that i can override the whole admin dashboard to customise and limit some features to display.

Please suggest any solution.


texts: Show customer Data (Address, Name, etc) in Frontend/Template

texts:
How can I show the customer information from a Shop-User (logged in) at my frontend template. I have some Form-PHTML-files and a customer can fill out the form etc.

I want to show "his" user data (Name, Forname, Street, City, ..) at the top of the form-template.

Who can help me?


texts: Magento 2 common css variables not applied for third party modules

texts:
I am using a custom theme, declared common variables under,
app\design\frontend\Zero\my_theme\web\css\source\components
1) _variables.less
Eg:
@h1__font-size: 48px !important;

2) common.less
Eg:
h1 {
    font-size:@h1__font-size !important;
}

I am using magefan extension, if i use @h1__font-size in blog pages, its not working its returns @h1__font-size variable is undefined, how to solve this error.


texts: Magento 2.1.2 search products by ids in CatalogSearch

texts:
I am getting product ids from external product search system. I need them to be the result of search done through CatalogSearch.

I thought of adding a filter to searchCriteria in _renderFiltersBefore() function located in

app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php

like

$this->filterBuilder->setField('entity_id');
$this->filterBuilder->setValue([1,2,24]); // <-- product ids
$this->searchCriteriaBuilder->addFilter($this->filterBuilder->create());

but it doesn't seem there's a filter that could select products by ids.

I have also found addIdFilter($productId, $exclude = false) function in
app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php
but can't find a way to make use of it in CatalogSearch.


texts: Magento 1.4.2 migrate customer data to new website

texts:
We would like to migrate our customer accounts from one website to another (new domain and company). edit: It isn't a new domain/company, but a different domain/company name.

We basically would like to migrate all the customer accounts and orders/invoices from the first website to the second.

Both websites run on 1.4.2.

What's the easiest way of getting this done without creating any duplicate entries?

Would it be easiest via phpMyAdmin/editing the SQL file directly, or is there an easier process via the backend?


texts: How can i chang telephone field input type validation on check out onepage

texts:
How can I change  telephone field input type validation on check out onepage ?

Currently it takes input numeric with no space. I want to change it space with numbers

As an example,

current input format is: 1234567899999

But when i try this input format: 123 45468 99999

it is not working. What should I do to format this number?


texts:
So I’ve just migrated a magento store over to a new server.

Gone through the standard setup procedure of copying the html files, updating the host url in the database and modifying my db details in app/etc/env.php.

I’ve also disabled the dev static signing option to prevent the issue where magento looks for assets in pub/static/versionxxxx..

The issue I’m having now is that my index.php loads fine and all looks how it should.

However clicking any link, for example a href to /scarves.php gives me a 404. Not quite sure why as obviously all of my pub and php files are not in the index folder.

How can I go about fixing this, does magento rewrite these links internally somehow?


texts: Magento configurable attribute with scope Global

texts:
We are using configurable attributes that have the scope Global. Is it correct that he then shows the Admin label in the cart for the item options?

Update: It does work on the product page, the correct label shows but in the cart it always shows the admin label


texts: Magento 2.3 - GIF Images , Animation is not working on frontend 2

texts: Magneto 2.3 GIF image is working in admin panel ,but not working in fronted ,how to solve this?


texts: How do I add a custom message block at the beginning of the maincontent div in product list/ detail page

texts: How do I add a custom message block "Lorem Ipsum dolor sit amet" at the beginning of the "maincontent" div that appear below the breadcrumbs in product list/ detail page.


texts: Magento2.2.2 Order email confirmation after switched back on sends old order confirmation email

texts:
Order email Communications has been switched Off for long period of time as the emails was being sent outside of magento.
However I notice while testing that if switched back On Old order emails stated sending I think this is due the cron job.
My question what should one do to stop it when switched back On?
Should I clear cron_schedule table; maybe update sales_order field: email_sent, send_email
I can see this fields is sales_order have the following values:
email_sent: NULL
send_email: 1
Set send_email to 0 will it stop cron job to trigger email for this orders ?
Any suggestions ?
Thank


texts: Transactional Email: How to customize shipping address variable/html {{var order.getShippingAddress().format('html')}}

texts:
I am customizing Magento's transactional emails and am trying to remove the Telephone/Fax from displaying in the email as they are displaying as:

  T:-
  F:-

The transactional mail template for new orders in the CMS is calling:

{{var order.getShippingAddress().format('html')}}

Which is defined in the top of the (cms based) email template as:

"var order.getShippingAddress().format('html')":"Shipping Address"

I don't quite understand what the purpose of this 'variable' definition is, but I also see no reference to this in the sales.xml file.

Does anyone know how to adjust this html? Is there a clear methodology for finding where things are defined/pulled from in Magento? I am clearly confused coming from working primarily with Wordpress theming.

--

Apologies for the endless string of transactional email questions. Hopefully this will help build the beta stack exchange as a valuable resource :)


texts: Issue in product image color in magento 2.2X?

texts:
I have two swatches i.e., red and black

And when a user clicks red colour it changes the colour of the image

But in cart the image is base image only.

So the issue is, Selected options image isn't updating there

Kindly help us to get over this.


texts: Paypal payments pro-Your payment has been declined. Please try again

texts:
I am using paypal payments pro. configure paypal pro using sandbox mode .when we fill all credit card details on front end and tr to place order but order does not placed display below error message.
Please Help me how to solve this issue?


texts: Where does the whole email template in magento 2 being stored?

texts: I would like to ask if where is the email templates in magento 2 being stored. The email templates are being saved inside magento admin so I am sure that it is being stored somewhere. Either in the database o anywhere. Does somebody know how to fetch that template in magento back-end without the use of custom phtml template. Thanks!


texts:
I try to made some changes in Magento blank theme, after the modifications was done I use this command:

 rm -rf pub/static var/cache var/composer_home var/generation var/page_cache var/view_preprocessed

and then I use this:

php bin/magento s:s:d -f
php bin/magento cache:flush

Now in frontend and in backend too I have errors like this:

"NetworkError: 404 Not Found - http://exapmple.com/pub/static/version1508058582/frontend/Magento/blank/en_GB/css/custom-style.css"

"NetworkError: 404 Not Found - http://exapmple.com/pub/static/version1508058582/frontend/Magento/blank/en_GB/css/styles-l.css"

"NetworkError: 404 Not Found - http://exapmple.com/pub/static/version1508058582/frontend/Magento/blank/en_GB/css/print.css"

"NetworkError: 404 Not Found - http://exapmple.com/pub/static/version1508058582/frontend/Magento/blank/en_GB/css/styles-m.css"

"NetworkError: 404 Not Found - http://exapmple.com/pub/static/version1508058582/frontend/Magento/blank/en_GB/requirejs/require.js"

"NetworkError: 404 Not Found - http://exapmple.com/pub/static/version1508058582/frontend/Magento/blank/en_GB/mage/requirejs/mixins.js"

"NetworkError: 404 Not Found - http://exapmple.com/pub/static/version1508058582/frontend/Magento/blank/en_GB/mage/calendar.css"

"NetworkError: 404 Not Found - http://exapmple.com/pub/static/version1508058582/frontend/Magento/blank/en_GB/requirejs-config.js"

What was wrong or what I need to do? and much more than this from where or what is version1508058582

thank you


texts: How to display content after product name in Magento Admin

texts:
I want to add additional data after order item name in order view page.

I have added below code in config.xml file but it is replace then name. I want to append content not replace.

<adminhtml_sales_order_view>
    <reference name="order_items">
        <action method="addColumnRender">
            <column>name</column>
            <block>adminhtml/sales_items_column_name</block>
            <template>productcustomizer/sales/order/view/additional.phtml</template>
        </action>
    </reference>
</adminhtml_sales_order_view>

It is displaying like below

I want to like below

I have tried below code in config.xml but it is not working.

<adminhtml_sales_order_view>
    <reference name="order_items">
        <block after="content" type="adminhtml/sales_items_column_name" name="additional.product.info" template="productcustomizer/sales/order/view/additional.phtml" />
    </reference>
</adminhtml_sales_order_view>


texts: Layered Navigation in the CMS Wrong Filters

texts:
I tried this method here: https://stackoverflow.com/questions/21241181/cms-page-with-layered-navigation-not-working and successfully added the product listing and layered navigation in the CMS. However, the layered navigation seems wrong (ie., product counts are not correct).

<reference name="left">
            <!-- Layered Navigation Block -->
            <block type="catalog/layer_view" name="catalog.leftnav" template="catalog/layer/view.phtml">
                <action method="setCategoryId"><category_id>1302</category_id></action>
                <action method="unsetChild"><alias>category_filter</alias></action>
            </block>
        </reference>

        <reference name="content">
            <block type="catalog/product_list" name="product_listing" template="acidgreen/b2b/catalog/product/list.phtml">
                <!-- Product List View -->
                <action method="setCategoryId"><category_id>1302</category_id></action>
                <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                    <block type="page/html_pager" name="product_list_toolbar_pager"/>
                </block>
                <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
            </block>
        </reference>


texts: “Bad Credentials” - Unable to sign in to Magento Marketplace via admin UI

texts:
I'm using Magento version 2.3.3 CE and until yesterday my account was linked with the marketplace.
Yesterday however when I entered the web setup it was asking again for my credentials and when inserting them it gave me "Bad credentials".

I verified (several times) that it has no spaces before or after the keys;
I tried to generate and insert new keys
I even tried to make a new Magento Marketplace account andI still get "bad credentials"
Suggestions on how to fix the problem please?


texts: Transactional Email: How to customize shipping address variable/html {{var order.getShippingDescription()}}

texts:
How to customize this function order.getShippingDescription(), where is this function is written in Magento.

Can someone please help in it


texts: Mininum order amount for existing customers only

texts:
Magento allows to set minimum order amount. See system > configuration > sales >
Minimum Order Amount

I want to set this option for Rs 200 for existing customers (with at least one completed order)  and skip it for new customers.

New customer is a customer with billing email is not associated to any completed order.


texts: Magento 2.2.2 Change color of Add to Button

texts:
I want to change Color of Add to Cart Button but i don't know how to do that.

Any help you will be appreciated.

Thanks.


texts: Magento 1.8 Order mail product image not appear

texts:
Am using Magento 1.8 here i want to send product image in order email.
I refer this link Add product image in new order email.

this is the code:

app/design/frontend/base/default/template/email/order/items/order/default.phtml

default.phtml

<?php

if ($_item->getProductType() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {
    $parentId = Mage::getModel('catalog/product_type_configurable')
                       ->getParentIdsByChild($_item->getProductId());
    $_product = Mage::getModel('catalog/product')
                       ->setStoreId($_item->getOrder()->getStoreId())
                       ->load($parentId);
} else {
    $_product = Mage::getModel('catalog/product')
                       ->setStoreId($_item->getOrder()->getStoreId())
                       ->load($_item->getProductId());
}

?>

And here am showing image

      <img src="<?php echo Mage::getModel('catalog/product_media_config')->getMediaUrl($_product->getThumbnail()); ?>" width="135" height="135" alt="<?php echo $_item->getName() ?>" />

But i got mail like this

  Its not working for simple, configurable and bundle product also

How can i fix this error?

  Note: This question already asked but am not get the correct answer.


texts: Change the load order from addtocart block with the addto block

texts:
I getting crazy with the template system from Magento.

I tried to change the load-order of my "Add to Cart" and "Add To" block for customize article. So that the "Add To" block gets loaded before the "Add to Cart" block.
In my template I saw that the blocks are loaded from container1.
Cataloge.xml showed me, that container1 is linked to product.info.options.wrapper.bottom . This file contains:

<?php echo $this->getChildHtml('', true, true);?>

In my local.xml I edited:

<ajaxcart_index_options>
<reference name="content">
 <block type="catalog/product_view" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="catalog/product/view/options/wrapper/bottom.phtml" translate="label">
            Bottom Block Options Wrapper
            <action method="insert"><block>product.tierprices</block></action>
            <block type="catalog/product_view" name="product.clone_prices" as="prices" template="catalog/product/view/price_clone.phtml"/>
                <action method="append" before="addtocart"><block>product.info.addto</block></action>
                <action method="append" after="product.info.addto"><block>product.info.addtocart</block></action>
            </block>
</block>
</reference>
</ajaxcart_index_options>

I have no idea what I could do else, I tried after and before statements and I also placed the addto action block before the addtocart block, but nothing works.

Does anyone has an idea how I can change the load-order?

Thanks,
Simon


texts: Magento2: I want to show featured product on top of the category and search result

texts:
I have yes/no type product attribute.

If this featured attribute is yes for any products, those product will show top(first featured product showing in category page then rest of the products are showing) in the category page including search result as well.

What is the best way to achieve this so it will work perfectly if catalog flat is Enabled.

Please let me know if more information require on this.

Update:
I am trying one solution but getting below error:

2 exception(s):
Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'featured' in 'order clause', query was: SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, IFNULL(review_summary.reviews_count, 0) AS `reviews_count`, IFNULL(review_summary.rating_summary, 0) AS `rating_summary`, `stock_status_index`.`stock_status` AS `is_salable` FROM `catalog_product_entity` AS `e`
 INNER JOIN `catalog_category_product_index_store7` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=7 AND cat_index.visibility IN(2, 4) AND cat_index.category_id=458
 INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0
 LEFT JOIN `review_entity_summary` AS `review_summary` ON e.entity_id = review_summary.entity_pk_value AND review_summary.store_id = 7 AND review_summary.entity_type = (SELECT `review_entity`.`entity_id` FROM `review_entity` WHERE (entity_code = 'product'))
 INNER JOIN `cataloginventory_stock_status` AS `stock_status_index` ON e.entity_id = stock_status_index.product_id
 INNER JOIN `search_tmp_5e3e93d21adef5_51912155` AS `featured` ON e.entity_id = featured.entity_id ORDER BY `cat_index`.`position` asc, `cat_index`.`position` asc, `featured` DESC, `e`.`entity_id` DESC
 LIMIT 12
Exception #1 (PDOException): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'featured' in 'order clause'


texts: Conflict with Dotdigitalgroup and Magento\Email\Model\Template\SenderResolver / Magento2

texts:
So we installed a fresh M2.3.5
and are seeing a conflict between these 2:
Magento\Email\Model\Template\SenderResolver
Dotdigitalgroup\Email\Model\Email\DotdigitalSenderResolver

Now we have never installed anything from Dotdigitalgroup.
Question: what is the fastest way of finding out to what extension or source the code from Dotdigitalgroup comes from?


texts: Can I edit any phtml file and not clear the cache?

texts: Whenever I want to edit some phtml file, then I have to clear the cache. Is there anything to clear the cache or clean specific cache?


texts: Adding GET parameters to a CMS page results in 404 error

texts:
I have a CMS page with the URL key of "foobar" (so www.domain.com/foobar) and it works fine.

As soon as I add a ?value=123 on the end I see a 404 error. I have other CMS pages that work fine to take parameters using GET.


texts: Is there any way to change locale along with currency for admin in Magento2

texts: I want to update the currency and the rates for admin based on the user for which locale is set. For eg., if the locale is French, the currency should be French, but if the user is logged in from US locale it should be USD. The areas which I am referring to are, Dashboard, Orders grid/view, Products grid view.


texts: Magento Security Scan reports Malicious Javascript without files

texts:
I am having a Magento 1.9.3 installation which is set up for the Magento Security Scan.

For a while now I am getting a "Issues found" report, stating that there is malicious Javascript on my website.

Your site is compromised with injected JavaScript. (62)
The malicious code signature(s) has been found on the page.

However, as you can see, there are no urls or files stated in this report.

I have already tried contacting via security@magento.com but I never received an answer.

I ran the site via magereport and didnt get any warning, also I downloaded all files and ran Norton Antivirus and didnt get a result either.

Also, I tried using the magento yara python malware scanner and (provided I have used it correctly) didnt get any results either.

I am having javascript on the website which is not from magento but self coded, could that be the issue?

Or do you have any other idea what I can do to check whats going on here?


texts: Magento 2.3.4 Add custom product attribute value (text-swatch) via REST API

texts:
Using Postman, with the following GET request I receive data from my custom product attribute:
rest/V1/products/attributes?&searchCriteria[filterGroups][0][filters][0][field]=attribute_id&searchCriteria[filterGroups][0][filters][0][value]=580

The response looks like this:

"options": [
                {
                    "label": " ",
                    "value": ""
                },
                {
                    "label": "Label 1",
                    "value": "16594"
                },
                {
                    "label": "Label 2",
                    "value": "16597"
                },

Now I need to add a new attribute value including a label and the description.

Here it says it would be possible (now): https://devdocs.magento.com/guides/v2.3/release-notes/release-notes-2-3-4-open-source.html

Can anyone help how the body of my POST request should look like? Thanks!


texts: Magento 2: How to get full Currency Switcher

texts:
I want to get the full URL to switch currency to use it as a link, Currency switcher use the widget to change the currency, I don't want to use the widget. For Example:

This is how works now:

Currency

I want something like this:

Currency

Thanks!

NOTE: I'm overriding the directoy module, I already override the template, but can't get the full url


texts: How to use product name variable in product description - Magento 2.3.5

texts: I would like to create one product description that I can copy and paste into multiple products. Is there a way to pull the product name and other product attributes with a custom variable into the description?


texts:
How to add logo in invoice and how to do formatting of Invoice if i want to add come text in invoice last how to add....?

I have to remove 'Your Invoice #100000047 Dt. for Order #100000185 Dt. (e.g:  18/08/2014)' Dt from invoice.
I have to add text at the last of invoice like Warranty?
Add amount in words..?

How can i do these changes in invoice sent on email...


texts: I want to ask, which tables can I safely truncate in Magento, (I want to truncate all tables generated by the indexation process to make a new reindex of all my data)


texts: How to apply custom carts rules to quote in magento?

texts:
we are creating a module in which we are creating custom rules to apply on cart. Rules creation working fine. But, don't know how to apply that rules to cart/quote.

Please share your views, I m stuck in this from last 3days.


texts:
bin/magento setup:upgrade
Cache cleared successfully
File system cleanup:
public_html/var/generation/Composer
public_html/var/generation/Magento
public_html/var/generation/Symfony
The directory 'public_html/var/di/' doesn't exist - skipping cleanup
Updating modules:

  [Magento\Setup\Exception]
  Can't run this operation: configuration for DB connection is absent.

setup:upgrade [--keep-generated] [--magento-init-params="..."]

I'm using Centos 6 64 bit server, Magento version 2.1.0, I thought this error was like the previous error so I asked my hosting provider to solve it by referring to that answer. They rerun the command and its output was:

We saved default values for these options: db-engine, db-model, db-init-statements.

And the issue wasn't solved. I am trying to install nosto-magento2 using composer


texts: How to get collection of pagination in template?

texts:
These are my block methods:

    public function getProductsViewHistory() {
        $page=($this->getRequest()->getParam('p'))? $this->getRequest()->getParam('p') : 1;
        $pageSize=($this->getRequest()->getParam('limit'))? $this->getRequest()->getParam('limit') : 1;
        $fromDate = date('Y-m-d H:i:s', strtotime("-6 month"));
        $product = $this->customerProductViewHistory->create();
        $product->addFieldToFilter('subject_id',array('eq'=> $this->getLoggedInUserId() ))
        ->addFieldToFilter('logged_at',array('from'=> $fromDate ))
        ->addFieldToSelect('object_id')
        ->getSelect()->group('object_id');
        $product->setPageSize( self::PRODUCTS_PER_PAGE );
        $product->setCurPage($page);
        return $product;
    }
    protected function _prepareLayout()
    {
        parent::_prepareLayout();
        // $this->pageConfig->getTitle()->set(__('News'));
        if ($this->getProductsViewHistory()) {
            $pager = $this->getLayout()->createBlock(
                'Magento\Theme\Block\Html\Pager',
                'history.pager'
            )->setAvailableLimit(array( self::PRODUCTS_PER_PAGE=>self::PRODUCTS_PER_PAGE))
->setShowPerPage(true)->setCollection( $this->getProductsViewHistory() );
                $this->setChild('pager', $pager);
                $this->getProductsViewHistory()->load();
            }
            return $this;
        }
   public function getPagerHtml()
     {
         return $this->getChildHtml('pager');
     }

And this is my template file.

<?php if ($block->getPagerHtml()): ?>

<?php echo $block->getPagerHtml(); ?>

<?php endif ?>

<?php
$collection = $this->getCollection();
 foreach ($collection as $key => $value) {
    var_dump($value->getData());
 }
?>

I get this error:

  Warning: Invalid argument supplied for foreach()

If I comment out the part to show collection, I'm successfully getting pagination as intended.
What am I missing?


texts: Magento 2.2.2 How to implement Backend (Customizable Options) logic in custom module

texts:
I am trying to implement customizable options like logic in my custom module. What I wanna do is to create an add option button, and upon clicking this button same gird will show. You can see in the below pic

I want to create same thing as in this image, but I will change fields in this grid according to my requirement.

I am not able to create this thing, I have tried finding it in core, but don't know how it is implemented in the core.


texts: Custom contact form on Product view - how to define Transactional E-mails template

texts:
I've created a new template file with a navigation menu and a contact form, which slides out with jquery when a link on the navigation is clicked, editing the form depending on which link is clicked.

This .phtml template file is loaded in the product view page, just below the add to cart form. It's basically an enquiry form for each product for a customer to send questions for this product.

As I need to display extra input fields (Product name, id & current url for example), I need to edit the e-mail template to support those extra vars.

1) Is there a way to define which Transaction E-mail Template is used for a specific form, or is this only possible with a custom module rather than a custom template phtml file?

The second issue is that I do not want to direct the customer to the contact page after submitting, but rather reload the product page with a notice that the message has been sent.

2) Is there a way to reload the product page with the notice msg after submitting the form, rather than being redirected to the contacts page?

---- EDIT1 ----

I've managed to do 2) by using the prototype ajax.update to submit via ajax - however it still needs to output the response from the contact form (the whole contact page with success message), which I just hide in a div with the id #noDisplay

My JS Script:

<script type="text/javascript">
//<![CDATA[
    var formId = 'customContactForm';
    var myForm = new VarienForm(formId, true);
    var postUrl = '<?php echo $this->getUrl("contacts/index/post") ?>';

    function doAjax() {
        if (myForm.validator.validate()) {
            new Ajax.Updater(
                { success:'noDisplay' },
                postUrl, {
                    method:'post',
                    asynchronous:true,
                    evalScripts:false,
                    onComplete:function(request, json) {
                        Element.hide('custom-contact');
                        Element.show('formSuccess');
                        Form.reset(formId);
                    },
                    onLoading:function(request, json){
                        Element.show('formLoader');
                    },
                    parameters: $(formId).serialize(true),
                }
            );
        }
    };

    function FadeEffect(element, effectduration, effectdelay){
       new Effect.Fade(element, { duration:effectduration, delay:effectdelay });
    }

    new Event.observe(formId, 'submit', function(e){
        e.stop();
        doAjax();
        FadeEffect('formSuccess', 2, 4);
    });

//]]>
</script>

Thanks in advance.


texts: Is there any other way to call data-mage-init?

texts:
On AJAX I want to display the Buy Now button. For that, I created one variable

 var buy_now_button = '<span title="<?php echo __('Buy Now') ?>" id="buy-now" class="action buynow primary" data-mage-init='{ "Test_Detail/js/buy-now": { "form": "#product_addtocart_form"  }}'><?php echo __('Buy Now') ?>';

Because of data-mage-init, the function is not working.


texts: Having an issue with my contact us page and submitting a request

texts: I keep getting these errors when submitting a request via my contact us page. Can anyone help? I have a webform extension.


texts: Magento2 Password Reset Query Not working

texts:
UPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxxNewPassword', 256), ':xxxxxxxx:1') WHERE username = 'admin';

this above query is not working


texts: Using multiple websites on single domain?

texts:
Is it possible to use 2 websites on single domain? If so, what are the consequences?

Here is my main problem: Changing product prices based on the current currency Please take a look.

I've red everything that I found on the net about this but couldn't find any solution. I tried to explain that this is not possible but the Client still wants this functionality...

So it seems the only solution is to create a second website with another base currency. I will not use different domains, product descriptions and images, themes, stores etc. The only thing which I will use are the different prices. I've never worked on multi-site environment so I'm not sure what's going on at all. Probably I have to change the website after selecting a currency from the currency selector.

But I'm still not sure what happens with the orders, customers etc. Are they different for each website? If so, this is not good at all. Also what happens if the customer have items in the basket and changes the website (from the currency selector)? Is the basket get lost for the other website? Is it possible to share sessions and so on between the websites (and not just stores)?

The multi-site tutorials which I found are for multi-domain environments so I'm not even sure whether it is possible to use multiple websites on single domain.

Is it worth managing 2 websites just for this price rounding? I tried telling the Client to skip this functionality but maybe I can't explain why it doesn't worth. I think that they are thinking like "it should be easy to do" and I can't explain why it is not. Any directions would be helpful.


texts: How do I change SHOP BY text in left sidebar Magento?

texts:
How to change the text SHOP BY from left sidebar at category page in Magento?

I want to change this text SHOP BY to another.


texts: Ajax calls are pending for logged in users

texts:
It's weird but it's happening like adding product to cart or updating mini cart is working fine if no user is logged in. But if user is logged in then adding product to cart, mini cart update, logout checkout page nothing is working. It's continue to load logout page. Mini cart Ajax call will be pending and never completes. Cart page continue to load. Logged user name Ajax call also pending.

It seems nothing is working where ever there is call for customer details. It's production environment and it was working fine till day before yesterday. No system or exception logs.

I have observed that ram usage is going to 99.9 % if I didn't stop any customer related request. It might be database issue or anything

Anyone have any idea on this.


texts: Magento admin : Fatal error: Call to a member function getUsername() on null

texts:
I made an upgrade from Magento 1.4.2 to 1.9.3.2 and everything worked fine.

My frontend and backend worked properly. I can log in into the admin panel without issues until a few hours later when I clicked on log out from the admin panel, I am not redirected to the admin login page and instead, I get the following error.

Fatal error: Call to a member function getUsername() on null in C:\MAMP\htdocs\magento\app\design\adminhtml\default\default\template\page\header.phtml on line 33

I cannot show the admin login page anymore and I cannot log in into the admin panel. The frontend works fine. My guess is that the admin session did not close properly, I tried to clean the var/cache + var/locks + var/session + cookies from my browser + try different browsers => did not work

I tried every solution suggested in this topic, but nothing worked :
Magento 1.9 Can’t login to admin panel!

For information, this is a local environment. All the third party modules are disabled and I removed all local devs. I also tried an upgrade from 1.4.2 to 1.7.0.2, the upgrade worked fine, frontend and backend are working and I get the exact same issue in the admin after a few hours (I was logged in the admin but could not log out / re-login).

I also have a local installation of Magento 1.4.2 and here everything works fine I can log in/ log out / re-login from the admin without any problem.

Do you know how I can solve this issue?


texts:
I'm trying to get address_id of sales_flat_quote_address table as mentioned in attached image from quote during multi-shipping checkout process but no luck. I want to use that address_id in following file path. Any help should be appreciated. Thanks.
File Path:-
 /app/code/local/Mage/Shipping/Model/Carrier/Flatrate.php


texts: Customer Attribute not showing in adminhtml customer account form in Magento Enterprise 2.2.0

texts:
I have created module "Wgac_Subscription". I want to create custom customer attribute. It is listed in admin as shown in below image, but does not show in customer adminhtml form.

Wgac/Subscription/Setup/InstallData.php

<?php
namespace Wgac\Subscription\Setup;

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

class InstallData implements InstallDataInterface
{
    private $eavSetupFactory;

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

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

    public function __construct(
        EavSetupFactory $eavSetupFactory,
        CustomerSetupFactory $customerSetupFactory,
        AttributeSetFactory $attributeSetFactory
    )
    {
        $this->eavSetupFactory = $eavSetupFactory;
        $this->customerSetupFactory = $customerSetupFactory;
        $this->attributeSetFactory = $attributeSetFactory;

    }

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
    /*
        **
        * Create  Customer Attribute "customer_chargify_id"
        ** ==== START ====
        */

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

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

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

        $customerSetup->addAttribute(Customer::ENTITY, 'customer_chargify_id', [
            'type' => 'varchar',
            'label' => 'Customer Chargify Id',
            'input' => 'text',
            'required' => false,
            'visible' => true,
            "unique"  => true,
            'user_defined' => true,
            'position' =>999,
            'system' => 0,
        ]);

        $attribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'customer_chargify_id')
        ->addData([
            'attribute_set_id' => $attributeSetId,
            'attribute_group_id' => $attributeGroupId,
            'used_in_forms' => ['adminhtml_customer'],//you can use other forms also ['adminhtml_customer_address', 'customer_address_edit', 'customer_register_address']
        ]);

        $attribute->save();

        /*
        *   === END ===
        */

    }
}

Wgac/Subscription/view/base/ui_component/customer_form.xml

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_con
figuration.xsd">
    <fieldset name="customer">
        <field name="customer_chargify_id">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">text</item>
                    <item name="formElement"
                    xsi:type="string">input</item>
                    <item name="source"
                    xsi:type="string">customer</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>

Kindly suggest me if I am missing something.


texts:
In Magento Enterprise Version,How to set rewards points like below?

£1 spent will give you 3 Reward Points

£200 spent = 600 Reward Points
600 Reward Points can be redeemed as £6 off a future order

.

£300 spent = 900 Reward Points
900 Reward Points can be redeemed as £9 off a future order.

Please give me Idea.


texts: Fedex Shipping Not Working Magento 1.9 CE

texts:
I have an installation of Magento 1.9.1.1 and have Fedex Web Services set up.  Fedex has verified that the account is setup correctly and that I have the correct credentials.  All of my store addresses match the addresses on my fedex account exactly.

I am directly copy n pasting the Account ID, Key, Meter Number, and Production Password into Magento and when I attempt a checkout, it says shipping method not available.   I am attempting a sample order from a USA address to a USA address.

Please help! It is very appreciated!  (Note: I'm not using any extensions that affect shipping or anything like that and shipping weights have been added to products)

Here are screenshots of the shipping settings:


texts: Magento 2: How to get encrypted config value?

texts:
I am making a custom form plugin that integrates ReCaptcha in Magento 2.
To integrate ReCaptcha in the frontend I am trying to read ReCaptcha v3 public key (recaptcha_frontend/type_recaptcha_v3/public_key) from the system configuration using ScopeConfigInterface interface in Block template like this.
<?php

namespace Vendor\CustomForm\Block;

use Magento\Store\Model\ScopeInterface;

class Template extends \Magento\Framework\View\Element\Template
{
    private const XML_PATH_RECAPTCHA_PUBLIC_KEY = 'recaptcha_frontend/type_recaptcha_v3/public_key';

    protected $scopeConfig;

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        array $data = []
    ) {
        parent::__construct($context, $data);
        $this->scopeConfig = $scopeConfig;
    }

    public function getReCaptchaPublicKey(): string
    {
        return $this->scopeConfig->getValue(static::XML_PATH_RECAPTCHA_PUBLIC_KEY, ScopeInterface::SCOPE_WEBSITE);
    }
}

And accessing it in the block.phtml like this.
<?php echo $block->getReCaptchaPublicKey(); ?>

But instead of the public key, I get the following output.
$this->helper('Vendor\Module\Helper\Data')->getConfig('section/group/field');

Any help would be appreciated!
UPDATE: I did try using EncryptorInterface but no luck!
<?php

namespace Vendor\CustomForm\Block;

use Magento\Store\Model\ScopeInterface;

class Template extends \Magento\Framework\View\Element\Template
{
    private const XML_PATH_RECAPTCHA_PUBLIC_KEY = 'recaptcha_frontend/type_recaptcha_v3/public_key';

    protected $scopeConfig;
    protected $encryptor;

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Magento\Framework\Encryption\EncryptorInterface $encryptor,
        array $data = []
    ) {
        parent::__construct($context, $data);
        $this->scopeConfig = $scopeConfig;
        $this->encryptor = $encryptor;
    }

    public function getReCaptchaPublicKey(): string
    {
        $key = $this->scopeConfig->getValue(static::XML_PATH_RECAPTCHA_PUBLIC_KEY, ScopeInterface::SCOPE_WEBSITE);
        return $this->encryptor->decrypt($key);
    }
}

Here is a screenshot of core_config_data table. I trying to access the value with the path recaptcha_frontend/type_recaptcha_v3/public_key.


texts: Magento 2.4.2: cannot override crontab.xml

texts:
With the code below, I am looking to change the cron frequency, but it doesn't take any effect.
   <group id="yotpo_yotpo">
        <job name="yotpo_yotpo_orders_sync" instance="Yotpo\Yotpo\Model\Jobs\OrdersSync" method="execute">
            <schedule>0 * * * *</schedule>
        </job>
    </group>

    <job name="inventory_in_store_pickup_sales_send_order_notified_emails" instance="Magento\InventoryInStorePickupSales\Model\NotifyOrdersAreReadyForPickupEmailSender" method="execute">
        <schedule>0 0 1 * *</schedule>
    </job>
    <job name="swissup_marketplace_job_run" instance="Swissup\Marketplace\Cron\QueueProcess" method="execute">
        <schedule>0 0 1 * *</schedule>
    </job>
    <job name="swissup_marketplace_job_cleanup" instance="Swissup\Marketplace\Cron\QueueCleanup" method="execute">
        <schedule>0 0 1 * *</schedule>
    </job>
    <job name="swissup_marketplace_cache_cleanup" instance="Swissup\Marketplace\Cron\CacheCleanup" method="execute">
        <schedule>0 0 1 * *</schedule>
    </job>


texts: Uncaught TypeError: $.initNamespaceStorage is not a function magento2

texts:
Some functionality is not working properly and it shows some errors in console

Any help will be appreciated.


texts: Get product attribute value from custom group

texts:
I've added a new attribute group "Floor Inventory" with three attributes whose attribute codes are flr00, flro1 and flr02.

I'm trying to get value of flr00 for product with id 2 in root Magento but it's returning NULL value.

<?php
require_once('app/Mage.php');
umask(0);
Mage::app();
$_product = Mage::getModel('catalog/product')->load(2);
var_dump($_product->getData('flr00'));
exit();


texts: Magento 2: Different product images in different store view

texts: I want to display different images for products for each store view. The rest of details are common for all the store views. Can anyone suggest me how can I achieve this?


texts: i need to limit the number of products added to compare in magento

texts: I need to limit the number of products added to compare in Magento. Lets say 3 products.


texts: Sharing Simple Products between Configurable Products

texts: I have Magento 1.8.1.  I wanted to know if I could share the same 3 Simple Products with 2 different Configurable products.  And if this is possible how would I go about doing it.?


texts: Override Third Party Extension in Magento 2

texts:
How can I Override a Third Party Extension?
The Path for the Extension is: app/code/extension_company/extension/model/file.php

Can I Override this php File by my custom Theme?


texts: the email for new order notification doesn't sent

texts:
I have problem with the email notification it doesn't send to customer
I have searched for it and found that it needs to set up the Cron job. I did setup it but still, nothing sent.

this is the Cron job
http://prntscr.com/htuohp

I hope you can help me with that.
thank you
Magento 1.9


texts: Multiple Magento 2 Instances on Nginx Server Duplicate Listen

texts:
I have a dev environment where i want multiple instances of Magento 2 however when adding a second site my Nginx config throws the following error on restart:

nginx[10338]: nginx: [emerg] duplicate upstream "fastcgi_backend" in /etc/nginx/sites-enabled/magento2.com:1

The same nginx config has been used on each site just pointing to seperate route directories but seems to be having an issue with having duplicate upstream error:

upstream fastcgi_backend {
server   unix:/var/run/php/php7.0-fpm.sock;
}

server {
listen 80;
server_name dev.magento2.com;
return 301 $scheme://dev.magento2.com$request_uri;
}

server {
listen 80 reuseport;
server_name dev.magento2.com;
set $MAGE_ROOT /var/www/magento2/public_html;

set $MAGE_MODE developer;
#set $MAGE_MODE default;
#set $MAGE_MODE production;

include /var/www/magento2/public_html/nginx.conf.sample;
fastcgi_read_timeout 3000;
}


texts: Get the email id based on user name in magento2

texts:
In the login page, I'm using the username instead of email. Fetching the email is not working and shows the empty page. Can please anyone help me.

echo $username = $login['username'];
                    $this->searchCriteriaBuilder->addFilter('r_user_dea', $username, 'like');

                    $searchCriteria = $this->searchCriteriaBuilder->create();
                    $list = $this->customerRepository->getList($searchCriteria);

                    if ($list->getTotalCount() > 0) {
                        foreach ($list->getItems() as $item) {

                            echo $email = $item->getEmail(); exit;
                            //$login['username'] = $email;

                        }
                    }

$this->searchCriteriaBuilder->addFilter('r_user_dea', $username, 'like');

in this line, r_user_dea is my custom attribute.


texts: Template path hints are displayed in order emails

texts: I just found that when we had the template path hints activated, the path hints actually were displayed in the email notifications for orders and shipments that were emailed to customers. Does anyone know how to disable this from appearing in the emails?


texts:
Is it possible to sell with the xpos app a product that is not in magento store?

If not is it possible to make in magento a product with a variable price?

We have some products that we dont want in shop we will click in xpos on a button and enter an price without any name for the product

Thanks for answers


texts: Add new links to top links in Magento 1.9

texts:
It's pretty easy to add some types of links to top menu using this method:
http://www.magentocommerce.com/knowledge-base/entry/adding-page-links-in-the-navigation-bar

But I cannot figure out how to add a simple home page link. The above method does not seem to work. It seems that the method requires some type of URL, and if it's left blank or a "/" is used, Magento makes up a link that does not work.

I have custom theme, based on the RWD theme, with a local.xml file. I have tried to add code suggested from various websites, to add a new top link, but the code seems to not work for Magento 1.9.

I have been experimenting with the renderer.phtml file in my theme, with no luck.

Any suggestions for adding a link in the top links of Magento 1.9, especially a home page link?


texts: Magento 2 set created date to order when creating

texts:
I have followed the below steps to create an order in magento 2. But i want to set my preference date when creating it.

How to create order programmatically in Magento 2?


texts: Multi-seller Market Place - Show Same description and images for all products

texts:
We are working on a multi-seller market place. We have an extension that allows as to do this. Sellers can register and can add products. Now we need to show same description and images for all sellers. For example seller A adds a product called Samsung Galaxy s7. Seller B also adds the same product. When the buyer search for the Samsung Galaxy s7 we need show only the product from seller which has the least price and also the Image and description should be same two product. Something like a master record for two products.

Is it possible to do this in Magento?


texts: Magento Different Store Views Different Messages

texts:
I am currently running on two store views: "ENGLISH" and "BAHASA INDONESIA".

I've configure a header message(Free Shipping for all SG Orders S$20) on top of the site for ENGLISH store view.
How do I configure a separate header message for BAHASA INDONESIA store view.

Here my code for ENGLISH store.

FREE SHIPPING FOR ALL SG ORDERS S$20

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

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

    <?php if(!Mage::getSingleton('customer/session')->isLoggedIn()){ ?>

<a href="<?php echo $baseurl ?>customer/account/login"><?php echo $this->__('Sign In / Register'); ?>

    <?php }else{ ?>

My Account

<a href="<?php echo $baseurl ?>customer/account/logout"><?php echo $this->__('Sign Out'); ?>

            <?php }?>

Chris


texts: Magento 2.3 Mysql Showing Upgrade Compilation Error

texts: When i run php bin/magento setup:upgrade in cmd, then i'm getting this error. anyone can help me, why this error is showing ? website is working fine but i want to fix this error. Plz help if someone know about this. Thanks


texts:
We recently moved to a new server and on our new server we can not choose the default config. It reverts to the main store view and won't let me change my default items without unchecking the box.

There is only one store view and one website.

Here are the steps we took in changing servers

1) Rackspace setup complete new server
2) 3rd party security company setup Apache
3) We moved the content folder to new server

The database has always been on it's own server so we did not touch that.

The security company moved much of the main htaccess commands into the vhost file, they then locked the vhost file so only they can see it. (Rackspace told me this on the phone)


texts: How to get an order id in success.phtml block?

texts:
I created an own module for a new block in success.phtml. Read my old post here:
Magento 2: Override success.phtml

Now, I want to go get the order id in my own success.phtml file.

Tried with:

    $block->getOrderId() and $this->getOrderId()

but I don't get the id. Any idea what I need to call to get the order id?


texts: Magento 2.3: How to process HTML content from the wysiwyg in frontend?

texts:
I created a widget that has a field for text as wysiwyg value. When I call up this value $block->getData('field_name') in frontend, I get something like:

Content goes here

Some text

Some text 2

While the value should look like this:

Content goes here

Some text
Some text 2

How can I add HTML processing to my block? Thank you!


texts: magento 2: 'i18n:collect-phrases' command creates different csv files

texts:
php bin\magento i18n:collect-phrases -o "C:\xampp\htdocs\magento\app\design\i18n\xx_YY.csv" -m

collects all phrases in the magento application and outputs a csv file with 4 columns:

php bin\magento i18n:collect-phrases -o "C:\xampp\htdocs\magento\app\design\i18n\xx_YY2.csv" C:\xampp\htdocs\magento\app\design\frontend

collects all phrases in app\design\frontend and outputs a csv file with 2 columns:

What is the difference in the two files ?

Also I'm currently using de_DE.csv from https://github.com/splendidinternet/Magento2_German_LocalePack_de_DE
which (i think) translates the whole magento application. Why does this file have 2 columns instead of 4 (like the xx_YY.csv I created) ?

Also, when I install a new theme , can I just collect all phrases from that theme into a csv file (2 columns) -> then copy and paste it's content into the end of the file de_DE.csv and everything will work ?


texts: Undefined index: sales_shipment in l/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php

texts:
Trying to run bin/magento setup:upgrade on a Magento 2.3 site and I keep getting this error:

Updating modules:
Schema creation/updates:
Notice: Undefined index: sales_shipment in /home/mcrosshutadmin/public_html/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 152

I've cleared the cache, reindexed, disabled modules, removed the vendor folder and composer.lock file and run composer install and still I get this error.

The magento 2 database has prefixes on the tables so there was no sales_shipment table so I copied the prefix_sales_shipment table to sales_shipment and still the error persists.

How can I clear this error? Is a fresh install of Magento the answer?


texts: Add layout handle based on dynamic value

texts:
I need to add a specific layout handle for all the pages when a certain value is present in the session.
To make it more clear, if $session->getMyValue() returns true I need to load a specific layout handle called my_specific_layout_handle on every page I visit.
In the code above $session is an instance of any subclass of Magento\Framework\Session\SessionManager (not really relevant).
Is there any event I can use or any method I can pluginize?

Note: I'm not concerned with full page cache for now. Let's say it does not exist.


texts:
I customize the tabs on product detail page. I created an attribute on the admin code it like this

Description

Details

                <?php echo $_product->getDescription() ?>

Specification

                <?php echo $_product->getSpecification() ?>

Delivery

                <?php echo $_product->getDelivery() ?>

Reviews

 <?php echo $this->getReviewsSummaryHtml($_product, false, true)?>

But what happen is, the images is not loading. I used WYSIWYG editor for description, specification and delivery tab.

I think I'm missing something? I'm using RWD theme on Magento Enterprise edition version 1.9

Please help.

Hope and appreciate your answers


texts: product price in cart turns 0 on cart update

texts:
I've created a plugin on afterGetPrice() to live update the price of product of Simple products. Everything works fine until I update product quantity or add more product in the cart. Whenever I add more product to cart price of previously added products turns 0. Even if I change the quantity in cart product price turns 0. Here is my plugin code:
public function afterGetPrice(\Magento\Catalog\Model\Product $product, $price){
                $premium = 0;
                $weight = $product->getResource()->getAttribute('fine_weight')->getFrontend()->getValue($product);
                $attr_premium = $product->getResource()->getAttribute('premium');
                if($attr_premium)
                        $premium = $attr_premium->getFrontend()->getValue($product);
                $livePrice = $this->_livePrices->getLivePrices($metal);
                return $livePrice*$weight+(round($premium*$livePrice/100,2));
        }


texts: Magento 2 plugin for sending email when change customer's group

texts:
I created a Plugin for sending emails when the owner of the shop changes the customer's group in backend. I still need to add the group (discount) in the email. The problem is that when I access to a customer and change it's group it sends me around 16 emails, the function that sends the email is afterSetGroupId(); so i don't understand why it sends me too many emails.

Here is my code:
Plugin SendDiscount.php

public function afterSetGroupId(\Magento\Customer\Api\Data\CustomerInterface $customer, $result)
    {
        //$groupId = $customer->getGroupId();
        //$this->sendYourCustomEmail($customer);

        /* Receiver Detail the person who is going to receive the info that user logged in*/
        $receiverInfo = [
            'name' => 'Admin',
            'email' => 'myemail@hotmail.com'
        ];

        $store = $this->storeManager->getStore();

       $templateParams = ['store' => $store, 'administrator_name' => $receiverInfo['name']];

        $transport = $this->transportBuilder->setTemplateIdentifier(
            'phpcuong_transactional_email_customer_group'
        )->setTemplateOptions(
            ['area' => 'frontend', 'store' => $store->getId()]
        )->addTo(
            $receiverInfo['email'], $receiverInfo['name']
        )->setTemplateVars(
            $templateParams
        )->setFrom(
            'general'
        )->getTransport();

        try {
            // Send an email
            $transport->sendMessage();
        } catch (\Exception $e) {
            // Write a log message whenever get errors
            $this->logger->critical($e->getMessage());
        }

    }

This is my di.xml located under etc/adminhtml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <type name="\Magento\Customer\Api\Data\CustomerInterface">
        <plugin name="PHPCuong_CustomerGroupEmail_Plugin" type="PHPCuong\CustomerGroupEmail\Plugin\SendDiscount" sortOrder="10" disabled="false"  />
    </type>
</config>


texts: Migrate Magento 1.9.2.1 to Magento 2.3.0

texts:
I want to migrate Magento 1.9.2.1 to Magento 2.3 (Without Sample Data). But, when I execute composer update command. It's return some errors.

The "magento/inventory-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.1") that does not match your Composer installation ("1.0.0"). You may need to run composer update with the "--no-plugins" option.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - magento/product-community-edition 2.3.0 requires magento/inventory-composer-metapackage ^1.0.3 -> satisfiable by magento/inventory-composer-metapackage[1.0.3].
    - magento/product-community-edition 2.3.0 requires magento/inventory-composer-metapackage ^1.0.3 -> satisfiable by magento/inventory-composer-metapackage[1.0.3].
    - magento/inventory-composer-metapackage 1.0.3 requires magento/inventory-composer-installer ^1.0.3 -> satisfiable by magento/inventory-composer-installer[1.0.3].
    - magento/inventory-composer-metapackage 1.0.3 requires magento/inventory-composer-installer ^1.0.3 -> satisfiable by magento/inventory-composer-installer[1.0.3].
    - magento/inventory-composer-installer 1.0.3 requires composer-plugin-api ^1.1 -> no matching package found.
    - magento/inventory-composer-installer 1.0.3 requires composer-plugin-api ^1.1 -> no matching package found.
    - Installation request for magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

When, I run with composer update --no-plugins command. Still, It returns same error.

It seems like need to upgrade composer version. But, I'm not sure.

How to solve this error and successfully migrate in Magento 2.3?

Please help me.

Thanks.


texts: Layered naviagtion Not working in Magento2

texts:
I have created some custom attribute and try to enable, these attribute are layered navigation. I follow this document

but, its not works for me.

I tried, Reindex, Clear Cache and Static content generation.

Suggest Me, How to fix this issue. or suggest me How to write custom layered navigation.

Note: I am using Magento 2.1.7.


texts: Custom Magento Module IMEI / Serial number with products

texts:
I need a module that is able to attach a serialnumber/IMEI number to each product sold. We sell a lot of cellphones and the IMEI is necessary for the warranty of a device.

I noticed a number of people are searching for a solution like this but I couldn't find a decent one. So I would like to create one, but I do need some help, I'm not a really experienced programmer!

I would like to change the "magentostore.url/admin/sales_order_create/" page like this:

So there is simply another text field on each products line where the seller can enter the IMEI code. This only needs to be in the adminhtml.

So as far as I know:

I need to define a module (lets call it TSC_Serialnumbers)
I need a way to overwrite app\design\adminhtml\default\default\template\sales\order\create\items\grid.phtml
And I need a way to save the entered values so they can be used in; invoice, ordermail, etc.

If lets say a customer loses his invoice we should be able to retreive it after a few months and print it again.

My goal is to create a fully functioning module and place it on Magento Connect FOR FREE! Any help is greatly appreciated and I will give everybody credit who help out!

EDIT 17/07:

Meanwhile I have been busy trying to create a module: So far I got this, please correct me if I'm wrong! I started this with the http://www.silksoftware.com/magento-module-creator/

My config.xml:

<?xml version="1.0"?>
<config>
  <modules>
    <TSC_Serialnumbers>
      <version>0.1.0</version>
    </TSC_Serialnumbers>
  </modules>
  <global>
    <helpers>
      <serialnumbers>
        <class>TSC_Serialnumbers_Helper</class>
      </serialnumbers>
    </helpers>
    <models>
      <serialnumbers>
        <class>TSC_Serialnumbers_Model</class>
        <resourceModel>serialnumbers_mysql4</resourceModel>
      </serialnumbers>
    </models>
    <resources>
      <salesattribute1437139568_setup>
        <setup>
          <module>TSC_Serialnumbers</module>
          <class>Mage_Sales_Model_Mysql4_Setup</class>
        </setup>
        <connection>
          <use>core_setup</use>
        </connection>
      </salesattribute1437139568_setup>
      <salesattribute1437139568_write>
        <connection>
          <use>core_write</use>
        </connection>
      </salesattribute1437139568_write>
      <salesattribute1437139568_read>
        <connection>
          <use>core_read</use>
        </connection>
      </salesattribute1437139568_read>
    </resources>
  </global>
</config>

and sql\salesattribute1437139568_setup\mysql4-install-0.1.0.php

<?php
$installer = $this;
$installer->startSetup();

$installer->addAttribute("order_item", "serialnumber", array("type"=>"varchar"));
$installer->endSetup();

EDIT 23/07/2015

Ok, I'm going to try it using custom options like @Fabian Blechschmidt suggested, But I still have no clue on how to begin.

As I read I need to use this code

$existentOptions = $orderItem->getProductOptions();
if (!isset($existentOptions['additional_options'])) {
    // If special options of options array is set before, create it.
    $existentOptions['additional_options'] = array();
}
// Adding visible options value
$existentOptions['additional_options'][] = array(
    'label' => 'Your Option Label',
    'value' => 'Your Option Value',
    // The last one that is optional (if not set, value is used)
    'print_value' => 'Your Option Value shown in printed documents'
);
$orderItem->setProductOptions($existentOptions);

Do I need to start writing a new module for this?

How can I change the contents of app\design\adminhtml\default\default\template\sales\order\create\items\grid.phtml without overwriting core files?


texts: Favicon change does not work (Magento 2)

texts:
Magento 2 shows me this path to the favicon in the source:

  /pub/static/frontend/xx/MinimalBlack/de_CH/Magento_Theme/favicon.ico

I delete this file and ad my own favicon to my theme here:

  /app/design/frontend/xx/MinimalBlack/Magento_Theme/favicon.ico

But it creates me always the Magento favicon in the static folder, not my favicon. What's wrong?


texts: load only one root category in the navigation

texts:
I an newbie to Magento. I want to load only one category in my category navigation.
That root category ID is (2). I want load all the sub-categories under that root categories. and under sub-category all the product that category have. And code is working fine but its loading all the menu and categories i have in my magento website.

My Code

<?php $_menu = $this->renderCategoriesMenuHtml($this->getSelectedCategoryId(), 0, 'level-top') ?>
<?php
if ($this->getTitle() != '') {
    $title = $this->getTitle();
} else {
    $title = 'Categories';
}
?>
<?php
$products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
?>
<?php if ($_menu): ?>

<?php echo $this->__($title) ?>

                <?php  $children = Mage::getModel('catalog/category')->getCollection(2)
                     ->addAttributeToSelect('name')
                     ->addAttributeToSelect('is_active')
                     ->addUrlRewriteToResult();?>

                    <?php $childGroup = 0;  ?>
                    <?php foreach($children as $category){ ?>

                        <li id="menu-item-<?php echo $category->getId(); ?>">
                            <?php
                                  $childGroup= $childGroup + 1;
                            ?>
                            <a href="<?php echo $category->getUrl($category);  /* $childGroup; echo $category->getUrl($category) */ ?>"><?php echo $category->getName();?>
                            <a class="toggle-icon-me" href="#child-group-<?php echo $childGroup ?>" role="button" data-toggle="collapse"
                            area-expanded="false" area-controls="#child-group-<?php echo $childGroup ?>">

                            <?php $categoryId = $category->getId(); ?>
                            <?php $category = Mage::getModel('catalog/category')->load($categoryId);
                                    $products = Mage::getResourceModel('catalog/product_collection')
                                              ->addCategoryFilter($category)
                                              ->addAttributeToSelect('*');
                            ?>

                            <ul id="child-group-<?php echo $childGroup;  ?>" class="collapse">
                                <?php foreach($products as $product){ ?>
                                <li id="product-<?php echo $product->getId(); ?>"><a href="<?php echo $product->getUrlPath(); ?>" style="padding-left:25px;"><?php echo $product->getName(); ?>

                                <?php }?>

                    <?php } ?>

<?php else: ?>
    <?php if (Mage::helper('mpanel')->acceptToUsePanel()): ?>

<?php echo $this->__($title) ?>

<?php echo $this->__('Have no categories.'); ?>

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

What is wrong with my code?


texts: I want to display apple pay button on checkout page magento2 how acheived that


texts: SOLVED - Index Management "Catalog Search Index" Broken

texts:
I was trying some exetension, but after I installed "Ajax Search by LitExtension", my search index is broken.

Catalog Search Index says "Reindex Required". So I did.

Then I get this error. I cannot reindex it and also error message is somehow empty.

I deleted var/report as suggested here :

Catalog Search Index not changing status "required index"

but no luck.

How can I fix this?
I use magento 1.8.1.0 .


texts: How to add text field in contact form by admin extension in Magento 2.2.6

texts:
I need to add field in contact form using admin extension when admin add his custom field it automatically add in contact form at frontend contact-us form

if anybody know the logic behind how to add admin added field in front end contact-us form

as i added a custom field manually my assignment is to do  using admin custom extension

i have no idea how to do this


texts:
All our prices are managed through an external integration so price increases have to be scheduled.

Example:
In January you have an original price of £30 and receive a price increase request that has to start from February (£40). All logic must be build in advance.

How would you approach it?

A possible solution would be to create 2 attributes: increased_price and increased_price_date could be an option but this will require a process to run every day and check if there are product like this with that particular date and then update the current price.

Any other options?

Thanks


texts:
Is there a way to import the meta description for categories?

I am on version 1.9 of the community edition and use the Magmi importer tool.


texts: Ubuntu 14.04 Apache + SSL server, how to configure Varnish

texts:
I have a Magento running on a Ubuntu 14.04 server with Apache2 and SSL. I have installed Varnish but not sure how to set it up with SSL without using Nginx. this is my current vhost file ;

    <VirtualHost *:443>

ServerName mysite.com
ServerAlias www.mysite.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/mysite.com

<Directory /var/www/mysite.com/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>

SSLEngine on
SSLCertificateFile /home/ssl/mysite_com.crt
SSLCertificateKeyFile /home/ssl/mysite.com.key
SSLCACertificateFile /home/ssl/mysite_com.ca-bundle

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>
<VirtualHost *:80>
ServerName mysite.com
RewriteEngine On
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]
</VirtualHost>


texts: Magento 2 : run multi query on upgrade database

texts:
For upgrade database, I use direct SQL such as belove code

 $setup->run("delete from directory_country_region");

            $setup->run("TRUNCATE directory_country_region");

            $setup->run("delete from directory_country_region_city");

            $setup->run("TRUNCATE directory_country_region_city");

but just last query was executed.


texts: Programmatically created one grouped product associates can be link to other group product?

texts: I have created programmatically grouped product now i want to this associates link to other group and this associates products shows as two different product with its qty.Not add one product with adding quantitys as default of magento.


texts: Looking for some advice in regards to hosting

texts:
We are currently moving over our website to a Magento platform and looking into what hosting we need to be able to run the store. I've ready that so many factors go into the web hosting that it's hard to decide with no information so I put together some stats in hope that somebody can give some feedback.

Current Info:

SKU's: 3,000 for now although will be going up to maybe 8,000

Daily Visitors Average: 50

Orders: The website we have now is old so it doesn't get loads of sales (couple a day)

Current Server We Have:

CPU: 4 vCore

RAM: 8 GB

SSD: 160 GB

Vesta CP control panel has been installed, running PHP 7.0.27

The website is the only website running on the server.

I currently have Varnish 4 installed with Magentos configuration along with Cloudflare enabled.

The database is hosted on another server (running Vesta CP control panel also):

Database Server

CPU: 2 vCore

RAM: 4 GB

SSD: 120 GB


texts: how do i include a static block in the footer only on homepage

texts:
This is my xml

    <cms_index_index>
        <reference name="content">
            <block type="cms/block" name="block_video">
              <action method="setBlockId"><block_id>block_video</block_id></action>
            </block>
        </reference>
    </cms_index_index>

This example is working, but it put my html code from my static block before the footer. If change the reference name="footer". It doesn't work at all. Why ? What should I change ?


texts: Which parts of Magento query the sales_flat_quote_address table

texts:
I am trying to debug an error that is killing my site (restarting apache on a regular basis).
The error in the error_log is an Exit Signal Segmentation Fault.

I have had my hosts try to run a backtrace on the coredump for when this error occurs, and all they can give me is that it has something to do with a query on the sales_flat_quote_address table happening multiple times (looping) and causing the crash. This apparently comes from the index.php file in the site root. Erm, yeah, everything goes through that file in Magento :-(

Bear in mind, there are no other errors logged when this happens, so it's not like the error_log is filling up with errors due to something breaking in Magento.

This is making it extremely hard to debug the problem.

I figured I need to understand which parts of Magento create queries accessing sales_flat_quote_address, and maybe I can go from there?

I would guess it will be something to do with the display of the shopping basket, but at what point in the application would Magento be triggered into performing multiple queries for the exact same information - and why?

Cheers!


texts:
I want to use custom media.html for specific category for that I updated below to my category > Custom Layout Update

1: Case A

<catalog_product_view>
    <reference name="product.info">
        <block type="catalog/product_view_media" name="product.info.media" as="media" template="common/view/default/mediacustom.phtml" />
    </reference>
</catalog_product_view>

and created mediacustom.phtml there but it not works why ??

2: Case B

when i use below code to custom layout update

<reference name="product.info.media">
    <action method="setTemplate"> <template>common/view/default/mediashowgif.phtml</template></action>
</reference>

it show dummy content when  mediashowgif.phtml has simple text/html content

but when i use magento function it show error
"Call to a member function getImage() on a non-object in "

any help


texts: Magento2 PHP CodeSniffer - "Use of protected class members is discouraged"

texts:
My question is - why the usage of protected members in class in Magento 2 is discouraged?

I looked into other questions that ask about warnings of the PHP CodeSniffer for Magento 2, but nobody addressed this specific warning - "Use of protected class members is discouraged".

In my understanding avoiding the usage of protected members conflicts with the idea of inheritance. That is, if I want to extend the functionality of the protected method and therefore I might need to touch the protected member, I wont be able to do that.

Any thoughts?


texts:
I'm trying to import products by CSV and I got a lot of additional_attributes, whereas one of them seems to break the import and I get the never ending "please wait" wheel.

here's the part of the csv that is causing the error, without it, it works. It's the field additional_attributes:

apg_product_references="

Association between obesity and asthma in the elderly population: potential roles of abdominal subcutaneous adiposity and sarcopenia: W.J. Song, et al.; Ann. Allergy Asthma Immunol. 109, 243 (2012)

Omentin-1, visfatin and adiponectin levels in relation to bone mineral density in Iranian postmenopausal women: M. Tohidi, et al.; Bone 51, 876 (2012)

A 12-week after-school physical activity programme improves endothelial cell function in overweight and obese children: a randomised controlled study: J.H. Park, et al.; BMC Pediatr. 12, 111 (2012)

Adiponectin, leptin and lipid profiles evaluation in oral contraceptive pill consumers: S. Fallah, et al.; Arch. Gynecol. Obstet. 285, 1747 (2012)

Dietary intervention induces flow of changes within biomarkers of lipids, inflammation, liver enzymes, and glycemic control: R. Golan, et al.; Nutrition 28, 131 (2012)

Metabolic Syndrome is Associated with Low Adiponectin Level and Increased Insulin Resistance in Apparently Healthy Koreans: K.H. Yoo, et al.; Korean J. Obes. 21, 175 (2012)

Gastrectomy for Early Gastric Cancer is Associated with Decreased Cardiovascular Mortality in Association with Postsurgical Metabolic Changes:Y.H. Lee, et al.; Ann. Surg. Oncol. 20, 1250 (2012)

Metabolic Syndrome is Associated with Low Adiponectin Level and Increased Insulin Resistance in Apparently Healthy Koreans: K.H. Yoo, et al.; Korean J. Obes. 21, 175 (2012)

Dietary intervention induces flow of changes within biomarkers of lipids, inflammation, liver enzymes, and glycemic control: R. Golan, et al.; Nutrition 28, 131 (2012)

Metabolic Syndrome is Associated with Low Adiponectin Level and Increased Insulin Resistance in Apparently Healthy Koreans: K.H. Yoo, et al.; Korean J. Obes. 21, 175 (2012)

"

If I only try to import the first 6 lines, it works, but it seems to be stuck if there are more than 6 lines.

The console in chrome shows the following:
net::ERR_EMPTY_RESPONSE -> validation.js:168

I only try to import one product, so it shouldn't be a problem with too much data, it just seems like it's a problem with the html code for that attribute.

Is there something like a max length for custom attributes on import that could cause this problem?

Update: If I add the same HTML content via magento backend and export it, everything looks alright, so it's only a problem on import.


texts: Magento 2: how to use a custom renderer in grid uiComponent for a column?

texts:
In my current Magento 2 module developpement, I currently have the following code in my Grid.php file:

$this->addColumn('image', [
    'header' => __('Image'),
    'align' => 'left',
    'index' => 'image',
    'renderer' => 'Vendor\Module\Block\Adminhtml\Custom\Grid\Renderer\Image',
    'sortable' => false,
    'filter' => false
]);

I have successfully managed to switch to uiComponent and in my ui_component file I have the following code:

<column name="image">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="filter" xsi:type="string">text</item>
            <item name="label" xsi:type="string" translate="true">Image</item>
            <item name="sortOrder" xsi:type="number">90</item>
        </item>
    </argument>
</column>

How do I change this code so I can use a custom renderer as I use to do via the Grid.php ?


texts: How to Create Admin grid value type of multiselect and Drop down?

texts:
i am creating admin side grid. in that grid few value i am getting from table. but few value need to select by Admin.
    as seen below figure.

here, column Time sheet value type will be MultiSelect,so that Admin can Select any one or more.

if select one value then beside it in column of  MEAL it will create one dropdown. with two value 1) Before 2) After.

if select two value then beside it in column of  MEAL it will create two dropdown. with two value 1) Before 2) After.

how to create it friend?

Please if you know help me.

Edit: I do not want in Filter. i want it in value row.


texts: Magento2 Fatal error due to not found interface in indexinterface.php

texts: Fatal error: Interface 'Magento\Catalog\Controller\Product\View\ViewInterface' not found in C:\xampp\htdocs\magento2\vendor\magento\module-wishlist\Controller\IndexInterface.php on line 15


texts:
Can anybody tell how to move block in Magento2 using observer or maybe other class without using "move" tag in layout xml.

I know about this method in layout, but I can not use it.

<move element="name" destination="to" before="-"/>

In my case "move" depends on 2 store config values.

And YES, I saw this: Magento 2 - Move block or container only for specific Device

Thank


texts: Magento 2 Module Observer Sequence order and Sales Order Event

texts:
We have two modules which fire the same event checkout_submit_all_after.But i need to give a preference for this , i tried giving sequence in module b but it won't work.For ex Module A and Module B triggers the same event, but module B triggers first, my requirement is to trigger Module A and after Module B , is there any way i can do this. And what are the events triggers when order is placed through cron jobs, I have used checkout_submit_all_after, does this event fires if the order is placed through crons?.

Please give me any solution for to go forward.
Thank You


texts:
Magento 2.2.4
Store set up on subdomain: dev.store.com
SSL
Config variables:

  web/unsecure/base_url - https://dev.store.com/

  web/unsecure/base_web_url - {{unsecure_base_url}}

  web/unsecure/base_link_url - {{unsecure_base_url}}

  web/secure/base_url - https://dev.store.com/

  web/secure/use_in_frontend -

  web/secure/use_in_adminhtml - 1

  web/secure/base_web_url - {{secure_base_url}}

  web/secure/offloader_header - X-Forwarded-Proto

  web/secure/base_link_url - {{secure_base_url}}

I get the admin login page ok. After providing login credentials website gets into a redirection loop. As I can see it's redirected from:

dev.store/com/admin_123/admin/dashboard/index/key/

to

dev.store/com/admin_123/admin/system_account/

Any suggestions, please?


texts: Magento 2 compile command fail, but no errors

texts:
The compile command suddenly stops, but there is no error.

[~/public_html]# php bin/magento setup:di:compile -vvv
Compilation was started.
Repositories code generation... 1/7 [====>-----------------------]  14% 1 sec 198.5
[~/public_html]#

I set all permissions to 777
Set mode to "developer"

How can I find the error and fix it?


texts:
I just stumbled upon Mage_Adminhtml_Block_Newsletter_Subscriber_Grid_Renderer_Checkbox and am not able to tell where exactly this renderer is actually used.
Can anybody tell me? Or is it some relict that is still there but not used anymore (I am using 1.7.0.2)? Just curious.

In my opinion it would make sense to use it as a renderer in Mage_Adminhtml_Block_Newsletter_Subscriber_Grid::_prepareColumns but there is no reference. Am I missing something?


texts: Persistent shopping cart works even if disabled

texts: In the backend, I have got "Enable Persistence" set to "No". Still, If I use one browser to add something to cart, I can see that in the second browser after page reload. How can this work if persistent cart is disabled?


texts: Need customization for selection of Shipping method on product level on CHECKOUT page

texts:
We need some customization for the selection of the Shipping method based on the product level on the Checkout page.

For example:

I have 3 products in the cart and move forward with place order will land us on checkout page and there, the Shipping method block in which it will show me 3 products. Each product will show Shipping method. For example :standard  delivery ( x cost set from magento admin ) and express delivery ( x cost set from magento admin )

I.E :
Checkout page

Shipping method :

  Product 1 Standard delivery ( x cost ) Express delivery ( y cost )

  Product 2 Standard delivery (x cost ) Expresss delivery ( y cost )

  Product 3 Standard delivery (x cost ) Expresss delivery ( y cost )

Anyone know how to achieve this ?


texts: How to set cookie on salesQuoteSaveAfterObserver in magento2

texts:
In my custom module events.xml

<event name="sales_quote_save_after">
        <observer name="cedapi_set_checkout_quote_id" instance="Vender\Module\Observer\SalesQuoteSaveAfter" />
    </event>

In my observer SalesQuoteSaveAfter.php

<?php
namespace Vender\Module\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Stdlib\Cookie\PublicCookieMetadata;

class SalesQuoteSaveAfter implements ObserverInterface
{
    public function __construct(
    \Magento\Checkout\Model\Session $checkoutSession,
    \Magento\Framework\Stdlib\CookieManagerInterface $cookieManager,
    \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory $cookieMetadataFactory,
    \Psr\Log\LoggerInterface $logger,
    \Magento\Framework\Session\SessionManagerInterface $sessionManager
    )
    {
        $this->checkoutSession = $checkoutSession;
        $this->cookieManager = $cookieManager;
        $this->cookieMetadataFactory = $cookieMetadataFactory;
        $this->logger = $logger;
        $this->sessionManager = $sessionManager;
    }

    /**
     * @param \Magento\Framework\Event\Observer $observer
     * @return void
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $quote = $observer->getEvent()->getQuote();
        /* @var $quote \Magento\Quote\Model\Quote */
        $publicCookieMetadata = $this->cookieMetadataFactory
                                     ->createPublicCookieMetadata()
                                     ->setPath('/');
        $duration = 86400;
        $metadata = $this->cookieMetadataFactory
          ->createCookieMetadata()
          ->setDuration($duration)
          ->setPath($this->sessionManager->getCookiePath())
          ->setDomain($this->sessionManager->getCookieDomain());

        $this->cookieManager->setPublicCookie('quoteId', $quote->getId(),$metadata);
        $this->_logger->info($this->cookieManager->getCookie('quoteId'));
    }
}

Not working.Any one help me


texts:
I have created my own grid in magento admin with custom table. Now I would like to edit/update rows from grid panel. So that I can perform bulk edit/update. No need to open each item and edit/update.

I have seen few great extensions. For example this one.

I am sure I need to use some kind of Ajax to achieve this but not sure.

Can anyone guide me to right direction please.


texts: Magento 1.6 fails to extract .tgz module

texts:
I created a module in 1.9 and when files are moved across it works fine but when I use the package extension and try to install it from the generated .tgz file it fails.

I've done some debugging and it fails to extract the archive.

public function extract($file, $source, $destination='.')

This method in downloader\lib\Mage\Archive.php does the extraction.

$resFile = $this->_getArchiver(self::TAPE_ARCHIVER)->extract($file, $tarFile, $destination);

This line extracts it and returns the path to the extracted archive normally but in this case it returns empty.

So in Magento Connect I simply get CONNECT ERROR: Unsupported resource type error in the console.

Any idea if maybe Magento 1.6 expects a different type or anything? I've tried repackaging it in the package extension in 1.6 thinking that might help but no joy.

I also checked the chmod on the magento directory and all is good.

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


texts: What is  Recurring Profiles in magento and how to active  Recurring Profiles ?


texts: Convert all product prices current excluding tax to including tax

texts:
I want to convert all prices of my products from excluding tax to including tax.
I have a german Magento 2.1.8 shop, so I would need to multiply by/include 19 % tax:
net price * 1,19 percent german tax = price including tax

Doing this manually is not possible (I currently have 13000 products created).
Which tables in the database do I need to modify? I have only configurable and simple products.


texts: Pop up will display after removing cookies

texts:
We have custom button "Save design" in product view page , once guest user clicked on that, it will display pop up as below, but after sometime, onclick button will not display pop up  box, but once we delete cookies from browser, than pop up will display again.

In Private window also pop up will display initially, after some time same issue.

    <button onclick="return setproductlogin(\'<?php echo
    Mage::registry("current_product")->getId()?>\', event);setrequestlogin();"
     id="submit-editorApply-{{rand}}" >SAVE DESIGN</button>

script

function setproductlogin(pid, event)
{
event.preventDefault();
document.getElementById("likeproduct_id").value=pid;
jQuery("#productlistlogin").trigger("click");
return false;
}

Browser cookies

Edit

when I delete var/session folder also issue is still there, pop up will work only after removing cookies from Browser


texts: Magento 2 reload cart page total section get updated subtotal

texts:
I am updating cart quantity with ajax and reload the cart total section, that is working is fine.After that i need to check cart subtotal but it gives previous cart subtotal after ajax update.
customerData.reload(sections, true);
                // The totals summary block reloading
                var deferred = $.Deferred();
                getTotalsAction([], deferred);


texts: magento2 how to sort order of product by price

texts:
It my code when I sort product by price but result not show

$collection = $this->_productCollectionFactory->create();
$collection->addAttributeToSelect('*');
$collection->setOrder('price', 'DESC');

return $collection;


texts: Magento 2: how to call checkout session in controller?

texts:
Please anyone tell me, how to call checkout session in module's controller?

this method doesn't work for me

<?php

namespace Demo\Demo\Controller\Demo;

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

    protected $_checkoutSession;

    public function __construct(
        \Magento\Checkout\Model\Session $checkoutSession
    ) {

        $this->_checkoutSession = $checkoutSession;
    }

    public function execute()
    {
        var_dump($this->_checkoutSession);
    }
}


texts:
I have an plugin with after method, that should append piece of html to return.

I think that the html shoul be in some template block. Is there a way to render block from plugin?

Thanks.


texts: How to render date field in UI component (in php not xml) in magento 2

texts:
How to render date field in UI component(in php not xml)   in magento 2

I am building form as in the catalog (meta arrays), datetime eav attributes.

I have tried like below

 'date_of_stock' => [
                            'arguments' => [
                                'data' => [
                                    'config' => array(
                                        'formElement' =>Input::DATE,
                                        'componentType' => Field::DATE,
                                        'dataType' => Text::DATE,
                                        'label' => __('Date Back In Stock'),
                                        'dataScope' => 'date_of_stock',
                                        'require' => '1',
                                    ),
                                ],
                            ],
                        ],

But it throws undefined constant error? How do I solve it?