texts: Magento 2 - update product price via swatches on custom page

texts:
On a custom page I want to show only the swatches of a configurable product and automatically update the product price based on the chosen swatches.

I managed to get the swatches and price to show up on the page, but I can't get the price to update automatically.

My custom page layout:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="empty" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="Magento_Swatches::css/swatches.css"/>
    </head>
    <body>
        <referenceContainer name="content">
            <block class="Company\Module\Block\FormBlock" name="iframe.form" template="Company_Module::form.phtml" cacheable="false">
                <block class="Magento\Catalog\Block\Product\View" name="product.info.options.wrapper" as="product_options_wrapper" template="Magento_Catalog::product/view/options/wrapper.phtml">
                    <block class="Magento\Swatches\Block\Product\Renderer\Configurable" name="product.info.options.swatches" as="swatch_options" before="-" />
                    <container name="product.info.price" label="Product info auxiliary container" htmlTag="div" htmlClass="product-info-price">
                        <block class="Magento\Catalog\Pricing\Render" name="product.price.final">
                            <arguments>
                                <argument name="price_render" xsi:type="string">product.price.render.default</argument>
                                <argument name="price_type_code" xsi:type="string">final_price</argument>
                                <argument name="zone" xsi:type="string">item_view</argument>
                            </arguments>
                        </block>
                    </container>
                </block>
            </block>
        </referenceContainer>
    </body>
</page>

The FormBlock extends Magento\Catalog\Block\Product\View, in the controller I set the 'product' registry to the product being viewed with $this->registry->register('product', $product);.

The form.phtml file simply calls <?= $block->getChildHtml() ?>.


texts: How to check programatically if a discount (cart price rule) was already applied to the cart?

texts: I am a beginner with Magento 2 and need some help with creating a new rule for cart price rules. The rule should check if any discount or previously set cart price rule was already applied to the cart items and if it was, next rule should be excluded (not applied to the cart).


texts: How to make extra fee on specific payment method : Magento 2

texts:
How to make extra fee on specific payment method and this fee appearing in frontend, order email, backend(order, invoice) ?

More extensions not have a full features as I mentioned in my questions. Also I followed this question how to add fee to order totals in magento2

but the correct answer does not support admin side as I need in my question. he mentioned that in his answer.


texts:
I had done bulk update after that i am getting message like
Task "Update attributes for 34 selected products": 1 item(s) have been scheduled for update.
For reference please find the attached image

And status is showing like not started


texts: Css/js/font files not loading in the Admin area - except two

texts:
I'm just starting with Magento 2.0 and after realizing I won't be able to use it on my web server (MySQL 5.5) I decided to install it within my local XAMPP environment on Win 10.

Installation went good but when I access the admin area, only two files (styles.css and require-config.js) load fine. Rest is 404. Check screenshot below

I'm running it at localhost:9000.
Styles.css. which loads fine, has a path http://localhost:9000/pub/static/version1509531285/adminhtml/Magento/backend/en_US/css/styles.css

Ext-all.css, which doesn't load, had path http://localhost:9000/pub/static/version1509531285/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css

Any ideas?


texts: Change the Product grid view to a specific number of columns

texts:
The default number of columns is 3.  How do I change it to 2?  I prefer a solution that uses the admin, but I will settle for any solution.  I have looked through the Magento user guide www.magento.com/help/documentation.  I am using Magento (Commerce)ver. 2.3.0.

I have tried:
 In the Custom Design tab for a category, enter this code in the Custom Layout Update field:

<reference name="product_list">
    <action method="setColumnCount"><count>2</count></action>
</reference>

It had no effect.


texts: =?utf-8?B?R3Vlc3Q=?= : missing or malformed local part

texts:
When an order is placed on my site, my cpanel is getting bounced back with

  =?utf-8?B?R3Vlc3Q=?= <>: missing or malformed local part

however I am unsure why this is, and in the admin of magento I have the orders being BCC: to websales@mydomain.com and without an issue I get them.
Magento 1.9


texts: How to add custom checkbox with event in customer registration Magento 2?

texts:
I'm working on creating a custom checkbox with an event

        <input type="checkbox" id="tcagreecreateaccount" name="tcagreecreateaccount" data-validate="{required:false}" class="input-checkbox checkbox required" value="1">

            <?= __('Custom checkbox') ?>

  1)when the checkbox is ticked need to show
  extra two fields in customer registration

  2)How I change the checkbox as optional one

How I can do it ???
Any ideas?

Edit 1:

addtional.phtml

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

            <input type="text" name="skype2" id="skype22" value="" title="<?= $block->escapeHtmlAttr(__('Check now')) ?>" class="input-text" data-validate="{required:false}">


texts: How to get the Description of a Magento\Catalog\Model\Product?

texts:
I'm in Magento2 and the getDescription(); does not work.

I'm in the file Magento_Catalog/templates/product/list.phtml if that's relevant.


texts: I am working on custom extension and i need to send cart items with all information in email like selected custom options, how can I do that?


texts: How is it possible to set an extension_attributes to the orders and have it appear with REST/SOAP API?

texts:
I am trying to use extension_attributes in order to add a field in the orders. The thing is, I want that field to appear when we get the orders with API calls (http://monsite.fr/soap/default?services=salesOrderRepositoryV1) and I can't get this to work.

For now I altered the tables sales_order and sales_order_grid with the Setup of my module (InstallSchema) to add a field "file_name" and declared extension_attributes.xml in etc :

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Sales\Api\Data\OrderInterface">
        <attribute code="file_name" type="string"/>
    </extension_attributes>
</config>

I've got the generated class in vendor with the methods getFileName and setFileName, but that's it, when I try the url
http://monsite.fr/soap/default?services=salesOrderRepositoryV1
I still have the ordinary attributes (entityId, createdAt, incrementId, etc.), there is not a fileName attribute (not even in extension_attributes node, of course).

Is there someone who knows how to get an extension attribute to appear with API ?

EDIT

Okay, now I get the field "fileName" in the <extensionAttributes> of the SOAP response, but it doesn't retrieve the values in database...
I added a plugin in di.xml :

<type name="Magento\Sales\Api\OrderRepositoryInterface">
        <plugin name="get_file_name" type="Company\Module\Model\Plugin\FileGet"/>

and I implemented a function afterGet() where I have access to the extension attributes ($orderInterface->getExtensionAttributes()) and call the generated methods getFileName() and setFileName(), but getFileName() return null...

One more thing, I also tried with an Observer on the event <event name="sales_order_load_after">, and here I can call getData('file_name') to have database values, but it is done without passing by extension attributes, I'm a little bit confuse, here.

To summ it up :

-with the plugin on OrderRepositoryInterface and the function afterGet(), I have acces to the extension_attributes of my order, and can call getFileName() and setFileName() methods (generated in OrderExtensionInterface), but doing so doesn't seem to affect the database;

-with the Observer : on the event sales_order_load_after, I can use getdata('file_name') as if file_name were a basic attribute and not an extension_atributes, and it does retrieve the value in database, but then it is not present in the SOAP response.

I don't know if I am clear enough, feel free to ask more questions, or sample code if needed.

EDIT

It appears that even if we don't have auto-implementation for it, it is possible to call getData('file_name') through the $resultOrder (class OrderInterface) of the afterGet method of the plugin. Now I have to do a similar work in order to set the value with a SOAP request.

I hope that this monologue of mine can help someone^^". feel free to post a question if you also have some trouble with extension_attributes, I'll help if I can.


texts: Readiness check says PHP version and memory limit are wrong

texts:
Trying to upgrade from Magento 2.1.4 CE to 2.1.6 CE

The readiness check says: Your PHP version is correct (5.6.25).

But we only have PHP 7 installed.

Php info and all areas I can find confirm that 7 is installed and active.

After the PHP version it throws the error Your current PHP memory limit is 256M. Magento 2 requires it to be set to 756M or more.

But memory limit is set higher than 756m

It's like Magento is sourcing information from the wrong place but everything I've found to check confirms php7 and higher than 256m limit.

Is there a way to confirm where Magento is sourcing the info?


texts:
We have a pdf invoices with totals displaying both prices with included and excluded tax, but without a subtotal.
What we need now only on pdf invoices is to display a total when the discount (coupon code) is active. I see that this works, but not on the totals itself:

$subtotal = $item->getRowTotal() + $item->getTaxAmount() + $item->getHiddenTaxAmount()
        - $item->getDiscountAmount();

What would be the proper way of showing this total line on PDF invoices?


texts:
We have a data feed that populates our store with product data, and a short description for each product is provided as part of that. When I edit the short description, then 'save and continue' the record is saved but the short description has returned to the original text. This does not happen with any other attribute of the record. I can edit and save changes to the long description; I can even add a new attribute set and update the values in those fields.

I could only find one reference to this issue on the web and the proposed solution was emptying the cache and trying again. This did not work for me.

Does anyone know what's happening?

Thanks, Alistair.


texts: How add category programmatically magento 2.3?

texts: How to create categories programmatically?


texts: Magento 1.9 - Shipping Calculator - Messages

texts: On the view cart page I do not use the Show Method if Not Applicable option as this can be messy and irrelevant.  Therefore, if there are no available quotes Magento does not show any message by default.  What file would it be best to return an error message from to advise the customer there are no shipping methods available?


texts:
I am creating custom theme in magento 2. Is it necessary to assign parent theme to my new custom theme.

 <parent>Vendor/theme</parent>

I want to develop whole things from the scratch, that's why I don't want to include parent theme.


texts: Admin Panel menus disappeared after upgrade?

texts:
I have upgraded magento C.E 1.5 to 1.8.1.0 through magento connect after the upgrade, I logged in to the magento admin panel and all the menus are disappeared.
I am unable to track as there is no error but none of the menus are shown.
Please help if anyone have already gone through with the same problem.

Thanks in advance.


texts: Newsletter queue not working in Magento 2

texts: I am trying to put a newsletter template in queue, but whenever I fix a time and save it , it gets saved for previous time by 4 hours. Even if I put a time that is somewhere in future, newsletters are not being sent. What could be the problem, and how to address it.


texts: Magicento not working fine in PHPStorm IDE

texts: I recently installed PHPStorm and Magicento plugin to develop new magento extension but it doesn't works fine for me when i press ( alt + M ) it say that Magicento is disabled, when i check it in the plugins It's enabled (It's trail version )


texts: Magento 2 custom AJAX advanced Search too slow

texts:
I am doing and Custom search that gets the data with java script and parses it into the code

My problem is that its taking too long to load the html since it has to load the whole page

Here is the code I am using to load the data into the page:

        var diamondSearch = {
            clearNumb: $("#clearNumb"),
            filter: $("#filter"),
            table: $("#resuts"),
            request: 0,
            loaded: true,
            index: 1,
            serial: "",
            prefix: "/catalogsearch/advanced/result/?",
            sync: function () {
                if (this.request != 0) {
                    console.log("Aborting Request")
                    this.request.abort()
                }
                if (this.serial != this.filter.serialize()) {
                    //Serialize
                    this.serial = this.filter.serialize();
                    //Make String
                    var loadStr = this.prefix + this.serial;
                    //reset index
                    this.index = 1
                    console.log("Syncing Page")
                    //Ajax Call
                    this.request = $.get(loadStr, {}, function (data) {
                        var $response = $('<div />').html(data);
                        diamondSearch.clearNumb.html($response.find('#numbId:first'));
                        diamondSearch.table.html($response.find('#products > *'))
                    }, 'html');
                    this.loaded = true;
                }
            },
            syncNextPage: function () {
                if (this.loaded == true) {
                    //Serialize
                    this.serial = this.filter.serialize();
                    //indexify
                    this.index++;
                    //Make String
                    var loadStr = this.prefix + this.serial;
                    console.log("Syncing next page")
                    //Ajax Call
                    this.loaded = false;
                    this.request = $.get(loadStr, {}, function (data) {
                        var $response = $('<div />').html(data);
                        diamondSearch.table.append($response.find('#products > *'))
                    }, 'html')
                        .done(function () {
                            diamondSearch.loaded = true;
                            console.log("Finished Loading page "+ diamondSearch.index)
                        })
                    ;
                }
            }
        };

I know I can create a Magento_Catalog/layout/catalog_category_view.xml to remove everything that is not the main content

But my problem with that is that I believe modifying that file also changes the layout for the regular search, and I need this page to render normally

Thank you


texts: Get a collection of attribute text values

texts:
I am looking to get a collection of attribute text values (not option values) from this particular table: catalog_product_entity_varchar given a particular attribute_id (and entity_type_id). Preferably I would like to use magento collection models and not include any other information apart what is on this table.

I would like to follow this up by querying a particular value from this table as well as using LIKE based wildcards queries.


texts: Magento 2: Add a product programmatically in the checkout page

texts:
What the client wants is to add a step (product-selector-step.js) before the shipping-step and in that step he shows three options to select representing three simple products.
What I need is to know the best way to add the simple product by Id without having to refresh the page and updating the quote js component regarding the cart totals.


texts: call the custom event after Rest/v1 API call for create new product magento 2

texts:
Currently, we are using the nchannel to push and update the catalog product.
We need to disable the item when they push the new item. After inserting the Qty and other information we manually enable that product.

can anyone let us know how can we get the Rest/v1 API log or event?


texts:
I have created 2 stores in Magento 1.9.3. One for Spanish and other for Catalan language.
I tried to download language packages:

https://www.magentocommerce.com/magento-connect/community-modules-catalan-catalonia-language-pack.html
https://www.magentocommerce.com/magento-connect/community-modules-spanish-spain-language-pack.html

But am getting error for both the packages as:

  CONNECT ERROR: Package not found: Locale_Mage_community_es_ES 1.2.0.0.2-beta

What should I do?


texts: How to setup grunt themes.js for my theme. Should I point to css folders of blank theme?

texts:
I don't know if I should point to the folders I have created under my theme or should I use the ones that I inherit from which is blank. I have created my own folders but they are empty. Can I import into them from the blank theme?

Also I wonder how I can stop grunt from watching.

files: [
        'css/styles-m',
        'css/styles-l',
        'css/email',
        'css/email-inline'
    ],


texts: custom grid filter doesn't work when filtering products by category (bl_customgride module)

texts:
I'm using BL_CustomGrid extension for customising admin grid, when I filter products grid by categories it throws me the error below, I couldn't find out how to diagnose the problem, if anyone has an idea I would really appreciate it.
Thank you

 a:5:{i:0;s:43:"Invalid attribute name: blcg_custom_field_1";i:1;s:7372:"#0 /app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1291): Mage::exception('Mage_Eav', 'Invalid attribu...')
Mage_Eav_Model_Entity_Collection_Abstract->_addAttributeJoin('blcg_custom_fie...', 'inner')
Mage_Eav_Model_Entity_Collection_Abstract->_getAttributeConditionSql('blcg_custom_fie...', Array, 'inner')
Mage_Eav_Model_Entity_Collection_Abstract->addAttributeToFilter('blcg_custom_fie...', Array, 'inner')
Mage_Catalog_Model_Resource_Product_Collection->addAttributeToFilter('blcg_custom_fie...', Array)


texts: What is the purpose of the public_hash in Magento 2 payment vault?

texts:
The new integrated Vault interface for Magento 2 payment methods includes a public_hash that is generated from the payment method information:

    $hashKey = $paymentToken->getGatewayToken();
    if ($paymentToken->getCustomerId()) {
        $hashKey = $paymentToken->getCustomerId();
    }

    $hashKey .= $paymentToken->getPaymentMethodCode()
        . $paymentToken->getType()
        . $paymentToken->getTokenDetails();

However, it is unclear to me what the purpose is of this hash. It doesn't hash any information that's not also stored in clear text, and it's not the primary key of the database table.

Does anybody know why this field was added?


texts: How to create a getChildHtml block and call it in another

texts:
Currently i'm working to redesign a custom Magento template.

I'm facing the following problem.

In file called: 2columns-left.phtml i am facing code like this several times:

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

or

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

These code lines makes me think that they are calling blocks and the content in them by getting the name of .phtml file.

So i have file called slider_layred_nav.phtml and i want to call all the content in it in file 2columns-left.phtml so i tried this code:

So in file 2columns-left.phtml i put:

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

But it is just not displaying anything.

I assume that i have to do something with the layout but i have no idea what.

Can you help me our resolve this mystery ?

Thanks in advance!


texts: Two prices on one product. Cant find info how

texts:
i have a different request my price should look like.Its only because my country is currently in currency changing period. So i need to price look like this

It doesn't matter in what currency but i thin u get the idea. price  should apear everywhere  like this   500US/300EU  . This is just for information . Completed order bill will be formed in bank page form. But its the law requested to show 2 prices .


texts: FedEx International Shipping not displaying on magento checkout

texts:
I had been trying to implement FedEx in magento 1.9. I've inserted the credentials correctly, but still the shipping method is not displaying on checkout.

It works on shopping cart when I click on get quote for all the selected countries.

And in checkout page in works for UAE only, and my country of origin is UAE.

But anything other than UAE it wont work on checkout.

Please help in letting me know if its issue in magento settings or through FedEx.

I've attached snapshot of my settings

Thank you.


texts: Magento 1.9.1.0 Order email stopped working after the latest security patch instalation

texts:
Magento order confirmation email was working properly, suddenly it stopped working after the installation of latest magento security patch. I am also  unable to preview the new order template.

Error trace

2015-07-14T14:05:02+00:00 ERR (3):
exception 'Zend_Mail_Transport_Exception' with message 'Missing To header' in /home/shop_production/htdocs/lib/Zend/Mail/Transport/Sendmail.php:183
Stack trace:
#0 /home/shop_production/htdocs/lib/Zend/Mail/Transport/Abstract.php(337): Zend_Mail_Transport_Sendmail->_prepareHeaders(Array)
#1 /home/shop_production/htdocs/lib/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 /home/shop_production/htdocs/app/code/core/Mage/Core/Model/Email/Queue.php(241): Zend_Mail->send()
#3 [internal function]: Mage_Core_Model_Email_Queue->send(Object(Aoe_Scheduler_Model_Schedule))
#4 /home/shop_production/htdocs/app/code/community/Aoe/Scheduler/Model/Observer.php(79): call_user_func_array(Array, Array)
#5 /home/shop_production/htdocs/app/code/core/Mage/Core/Model/App.php(1338): Aoe_Scheduler_Model_Observer->dispatch(Object(Varien_Event_Observer))
#6 /home/shop_production/htdocs/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Aoe_Scheduler_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#7 /home/shop_production/htdocs/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#8 /home/shop_production/htdocs/cron.php(76): Mage::dispatchEvent('default')
#9 {main}


texts: How to use systemd timer to replace OS system cron?

texts: My Linux distro does not have a system cron by default. I can install one, but as an alternative, is it possible to replace that functionality for Magento 2.3 with a systemd timer? If so, what are the steps?


texts:
I'm investigating platforms for a pure B2B business. I've looked at Magento and I have a couple of issues that seems to be without solution as the platform sits now.

In our business we have may different price lists, in two categories. Normal price lists per market, and customer specific price lists.
We also have customer specific products, that's unique for the customer that we hold in stock. (Should only be shown for the specific customer/customers)
In many cases our customers has one company, but regional offices. Each of these regions have their own customer number, the same organisation-number, but different delivery addresses and sometimes even different invoice addresses.
There are sometimes multiple contact persons for each region that shop online with us. And there are also cases where the same contact person are connected to two different regions... and in a few cases even different companies with their own customer id.

Ex.

Company 1 INC in region x

Contact person 1
Contact person 2

Company 1 INC in region y

Contact person 3
Contact person 1

Company 2 INC in region a

Contact person 4
Contact person 2

Worth mentioning is that our business system is the core in our business. The e-commerce platform is the external face for our customers.


texts: Magento product custom option default value should be name of the customer

texts:
I'm creating a store in magento 1.7.0.2

Courses are virtual products that can be bought. When buying you sign up for a course.

One customer can buy courses for other people. I've set a custom option, text field, for a product where the customer is supposed to write the name of the person attending the course.

In most cases the customer buys the course for himself so I want the custom option to have a default value which is the customers name (if signed in).

I want this to be visible when the customer is viewing the product so that he can change it if needed.

How can this be done?


texts:
I wanted to display the  attribute "brand name" in slider.phtml above product name.
I add below code:
                            <?php
    $optionText = '';
    $attr = $_product->getResource()->getAttribute('newbrand_name');

    if ($attr->usesSource()) {
       $optionText = $attr->getSource()->getOptionText($_product->getNewbrandName());
    }
?>
<?php if($optionText){ ?>

<?php echo $optionText ?>

<?php } ?>

After refresh cache I get issue:  unidentified  variable on line 118:
line 118:
$attr = $_product->getResource()->getAttribute('newbrand_name');

Where should I define this variable?


texts:
I'm looking for a platform to launch a comparison website. For example the website will sell specific product, lets call it product "x". Product "x" is provided by multiple suppliers. I want to list the product on the website and the suppliers.

Users are then able to click on a supplier link and arrive at the supplier website.

Is this possible with Magento, or should I look at another solution?

Thanks


texts:
If I set up two websites Website1 and Website2 on a single domain, is it possible to switch between them using a URL change e.g. equivalent of adding "?___store="? I want to be able to quickly check Website2 if I am currently on Website1.

There are three websites, three store views.

Website Name; Store View Name

company_gbp; company_gbp_en
company_usd; company_usd_en
company_eur; company_eur_en

Entering http://www.company.com/?___store=company_usd or http://www.company.com/?___store=company_usd_en doesn't show me the US store as I'd expect.

Where am I going wrong? Thanks, I have search everywhere to answer this!


texts: Magento 2 - Do I have to create a new theme and recode my extensions after upgrading to magento 2 enterprise?

texts: Do I have to create a new theme after upgrading to magento 2 enterprise and will my extensions stop working?


texts: PayPal Express Checkout with display currency - Magento 1.9

texts:
Just setup a multi currency web site which allows user to select HKD, GB or USD as display currency. However when user checkout with PayPal Express, all price change back to USD which is our base currency.

I Googled this problem, and I only found some solutions based on PayPal Standard.

Is it possible to checkout with PayPal Express with display currency?

Any hint is appreciated.


texts: Magento. Atributes on Layered Navigation create their own page

texts:
I have started working on a Magento site, no information how it was configured.

It is using Magento 1.8.

On the catalog page, I see sidebar includes some attributes which has been configured to appear on the layered navigation, so far is good.

I have noticed per each combination of these attribute a page is created, in our case we have a lot of combinations and it will be a nightmare for SEO.

Is there a way we can filter using parameters instead of a custom URL for each combination?


texts:
I am migrating a website from another shopping cart to Magento CE 2.2.6. I have been able to use the import function in the admin without an issue. The problem is that I won't be able to import any passwords. It seems that if I create an account without the password then the customer is locked out.
I would like to have the customer come to the Magento website and be asked to change their password when they try to login. That way I can put the same password for all migrated accounts.

I tried to change the create_at field in the customer account to more than 90 days old but that did not work. What is the proper way of importing customer accounts if you don't have the password?


texts: success message not displying in phtml template

texts:
Success Message Not Display

  In Controller :-

public function execute()
{

      $delid = $this->getRequest()->getParam('id');

      try{
         $user = $this->_userFactory->create();
         $user->load($delid);
         $user->delete();
         }catch (\Exception $e){
            $this->messageManager->addErrorMessage($e->getMessage());
         }

        $this->messageManager->addSuccessMessage(__('Record Deleted
        Successfully.!'));
        $this->_redirect('magecompcrud/user/user')
}

Thanks in advance:)


texts: I have observer checkout_submit_all_after this event not working with PayPal payment method.


texts: OAuth - 401 oauth_problem=signature_invalid

texts:
I try to authenticate against a magento server (1.7.0.2) REST API using OAuth. I am using the java scribe api.
But I got always a http error 401 'signature_invalid'.
This is the complete debug information from scribe:

obtaining request token from http://myhost.local:11180/magento/index.php/oauth/initiate
setting oauth_callback to oob
generating signature...
using base64 encoder: DatatypeConverter
base string is: POST&http%3A%2F%2Fmyhost.local%3A11180%2Fmagento%2Findex.php%2Foauth%2Finitiate&oauth_callback%3Doob%26oauth_consumer_key%3D77gqhzp35ka9euqqczn5sgr5s5ayeylx%26oauth_nonce%3D2377064468%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1407597421%26oauth_version%3D1.0
signature is: fXGszEGFPnKYdLKTJLoQcrCZjps=
appended additional OAuth parameters: { oauth_callback -> oob , oauth_signature -> fXGszEGFPnKYdLKTJLoQcrCZjps= , oauth_version -> 1.0 , oauth_nonce -> 2377064468 , oauth_signature_method -> HMAC-SHA1 , oauth_consumer_key -> 77gqhzp35ka9euqqczn5sgr5s5ayeylx , oauth_timestamp -> 1407597421 }
using Http Header signature
sending request...
response status code: 401
response body: oauth_problem=signature_invalid&debug_sbs=tDohHQ22G9KAwR7Inn0CVSxpF2c=

The REST API in general works because I can receive stockitems from the URL /magento/api/rest/products

I am also able to run the same code against my local developer magento installation (1.9.0.1).

What could be the reason for this error message? On my test server I need to work with the port number 11180. Could this be the problem?


texts: custom module event redirecting to cart page not next checkout steps

texts:
I'm trying to add custom field in my magento checkout billing

but my module event ..

controller_action_predispatch_checkout_onepage_saveBilling

not proceeding to next step ... is there any solution for this....

public function saveBilling(Varien_Event_Observer $observer)
    {

        $fieldVal = Mage::app()->getRequest()->getPost('billing');
        Mage::log('My 1st log entry'.print_r($fieldVal,true), null, 'system.log');
        $observer->getOrder()->setCustomerNote((string)$fieldVal[customer_note]);

    }

i try log Request->Params results in my events observer methods and it log my billing data... what should i do make it work

I'm trying to save a field data when customer saves billing information


texts: Magento 2 : Too many redirects in admin login screen

texts:
Recently, i have moved the server of my magento2 project. After moving to different server following steps i have taken.

1) Configured the Base URL in

core_config_data

2) Clear the Magento 2 Cache (Remove all the content inside var directory)

3) Perform php bin/magento indexer:reindex

4) Clear Browser Cookies and cache.

Result

chrome says This webpage has a redirect loop for only admin screen while frontend working fine. I have checked with the other browsers but it has similar message of TOO_MANY_REDIRECTS

Prompt response to this issue will be highly appreciated.

Thanks


texts: After migration, CSS/JS file only for a few category aren't loaded properly

texts:
There.

I just checked my migration works well.
By the way, i can see a weird issue on our home page.

My devwebsite url is http://dev.kbethos.com/
And the url under this issue http://dev.kbethos.com/blanks-classics.html
Resources on other url except this seems to be loaded well without problem.

What is the issue of it?
I have tried migration work over and over again. It still happens


texts: Magento 1.9 disable login and registration completely

texts: I'm looking for way to completely remove customer login and registration, so checkout would be able to do only as guest. I found this extension which disables registration and redirects to login, so my question is will I be able to do something similar to disable login as well, of is there some better way of doing this?


texts: Integrity constraint violation: 1062 Duplicate entry for key 'UNQ_SALES_FLAT_INVOICE_INCREMENT_ID'

texts:
I'm helping a merchant track down the root cause for some failed payment transactions (during a heavy order day), that failed with the following error

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '51986' for key 'UNQ_SALES_FLAT_INVOICE_INCREMENT_ID'

The UNQ_SALES_FLAT_INVOICE_INCREMENT_ID index is a unique key on the increment_id column in the sales_flat_invoice table.  When I look in this table for the increment_id mentioned in the error (51986), I find there's already a invoice with this increment_id in there, and it's for an order placed by a different customer.

My 2 questions related to this

Where in Magento CE 1.9.0.1 is an invoice ID normally created?
Are there known issues in a stock Magento CE 1.9.0.1 with colliding invoice IDs for near simultaneous orders?

I realize the increment ID of 51986 means the store has some sort of extension for changing the increment IDs installed, but I want to make sure there isn't known science w/r/t to this before going too far down that path.


texts:
I was poking around for academic reasons on how the objects are instantiated. I figured out most of the things and the differences between factories (dev, compiled, production) but something scared me.

Magento\Framework\ObjectManager\Factory\Compiled::create().

public function create($requestedType, array $arguments = [])
{
    $args = $this->config->getArguments($requestedType);
    $type = $this->config->getInstanceType($requestedType);
    if (!$args) {
        return new $type();
    }
    foreach ($args as $key => &$argument) {
        if (isset($arguments[$key])) {
            $argument = $arguments[$key];
        } elseif (isset($argument['_i_'])) {
            $argument = $this->get($argument['_i_']);
        } elseif (isset($argument['_ins_'])) {
            $argument = $this->create($argument['_ins_']);
        } elseif (isset($argument['_v_'])) {
            $argument = $argument['_v_'];
        } elseif (isset($argument['_vac_'])) {
            $argument = $argument['_vac_'];
            $this->parseArray($argument);
        } elseif (isset($argument['_vn_'])) {
            $argument = null;
        } elseif (isset($argument['_a_'])) {
            if (isset($this->globalArguments[$argument['_a_']])) {
                $argument = $this->globalArguments[$argument['_a_']];
            } else {
                $argument = $argument['_d_'];
            }
        }
    }
    $args = array_values($args);
    return $this->createObject($type, $args);
}

What do all the underscore prefixed and suffixed elements mean  and do? like _a_, _d_ and so on. An example or 2 would be awesome.


texts: Magento 2.2.2 wysiwyg upload images broken in admin

texts:
I have tried to upload image in block using wysiwyg editor.

1.click the Insert/Edit image
2.choose a image
3.save

but image not showing in preview.


texts: Convert Magento 2 equivalent for Mage::helper

texts:
I need a help to convert below code to Magento 2.

class Grid extends \Magento\Backend\Block\Widget\Grid
{
    protected function _prepareColumns() {

    $this->addColumn('entity_id', array(
            'header'    => Mage::helper('customer')->__('ID'),
            'width'     => '50px',
            'index'     => 'mageuserid',
            'type'  => 'number',
            'filter_index' => 'main_table.mageuserid'
        ));
    }
}

Specifically Mage::helper('customer')->__('ID')


texts: "assign store views" Dropdown not visible when adding new widget instance

texts:
So I'm new to Magento, and have been getting to know it's functionality the past week or so.
Getting the hang of it, but have run into a wall when it comes to adding widget instances. I select which type, then specify which design/package, but there are no other options available. When I then click save, I can name it and specify which area(s) it will appear and the sort order.

Everything I've googled has shown that you must specify which store/site the instance will appear on.

I have checked system>managestores> to see that I have an active site (Pretty sure I do), but that is all I know to do to understand the problem.

Any help would be greatly appreciated.


texts: Use of other Folders under vendor in Magento 2

texts:
I am used to Magento 1.x, now It's really confusing to understand the Magento 2.0.x structure.

I am trying to do it. Please help me to understand what is the function of the following folders below vender (Except magento folder)

( bin, braintree, composer, doctrine, fabpot, justinrainbow, league, lusitanian, monolog, oyejorge, pdepend, pelago, phpmd, phpseclib, phpunit, psr, sebastian, seld, sjparkinson, squizlabs, symfony, tedivm, tubalmartin, zendframework )

Is that related to our development? Or those are just some Library files, which need to be keep there?


texts: Rest API: Get order id by customer email

texts:
Can I get list of orders by customer email (as input) via Rest API?

I do not want to create any special extensions for Magento. I use Magento 1.7.2.


texts: How to get disable product collection whenever flat enable at frontend

texts:
In my system flat setting has been enable for products and as per as magento system magento exclude disable products from product collection whenever flat table is creating. That why we can not get disable product collection on frontend

Now i want to get product collection with disable product at frontend.

Was try below code with set store id as  admin for store but it does not works.

Please help me

trying

$coutPro=Mage::getModel('catalog/product')->getCollection()-
    ->addAttributeToFilter('amit_status', array(
    'nin' => array(8),
    ))->setStoreId(Mage_Core_Model_App::ADMIN_STORE_ID);


texts:
I'm building a module in Magento, the frontend is all setup and working and now I've got to add a page to the Adminhtml area (Which I've done).

The issue I'm having is that I've got my Block (Namespace_Name_Block), which is all referenced in the  section of my modules config.xml:

     <global>
        .....
        <blocks>
            <veridial>
                <class>Liquid11_Veridial_Block</class>
            </veridial>
        </blocks>
        .....
        </global>

Inside here I've got a function

    public function getVeridialBaseUrl(){
        // Do Something
    }

Now, this function is working fine on my Frontend page with the following code:

<?php echo $this->getVeridialBaseUrl(); ?>

However, when I use this same code on my page within the /admin section it's not working and there's nothing in my log files from this.
Do I need to add some additional code, or an extra block for the Adminhtml section?


texts: Show "You need to choose options for your item" message in magento2.2 when I hit API for add to cart configrable product

texts:
This is on Magento official document

  http://devdocs.magento.com/guides/v2.2/get-started/order-tutorial/order-add-items.html

  magento-host/rest/default/V1/carts/mine/items

parameters

{
  "cartItem": {
    "sku": "MH01",
    "qty": 1,
    "quote_id":  4,
    "product_option": {
      "extension_attributes": {
        "configurable_item_options": [
          {
            "option_id": "93",
            "option_value": 52
          },
          {
            "option_id": "141",
            "option_value": 168
          }
        ]
      }
    },
    "extension_attributes": {}
  }
}

  Show response "message": "You need to choose options for your item.",


texts: Magento 2: How to add external URL in custom top links

texts:
I would like to add a custom top link which redirects to external URL like Google.com or a blog link etc.

I added the custom top link using referencecontainerBlock. However, I'm not sure where should I give the link for external URL which I would like to re-direct.

<referenceBlock name="header.links">
    <block class="Magento\Framework\View\Element\Html\Link" name="custom-link">
        <arguments>
            <argument name="label" xsi:type="string" translate="true">custom link</argument>
        </arguments>
    </block>
</referenceBlock>

Pls advise.


texts: How to determine if the user tabbed out of a quantity field using knockout?

texts:
I've got a 3rd party module that is showing configurable product details in a grid (i.e. it shows a list of the simple options next to the price of the simple and a qty field, all in a table format).
What we've noticed is that tabbing does not move you from one qty field to the next. Specifically, when you change the qty field and press the Tab key knockout would trigger a change event which reloads the table.
Is there a way of telling that the change event was triggered by the user tabbing out of the qty field? If so, is there a way of automatically placing the user into the next qty field?
For reference, here is the generated html:
<input type="number" data-bind="value: order_qty, event: {change: function(data, event) { $parent.updateInputQty() }}, attr: {'data-product-id': id, name: 'qty[' + id + ']'}" title="Qty" class="input-text qty" maxlength="12" value="0" data-product-id="443865" name="qty[443865]">

And the change function is:
updateInputQty: function () {
    this.canUpdateQty(true);
    this.calculateTotal();
},


texts: Automatically displaying shipping cost in cart

texts:
I have set my shipping rules with Owebia-Shipping 2. I set them so that for a cart there is only one possible shipping cost not depending on the shipping destination. For now, the user has to enter its shipping destination to see the shipping cost as it is on the image below :

I would like Magento to automatically display the shipping cost without needing for the user to enter its address and choose a method, since there will only one displaying and it won't depend on the shipping destination.

Thank you in advance for your help.


texts: Magento 2.2.5 checkout page summary discount row shows as expanded

texts:
In Magento2.2.5 using the default Magento2 2 step checkout on the payment & review step in the order summary box the discount which I believe is suppose to be a drop down shows always as expanded and I would like it not to always be expanded by default. See the screenshot below. Where and how do I make that not be auto-expanded? I looked in vendor/magento/module-checkout/view/frontend/web/template/summary but not sure what file would be edited and how. of course I will move the file to my theme once I know which one needs to be edited.
see screenshot

Thank you @fmsthird I moved the file from Vendor to my theme folder which happens to be

app/design/frontend/Smartwave/porto/Magento_Checkout/templates/summary

I then recompiled and redeployed and flushed magento cache but I dont see any change.

My first row in the cart-items.phtml looks like this

<div class="block items-in-cart" data-bind="mageInit: {'collapsible':{'openedState': 'false', 'false': isItemsBlockExpanded()}}">


texts: what is the relation between Mage_Sales_Model_Order_Payment & child classes of Mage_Payment_Model_Method_Abstract?

texts:
I'm trying to understand payment flow.

I have idea on following topics:

Auth only:Its only check authorization of transaction.

Auth & Capture: Its  check authorization of transaction also capture the amount.

In both classes same type of methods are there.For example capture() method.

So finally which class is responsible of capture?

can anyone  give  idea on this?


texts: How to add Loader for after placing a order in magento 2

texts:
I am using an online payment method Paypal on my site.

I can place the order successfully using the Paypal payment method.

But after placing the order, it takes some time to redirect to the success page.

Until then I need to show loader.

How do I add loader in the checkout page


texts:
I have to customize the listing grid in my own module,
I want to show  group all the slot list day name e.g. monday - 12:00:00,13:00:00


texts:
When I apply a catalog price rule, appears this error:
Fatal error: Maximum execution time of 30 seconds exceeded in /app/code/core/Mage/Rule/Model/Condition/Abstract.php on line 301

How can I solve?


texts: Use paypal express checkout as a paymethod creating orders in the backend

texts:
I need to enable the paypal express checkout on the backend.

I thought it would be easy, just overriding the module-paypal setting the variable canUseInternal to true, for be exact:

I override this file:
/vendor/magento/module-paypal/Model/Express.php

changing the line, setting to true:

protected $_canUseInternal = true;

Now at payment section it displays the PayPal Express Checkout to be elegible, but if I proceed to submit the order it shows that error:

PayPal gateway has rejected request. Invalid token (#10410: Invalid token).

I think it's trying to pay the order on Paypal, but of course there is nothing related of paypal neither credentials.

What can I do? I need to change some functionality, that if it's creating an order through admin, it only places the order, but no idea.


texts:
Greetings StackExchange.

I' have a task where I cannot google anything on the subject.

I want to create a copy of the standard Magento product view but it should be accessible on a custom URL.

I have created a small module that loads up a empty template page on the URL myshop.test/productoftheday.

Is there a way i can use the following to my benefit?

I have succeeded to reuse the layout and template files of catalog_product_view.
In my php-error.log the following is showing:

  Uncaught Error: Call to a member function getId() in
  /app/code/core/Mage/Review/Block/Product/View/List.php:40"

Is there anything in the controller app/core/mage/catalog/controllers/productcontroller I can use to load the view correct regarding list item 2?


texts: How to setup Magento to query vendor before confirming order?

texts:
On our website I want to have 30-40 commonly ordered products on
display. These are very fast moving consumer goods in both the online and offline worlds.
We will also have 100-200 vendors, all of whom sell those
products - but sometimes they may be out of stock.
We cannot have
those vendors upload their inventories and that information will be instantly out of date. These are very tiny shops
with very little infrastructure.
The customer can select the item
and quantities for each and "place" the order (but it is not "confirmed").
Once the order is "placed", from our module, we want to redirect the order to vendor #1,
and checking with him whether he has those products and
quantities. If so, he should have a link or something which will have Magento assign the order to him and the order becomes "confirmed".
If vendor #1 rejects
the order, our system will redirect it to vendor #2, etc. until the
order is accepted or completely unavailable across a set of (say) 10 vendors (that sequence and logic is determined by us). If that happens, the
order is canceled.

Questions:

A. Can I setup Magento to query the vendors, in a non-instantaneous / non-live manner, before the order is confirmed to the customer?

B. Can I setup Magento to query the multiple vendors in sequence as described above?


texts: 2 different domains point to magento multi website/store

texts:
I am trying to set up 2 different domains in two different folders, first one say

  www.test-one.co.uk

which point to /home/test1/public_html and other

  www.test-two.co.uk

which point to /home/test2/public_html. www.test-one.co.uk is the base one. Multiple store and website all are created. Now the problem is we cant point www.test-two.co.uk to the doc-root of test-one.co.uk, because both are pointed to different folders as shown above.

Also thought of doing parked domain way to point, but since second website got certain mailid, dropped that idea.

Another option is to point via httpd.conf and point test-two site to primary site folder.

Is there any better way to handle this case? Without being copied index.php and .htaccess to second site folder and editing same.

Could somebody drop some light towards my issues


texts: CMS Transparent background turns black 1.9.3.2

texts:
I have an issue where my transparent images are filling in black. This is only happening in the CMS blocks, not on product images. Also, when I navigate to the media/wsywig folder on my computer, the images are there with the correct transparent background.

So for some reason, only in CMS blocks, images are rendering with the black background even though they are stored with the transparent one. I have done a ton of searching and found answers on how to fix it with modules, but this isn't working for the CMS.

I have installed SUPEE-9767 v2 with no change in behavior.

Has anyone had this issue before?


texts: How to display Yes/No values in admin grid (Magento2)?

texts:
I have created a InStock column in admin grid and table.

In table, Instock column values are 0 (or) 1 based on productstock.
In admin grid, the Instock column values are dispalyed 0 (or)1 .

But i need to displayed that Yes instead of 1 and No instead of 0.

How to do this?

Thanks.


texts: How to delete a custom table entry by clicking a delete button in a phtml file in Magento 2?

texts:
Fetched details from my custom module and displayed it in a table.
There is a delete option give to corresponding row entries.
The above table codes written in a phtml page.

How to delete the db entry when i click on the delete option?

           <fieldset class="admin__field">
              <legend class="admin__field-label">
                 Image
              </legend>

           </fieldset>

           <fieldset class="admin__field" data-form-part="product_form" name="col[]">
              <legend class="admin__field-label">
                 Color
              </legend>

                          <?php echo $color_name ?>

           </fieldset>

           <fieldset class="admin__field" >
              <legend class="admin__field-label">
                 Series
              </legend>

                          <?php echo $series_name ?>

           </fieldset>

                <button class="action-secondary uploadtable">
                    Remove
                </button>

This is my html code. The details shown in the table was fetched from custom table. Here, when i click remove button , i need to remove the entry from db.


texts: Magento 2 - Layout based on attribute set

texts:
I would like to do a custom product layout for product in a specific attribute set. In Magento 1 we could create a layout handle for a specific attribute set.

What is the best way to do this in Magento 2? Is there a 'designed' way of being able to do this in the xml files?


texts:
I am adding products from web services for my Magento store.Problem is web services keep changing product attribute set with an interval of few days. I came to know that Attribute Set cannot be changed after a product has been created. So what is the possible way to update the product attribute set? Shall i delete the product and recreate the same product or change the attribute set from database. Which one will be better? If i delete the product will it effect on order/inventory section?

I have already checked by updating attribute set from database.It works fine.For testing purpose I have updated the product which has default attribute set. But i want to update those attribute set that has one custom group containing 10 different attributes.


texts: How can I get the product count of a category subject to the current facet?

texts:
For reasons I will not go into (inheriting an old code base), I need to find the product count of a specific category subject to the current facet.

Say I am on the category page, and I have loaded a list of child categories. I would like to find the product count for each sub-category based upon the current facet selections. All of this needs to be done without using the standard facet nav implementation.


texts:
i have a custom form.html that displays at checkout.
i want to have a javascript tag - when the form load just show an alert testing purposes.

code i used below,

"<script type="text/javascript">
require(['jquery', 'jquery/ui'], function($){
    $('document').ready(function(){
        console.log("this")
        alert('Load');
        document.getElementById('pinverify').style.display = "none";
        document.getElementById('labelBalance').style.display = "none";

        document.getElementById('payment[custom_field_one]').value ="";
        document.getElementById('OTP').value= "";
        document.getElementById('payment[custom_field_three]').value = "";

   $('#verify').click(function(){

       checkOTPField();

    });
"

but this alias does not work, is there a different alias used in magento 2?

Thank you


texts: Issue on Magento 2.1.7 Placing Order Errors

texts:
Place order error 400 on /rest/english/V1/carts/mine/payment-information magento 2

http://prntscr.com/os98gp

We are facing an error on a custom checkout, which on hit place order

First, try, it cleans up all payment data.
The second try, it throws this error, and throw the card error.

Did not find anything to help. Accept any solution but upgrade Magento to further versions.


texts: Onepage checkout Uncaught TypeError: Cannot set property 'checked' of null

texts:
I've upgraded a magento site from 1.6 to 1.9 and applied the rwd theme to the site. On the checkout after entering the billing information and clicking on either Ship to same address or ship to a different address the delivery box is blank and there no way moving forward.

I found the error causing this to be Uncaught TypeError: Cannot set property 'checked' of null and the lines for checked to be

            <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1" title="Deliver to this address" onclick="$('shipping:same_as_billing').checked = true;" class="radio" />Deliver to this address

            <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0" checked="checked" title="Deliver to different address" onclick="$('shipping:same_as_billing').checked = false;" class="radio" />Deliver to different address

I've done some google search to try and find any solutions to this but nothing which has helped me in the right direction

I've checked the magento error logs and can't see any signs to help me resolve this error further.

Update:
I've uploaded a clean copy of RWD to make sure it wasn't due to missing elemental from the theme but still getting the same errors.


texts: How to migrate magento 1 to magento 2 programmatically in localhost using PHP ?? Is any anyone have idea related this topic

texts:
Actually I am trying to migrate Magento 1 to Magento 2 in localhost. Do any one have idea related this topic ?

Below code not useful.

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Mage_Tempjs',
    __DIR__
);

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Mage_Tempjs" setup_version="2.0.2" active="true">

    </module>
</config>


texts: Magento Setting Up Cron “Error during saving of crontab: sh: line 6: crontab: command not found”

texts:
I don't have much knowledge in Magento, but I'm spending a lot of time trying to set up crontab. I tried to follow the steps available on the Magento website, but early on when I try to run the command
bin/magento cron: install --force
I already come across an error that I can't solve. I use Professional Cloud Server from Hostinger. Can someone help me?


texts: How to destroy custom session value after X minutes in Magento 2?

texts:
As I know there isn't a core/session in Magento 2 [source], I've created a custom session using customer/session as given below:

public function __construct(
    \Magento\Customer\Model\Session $customerSession,
    ....
) {
    $this->customerSession = $customerSession;
    ...
}
public function execute() {
    $this->customerSession->setOtp(5); // To set session value
    $this->customerSession->getOtp();  // To get session value
}

$this->customerSession->destroy(); will destroy whole customer session, which I do not want.
 Is it possible to destroy this particular otp session value automatically after 30 minutes?


texts: How to develop a SOAP API as a guest user

texts:
I am trying to developing a SOAP API.
For first I created a module like this app\code\MyVendor\MyModule in which I created etc\module.xml, etc\webapi.xml and etc\di.xml.
Then I created my API Interface in app\code\MyVendor\MyModule\Api and the relative model in app\code\MyVendor\MyModule\Model, modified di.xml setting the preference for my Model and then tried to consume it.
The problem is the following:
Using an interface without parameters in the method everything works fine, when I add just one parameter in the methods of my interface and model I cant access WSDL neither invoke WS.
The error I got is "Consumer is not authorized to access %resources"
Interface Code
<?php

namespace Lutech\ProrductService\Api;

interface ProductServiceManagementInterface {

    /**
     * @param string $param
     * @return string
     */
    public function getProductService($param);
}

Model Code
<?php

namespace Lutech\ProductService\Model;

class ProductServiceManagement {

    /**
     * {@inheritdoc}
     */
    public function getProductService($param)
    {
        return 'hello api GET return the $param ' ;
    }
}

di.xml
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Lutech\ProductService\Api\ProductServiceManagementInterface" type="Lutech\ProductService\Model\ProductServiceManagement"/>
</config>

webapi.xml
<?xml version="1.0" ?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route method="GET" url="/V1/lutech-productservice2/productservice">
        <service class="Lutech\ProductService\Api\ProductServiceManagementInterface" method="getProductService"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>
</routes>


texts:
This is my code:

$product_id = Mage::registry('current_product')->getId();
$product = Mage::getModel('catalog/product')->load($product_id);
$categories_name = array(); $i = 0;
$cats = $product->getCategoryIds();
foreach ($cats as $category_id) {
    $_cat = Mage::getModel('catalog/category')->load($category_id) ;
    if ($_cat->getName() == "Hobby"){
        $name = "Pasionat";
    }else{
        $name = $_cat->getName();
    }
    $categories_name[$i] = $name;
    $i++;
}

its working perfectly when I'm on the product page, but when I'm on other page im getting  this error: Fatal error: Call to a member function getId() on a non-object


texts: What is the use of "mapping" node in di.xml in Magento 2?

texts:
I am using Magento 2.2.5

have a look on file

  vendor\magento\module-sales\etc\di.xml

<type name="Magento\Payment\Model\Checks\SpecificationFactory">
    <arguments>
        <argument name="mapping" xsi:type="array">
            <item name="country" xsi:type="object">Magento\Payment\Model\Checks\CanUseForCountry</item>
            <item name="currency" xsi:type="object">Magento\Payment\Model\Checks\CanUseForCurrency</item>
            <item name="checkout" xsi:type="object">Magento\Payment\Model\Checks\CanUseCheckout</item>
            <item name="internal" xsi:type="object">Magento\Payment\Model\Checks\CanUseInternal</item>
            <item name="total" xsi:type="object">Magento\Payment\Model\Checks\TotalMinMax</item>
            <item name="zero_total" xsi:type="object">Magento\Payment\Model\Checks\ZeroTotal</item>
        </argument>
    </arguments>
</type>

there is a node having a name "mapping". Does anyone have any idea about its use?

I have read the question Magento 2 - What case I use di.xml and How to use di.xml for a module?
and Alan storm's article "Magento 2 Object Manager Argument Replacement"

Thanks


texts: Magento 2 with gatsby grapgql for product view page?

texts:
I am using gatsby js and successfully got the product list in index.js But I need to show the detail of product on click.
So I used the below code in gatsby-node.js file.

const path = require('path');
const DirectoryNamedWebpackPlugin = require('directory-named-webpack-plugin');
const Promise = require('bluebird');

exports.createPages = ({ graphql, actions }) => {
    const { createPage } = actions;

    return new Promise((resolve, reject) => {
        resolve(
            graphql(
                `
                    {
                        allMagentoProduct {
                            edges {
                                node {
                                    url_key
                                }
                            }
                        }
                    }
                `
            ).then(result => {
                if (result.errors) {
                    reject(result.errors);
                }

                // Create pages for each product
                result.data.allMagentoProduct.edges.forEach(({ node }) => {
                    createPage({
                        path: `/${node.url_key}/`,
                        component: path.resolve(`./src/pages/page-2.js`),
                        context: {
                            url_key: node.url_key,
                        },
                    });
                });
            })
        );
    });
};

in my page-2.js

import React from "react"
import { Link } from "gatsby"

const SecondPage = () => (

Hi from the second page

Welcome to page 2

    <Link to="/">Go back to the homepage</Link>

)

export default SecondPage

export const query = graphql`
    query ProductQuery($url_key: String) {
        allMagentoProduct(url_key: { eq: $url_key }) {
            id
            sku
            name
            description
            small_image
            image {
                childImageSharp {
                    fluid(maxWidth: 1024, maxHeight: 1024) {
                        src
                        srcSet
                        sizes
                        aspectRatio
                        base64
                    }
                }
            }
            categories {
                id
                name
                url_path
            }
            configurable_options {
                label
                values {
                    label
                    value_index
                }
            }
            url_key
            price {
                regularPrice {
                    amount {
                        value
                        currency
                    }
                }
            }
        }
    }
`;

But I get below

there was an error in your GraphQL query:

Cannot query field "allMagentoProduct" on type "Query".

File: gatsby-node.js:51:12

 ERROR #11321  PLUGIN

"gatsby-node.js" threw an error while running the createPages lifecycle:

Cannot read property 'allMagentoProduct' of undefined

  TypeError: Cannot read property 'allMagentoProduct' of undefined

  - gatsby-node.js:71 graphql.then.result

I couldn't understand the flow of gatsby with grapqh


texts: Add custom block to product page on 2columns-right In Magento 2

texts:
I have changed my page product layout to 2colums-right like this:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-right" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

Now i add my block like this:

 <?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-right" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="right">
            <block class="Cmsmart\Promotion\Block\Groupproduct\View" name="promotion_listproduct_view" template="Cmsmart_Promotion::promotion.phtml">
            </block>
        </referenceContainer>
    </body>
</page>

This block is added ok, but at the end of the page.

My issue is:

How to add this block only on the right side of the page instead of bottom of page?


texts:
I am using Magento 1.9.3.8 with Redis 3.0.6 as backend cache and also my FPC extension is using it for storing files.

I am wondering if Magento is still working with latest Redis 5?
I can't find anything for this


texts: I want to add Company name in Customer grid during order creation

texts:
I want to add Company Name in Customer grid during order creation. Can any one help me how can we do that in magento2.We need to extened sales_order_create_customer_block.xml, but i can't able make it. Please help me.
Here are my code screenshtots with output


texts:
How to get access to webhooks in my rails application to get product changes details from Magento2?
Also how to place custom javascript tags onto magento2 from rails application


texts:
<form action="<?php echo Mage::getUrl('abc_checkout/cart/placeorder'); ?>" method="post" id="confirm_order_form" class="info-static" onsubmit="return submitOrder();">
.
.
.
.

Back

    <button type="submit" title="<?php echo $this->__('Place your order') ?>" class="engine-btn continue"><?php echo $this->__('Place your order') ?></button>

        <?php echo $this->__('Please be patient.'); ?>

</form>

I want to disable this submit button after one click on front end.


texts: Remove pagination from order listing in frontend customer account?

texts: I want list all the orders in a single page. how I remove pagination from my orders page in my account dashboard.


texts: Make magento 2 grid date column follow config timezone

texts:
I already set my timezone config to GMT+7 in backend , and i've created a custom module which will show grid in backend that has date column, the problem is the date is being save in utc format, and i need to show it in GMT+7 format through grid:

    <column name="created_at">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">dateRange</item>
                <item name="label" translate="true" xsi:type="string">Created at</item>
            </item>
        </argument>
    </column>


texts: How to update item total, sub total, and cart total without reload page in magento 2?

texts:
I create a custom block to display the cart total in magento 2. But I want to update the total and quantity in the right block when a user plus or minus product in the left block.

Please help me how to do that with knockout JS. My design as below.

Thank you so much!


texts:
I have followed this solution Magento2: How to get adminUrl in js file using something like 'mage/url'? and its perfectly working. But when i add Add Secret Key to URLs that time it don't work.

Is there any way i could add this secret key to the url?


texts: Where can I customize the HTML invoice found in the customer's account page?

texts:
I know there are extensions to modify the PDF invoices and packing lists. I'm assuming by PDF invoice, they mean the invoices that you can print from the order summary in the admin. However, when a customer goes to their account page in the Magento store they are provided with a link to a HTML version of the invoice. The customer's HTML invoice and the admin's PDF invoice look very different. My question is, where is the template or file located that I can customize the HTML invoice that the customer sees?

Or is there an extension to be able to customize the HTML invoice? I see a ton of extensions for modifying the PDF invoice, but I'd really like to modify the HTML invoice which is what the customer sees.


texts: Magento 2 Import CSV File upload option dissapearing

texts:
Magento 2.2.2

I am trying to upload a csv file for an import.

However when I select Entity Product

the option for uploading the csv in admin dissapears.

I have tried resetting permission for directories but problem is still there.

Please can anyone provide suggestion as to why this could be happening.


texts: Call to a member function getName() on a non-object- Error On Index Page, Runs At Product Page

texts:
My Problem might simple, but I am not getting where exactly problem is.

I have created on custom block under local cood pool. then extends the Mage_Catalog_Block_Product_Abstract method, I have also created on phtml page under frontend > page > html.

My code works perfect when I click on product page. But when I move to index page It gives me error,

  Call to a member function getName() on a non-object-

Please refer following code and give me some suggestions.

Block

class Kultureshop_Page_Block_Html_Custom extends Mage_Catalog_Block_Product_Abstract
{

    protected $_crumbs = null;
    protected $_cacheKeyInfo = null;
    public function __construct()
    {
        parent::__construct();
        $this->setTemplate('page/html/custom.phtml');
    }
      public function getProduct()
       {

        if (!Mage::registry('product') && $this->getProductId())
          {
           $product =   Mage::getModel('catalog/product')->load($this->getProductId());
            Mage::register('product', $product);
          }
        return Mage::registry('product');
    }
}

phtml

$_product = $this->getProduct(); ?>

   <?php echo($_product->getName()); ?> By <?php echo($_product->getArtist()); ?>


texts:
please advise.
I have 4-5 types of categories: by type, by season, by purpose, recommended, etc.
Some products are located in few categories at the same time, for example masala tea can be in "black tea" category, in "loose leaf tea" category and in "arabic flavours" at the same time. When i go to product card itself it shows at the top category name and most of the time the one which is not related to the category i am in at the moment. Ho can i remove category title from product card page at all in using admin access only?


texts:
I did fresh install of Magento 1.5.0.1 and turn on the developer mode in index.php:

Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);

When I try to login to the backend then it shows me the error like:

Zend_Acl_Exception: Resource 'admin/catalog/feed' not found in lib\Zend\Acl.php on line 365
Zend_Acl_Exception: Resource 'admin/catalog/feed/import_products' not found in lib\Zend\Acl.php on line 365
Zend_Acl_Exception: Resource 'admin/catalog/feed/import_items' not found in lib\Zend\Acl.php on line 365
Zend_Acl_Exception: Resource 'admin/report/products/bestsellers' not found in lib\Zend\Acl.php on line 365
Zend_Acl_Exception: Resource 'admin/report/refresh_statistics' not found in lib\Zend\Acl.php on line 365
Zend_Acl_Exception: Resource 'admin/all' not found in lib\Zend\Acl.php on line 365

Just wondering why Magento itself doesn't run without errors on strict developer mode?
I can't turn off the developer mode in order to skip those errors.

Any idea if this is a bug or else?

Note: I have enabled the xdebug extension.

EDIT:
I have only following row for table admin_rule:

rule_id  role_id  resource_id  privileges  assert_id  role_type  permission
-------  -------  -----------  ----------  ---------  ---------  ------------
      1        1  all                              0  G          allow


texts:
I am using three types of menu in my Magento header
Please review the code :

<?php
$sessionCustomer    =   Mage::getSingleton("customer/session");
$identifier         =   Mage::getSingleton('cms/page')->getIdentifier();
$currentRouter      =   Mage::app()->getFrontController()->getRequest()->getRouteName();
$getHeaderSession       =   Mage::getSingleton('core/session')->getHeaderPage();
$pageCoomercial = array('commercial-shop','market-overview','clients-hotels','multi-family-housing','corporate','education-recreation','team-sports','government','privateclubs','medical-wellness','commercial-sales-reps','design','supply','services-service','markets','services','spotlight-installs','ymca-jcc','delivery-install','pro-teams','health-clubs');
    $currentUrl1 = Mage::helper('core/url')->getCurrentUrl();
    $urlArr = explode('/',$currentUrl1);
    if($identifier == 'home'  &&  $currentRouter == 'cms') {
        Mage::getSingleton('core/session')->unsHeaderPage();
        include "main-header.phtml";
    }
    else if($getHeaderSession == 'commercial-shop' || in_array($identifier,$pageCoomercial) &&  $currentRouter == 'cms' || isset($_REQUEST['store']) == 'commercial')
    {
        Mage::getSingleton('core/session')->unsHeaderPage();
        include "header-commercial.phtml";
        Mage::getSingleton('core/session')->setHeaderPage('commercial-shop');
    }
    else{
        Mage::getSingleton('core/session')->unsHeaderPage();
        include "header-retail.phtml";
        Mage::getSingleton('core/session')->setHeaderPage('retail-home');

    }
?>

Now when i am using any cache extesion it's show first visited header menu on all pages.When i disabled cache extesion then this code working fine.where i am wrong ? is this method wright ?.
I have tried to avoid header block from cache but it's not working code is below :

<reference name="header">
        <action method="setCacheLifetime"><s>0</s></action>
</reference>

is there any option/method/idea to show all menu dynamically as its working without cache ?


texts:
I'm trying to add a second store to my existing Magento installation (1.8.1.0).

The existing instance sits on https://subdomain1.url.com,
Within Magento, website code is base, store view code is default

The 2nd instance is to sit on http://subdomain2.url.com,
Within Magento, Website code is 2ndstore, store view code is 2ndstore_sv

I have amended the configuration within Magento so that the new subdomain is configured for the store (System -> Configuration -> Web -> Base URL)

I have set up subdomain2 within cPanel and the root is pointing to subdomain1

Within the htaccess file I have the following:

RewriteCond %{HTTP_HOST} ^(.*)subdomain2.url.com
RewriteRule ^ - [E=MAGE_RUN_CODE:2ndstore_sv]

Yet when I type http://subdomain2.url.com into the browser I end up at
https://subdomain1.url.com

Any suggestions on where I am going wrong?


texts: Where is the template for page that forwards to payment system? (frontend/base/default/template/ops/placeform.phtml)

texts:
We are using Concardis to handle our credit card payments. After checkout, there is a page that notifies the user they are being forwarded to Concardis for payment. However, it is set to use a 3-column layout when I want to switch it to 1-column as well as edit the template.

I turned on block/path hints and see that it says the page is:

frontend/base/default/template/ops/placeform.phtml

The corresponding URL is:

http://domain.com/ops/payment/placeform/

However, I see no such file. (I would want to copy this file to my template and do some edits, but also I'm wondering how to even choose the template to begin with)


texts: Magento2 Fishpig Wordpress Integration - Wordpress RSS Feed Not Working (rss feed aggregator plugin)

texts: I have setup RSS feed plugin but Fishpig blog not working this plugin so any other plugin?


texts: Showing a value in a custom module config page

texts:
i"ve been working on a custom module and i'm kind of stuck right now, basically when the module is installed it generates a token in the database and i would like to show the user that token in the config page.

here is my system.xml part  that shows the field

<fields>
                <token_message>
                <label>Token</label>
                <frontend_type>text</frontend_type>
            <source_model>
            vendoflux/token
            </source_model>
                <sort_order>1</sort_order>
                <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
                </token_message>

            </fields>

i tried to send random data with the toOptionarray() function in my /model/token.php file but doesnt seem to work, any help would be appreciated

public function toOptionArray(){
return array(
        array('value'=>1, 'label'=>Mage::helper('vendoflux')->__('Hello')),
    );

}


texts:
I am using tinymce editor but it is not saving data properly that is when i enter details for description and short-description for product details and click on save it shows validation error.
And when i enter details for meta description it clears out the data.

Help me out to solve this issue. Any Solution for this??


texts:
Is there a way to delete just a credit memo?

I have seen some code snippets & extensions that delete whole orders with all linked invoices, shipments & credit memos, but I just want to delete a specific credit memo.


texts:
I don't know if this a bug, but title tag in layout is not translated.

For example,

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <title>Forgot Your Password</title>
    </head>
    <body>....</body>
</page>

Can you confirm if this a bug or not?


texts:
How do i change this

$special_price = Mage::helper('core')->currency($product->special_price, false, false);

To show for example Euros? can i put in some parameter? im making some CSV lists, and i need to be able to edit the currency


texts: SSL Error - Invalid or self-signed certificate for non https configuration

texts:
After many hours of googling and experimenting I have no ideas what else could be wrong.
When I try to upload product images I get:

  SSL Error: Invalid or self-signed certificate.

It's only visible while basic auth in .htaccess is enabled. Otherwise there is no (success/error) message and no "remove" button.
I have disabled secure URL - it's the same as unsecure URL and set "Allow secure url in admin" to No.
My max upload (in PHP) is set to quite big file size;
Permissions are also set properly.
I have disabled mod_ssl for apache (restarted after that of course);
I have no configs for SSL in /sites-enabled/ files.

There is only problem with Flex Uploader (product images multi upload) and I have no idea how to debug this flex/flash upload.

Does anyone have any good ideas that allow me to fix this on test server (it's OVH).


texts: Is there any event for after clicking proceed to check out?

texts: I want to check additional checking with the product that has already been added in the cart, is there any method of event observers for doing this,  our intention is to find out the customer who has added the product when it is in offer time frame, and after that time frame they should not want to proceed check out that product.


texts: factory injection in magento 2 not working

texts:
Trying to override authenticate method of \Magento\Customer\Model\AccountManagement. Here is the code:

namespace namespace\module\Model\Customer;

class AccountManagement extends \Magento\Customer\Model\AccountManagement
{
    private $customerFactory;
    private $validationResultsDataFactory;
    private $eventManager;
    private $storeManager;
    private $mathRandom;
    private $validator;
    private $addressRepository;
    private $customerMetadataService;
    protected $logger;
    private $encryptor;
    private $customerRegistry;
    private $configShare;
    protected $stringHelper;
    private $customerRepository;
    private $scopeConfig;
    private $transportBuilder;
    protected $dataProcessor;
    protected $registry;
    protected $customerViewHelper;
    protected $dateTime;
    protected $objectFactory;
    protected $extensibleDataObjectConverter;
    protected $customerModel;
    protected $authentication;
    private $emailNotification;
    private $eavValidator;

    public function __construct(
        \Magento\Customer\Model\CustomerFactory $customerFactory,
        ManagerInterface $eventManager,
        StoreManagerInterface $storeManager,
        Random $mathRandom,
        Validator $validator,
        ValidationResultsInterfaceFactory $validationResultsDataFactory,
        AddressRepositoryInterface $addressRepository,
        CustomerMetadataInterface $customerMetadataService,
        CustomerRegistry $customerRegistry,
        PsrLogger $logger,
        Encryptor $encryptor,
        ConfigShare $configShare,
        StringHelper $stringHelper,
        CustomerRepositoryInterface $customerRepository,
        ScopeConfigInterface $scopeConfig,
        TransportBuilder $transportBuilder,
        DataObjectProcessor $dataProcessor,
        Registry $registry,
        CustomerViewHelper $customerViewHelper,
        DateTime $dateTime,
        CustomerModel $customerModel,
        ObjectFactory $objectFactory,
        ExtensibleDataObjectConverter $extensibleDataObjectConverter
    ) {
        $this->customerFactory = $customerFactory;
        $this->eventManager = $eventManager;
        $this->storeManager = $storeManager;
        $this->mathRandom = $mathRandom;
        $this->validator = $validator;
        $this->validationResultsDataFactory = $validationResultsDataFactory;
        $this->addressRepository = $addressRepository;
        $this->customerMetadataService = $customerMetadataService;
        $this->customerRegistry = $customerRegistry;
        $this->logger = $logger;
        $this->encryptor = $encryptor;
        $this->configShare = $configShare;
        $this->stringHelper = $stringHelper;
        $this->customerRepository = $customerRepository;
        $this->scopeConfig = $scopeConfig;
        $this->transportBuilder = $transportBuilder;
        $this->dataProcessor = $dataProcessor;
        $this->registry = $registry;
        $this->customerViewHelper = $customerViewHelper;
        $this->dateTime = $dateTime;
        $this->customerModel = $customerModel;
        $this->objectFactory = $objectFactory;
        $this->extensibleDataObjectConverter = $extensibleDataObjectConverter;
        parent::__construct($customerFactory,$eventManager,$storeManager, $mathRandom,$validator,$validationResultsDataFactory,
            $addressRepository,$customerMetadataService ,$customerRegistry,$logger,$encryptor,$configShare,$stringHelper,$customerRepository,
            $scopeConfig,$transportBuilder,$dataProcessor,$registry,$customerViewHelper,$dateTime,$customerModel,$objectFactory,$extensibleDataObjectConverter);
    }

But i am getting this error

  Fatal error: Uncaught TypeError: Argument 1 passed to namespace\module\Model\Customer\AccountManagement::__construct() must be an instance of namespace\module\Model\Customer\CustomerFactory, instance of Magento\Framework\Event\Manager\Proxy given.

I think the reason is its a factory class or private. Any ideas?


texts: Paging on CMS page with product list not working correctly

texts:
I have created a cms page

www.mysite.com/page

with the following code in the layout update XML, as mentioned in loads of sites on the net

<reference name="content">
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>3</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>

But when I try using any of the toolbars, for example clicking page 2, it redirects to the homepage

www.mysite.com/?p=2

It is not retaining the current page, what is going wrong here?


texts:
I added custom css in Magento 2 but frontend it shows 404 not found

Magento_Theme/layout/cms_index_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="css/mycss.css" />
    </head>
    <body>
          <referenceBlock name="wishlist_sidebar" display="false" />
          <referenceBlock name="catalog.compare.sidebar" display="false" />
          <referenceContainer name="columns.top">
            <container label="Top Slideshow Container" name="page.top.slideshow" as="topslideshow" htmlTag="div" htmlClass="slideshow-wrapper" before="-" />
        </referenceContainer>
      </body>
</page>

I added css in this location Magento_Theme/web/css/mycss.css But frontend it shows 404


texts: Help with a event handler that doesn't fire

texts:
HALP! This is my first attempt at this kind of thing. It seems that the function won't fire when the event happens.
(Eventually, what's supposed to happen is that when the event

Mage::dispatchEvent('nextbits_form_save_after',array('form_data'=>$params, 'form_model'=>$formModel));

occurs, the form data will be routed to appropriate people based on the data contained in the form.....)

I haven't written that code yet, but I don't see the observer catching the event and doing anything at all. What is the problem with my event/observer structures?

Observer.php:
[\app\code\local\Westcott\EmailRouter\Model\Observer.php]

<?php

class Westcott_EmailRouter_Model_Observer {

    public function Notify_by_Mail($observer){

        if (isset($observer['form_data'])) {
            $form_data = $observer['form_data'];
            //$form_model = $observer['form_model'];

            foreach ($form_data as $key =>$fd) {
                //Do something with the form data
                echo "K: ".$key." => ".$fd."
";
            }
            /*
            foreach ($form_model as $key =>$fm) {
                //Do something with the form data
                echo "K: ".$key." => ".$fm."
";
            }
            */
        } else {
            //Do something else with the form data...
        }

    }

    echo "Hello!!";
}

Westcott_EmailRouter.xml:
[\app\etc\modules\Westcott_EmailRouter.xml]

<?xml version="1.0"?>
<config>
  <modules>
    <Westcott_EmailRouter>
        <active>true</active>
        <codePool>local</codePool>
    </Westcott_EmailRouter>
  </modules>
</config>

config.xml:
[\app\code\local\Westcott\EmailRouter\etc\config.xml]

<?xml version="1.0"?>
    <config>
        <modules>
            <Westcott_EmailRouter>
                <version>0.1.0</version>
            </Westcott_EmailRouter>
        </modules>
        <global>
            <models>
                <emailrouter>
                    <class>Westcott_EmailRouter_Model</class>
                </emailrouter>
            </models>
            <events>
                <nextbits_form_save_after>
                    <observers>
                        <Westcott_EmailRouter>

                            <class>westcott_emailrouter/observer</class>
                            <method>Notify_by_Mail</method>
                        </Westcott_EmailRouter>
                    </observers>
                </nextbits_form_save_after>
            </events>
        </global>
    </config>


texts:
I have product attribute, tvitemid, but I can't seem to get it's value. below is the code. I tried 4 different methods.

I created the attribute as global in the product admin and I can see values in the admin.

I have read similar questions but it still does not work for me.

require_once 'app/Mage.php';
Mage::app();

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

foreach($products as $product){

    //works
    $sku = $product->getSku();
    echo "sku = $sku  ";

    //from here down, I get no results
    $tvitemid1 = $product->getTvitemid();
    echo " tvitemid1 = $tvitemid1 ";

    $tvitemid2 = $product->getAttributeText('tvitemid');
    echo " tvitemid2 = $tvitemid2 ";

    $prod = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);
    $tvitemid3 = $prod->getAttributeText('tvitemid');
    echo " tvitemid3 = $tvitemid3 ";

    $tvitemid4 = Mage::getModel('catalog/product')->load($product->getProductId())->getData('tvitemid');
    echo " tvitemid4 = $tvitemid4 \n";

}


texts: Magento 2.3 Varnish 503 Backend fetch failed

texts:
varnish server gives back error message:

Error 503 Backend fetch failed
Backend fetch failed

Guru Meditation:
XID: 131307

varnish log info:

Varnish cache server
# varnishlog -q 'RespStatus == 503'
*   << Request  >> 131307
-   Begin          req 196933 rxreq
-   Timestamp      Start: 1577129611.804607 0.000000 0.000000
-   Timestamp      Req: 1577129611.804607 0.000000 0.000000
-   ReqStart       172.19.0.1 57376
-   ReqMethod      GET
-   ReqURL /index.php/admin/customer/index/index/key/a1cb5649e0727c563c92b6873c654c996b94a4729dfdb8247ef3b57350c20ff2/
-   ReqProtocol    HTTP/1.1
-   ReqHeader      Host: m2.docker
-   ReqHeader      Connection: keep-alive
-   ReqHeader      Upgrade-Insecure-Requests: 1
-   ReqHeader      User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36
-   ReqHeader      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
-   ReqHeader      Referer: http://m2.docker/index.php/admin/admin/system_store/index/key/3685fd86510c4b9c1f7796f25f1b7fda21adcab527d13b0c3822bcb2d207ae40/
-   ReqHeader      Accept-Encoding: gzip, deflate
-   ReqHeader      Accept-Language: en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7
-   ReqHeader      Cookie: admin=3c2d07d3c163dd84faed04865f7e1401; form_key=CgVTpyUNua3s7Ynq; private_content_version=e105233d30e3e7553aa81958343c8dfb; AMCVS_8F99160E571FC0427F000101%40AdobeOrg=1; s_cc=true; mage-translation-storage=%7B%7D; mage-translation-file-version=%7
-   ReqHeader      X-Forwarded-For: 172.19.0.1
-   VCL_call       RECV
-   ReqURL         /index.php/admin/customer/index/index/key/a1cb5649e0727c563c92b6873c654c996b94a4729dfdb8247ef3b57350c20ff2/
-   ReqUnset       Accept-Encoding: gzip, deflate
-   ReqHeader      Accept-Encoding: gzip
-   ReqURL         /index.php/admin/customer/index/index/key/a1cb5649e0727c563c92b6873c654c996b94a4729dfdb8247ef3b57350c20ff2/
-   ReqURL         /index.php/admin/customer/index/index/key/a1cb5649e0727c563c92b6873c654c996b94a4729dfdb8247ef3b57350c20ff2/
-   ReqURL         /index.php/admin/customer/index/index/key/a1cb5649e0727c563c92b6873c654c996b94a4729dfdb8247ef3b57350c20ff2/
-   VCL_return     hash
-   VCL_call       HASH
-   VCL_return     lookup
-   Debug          "XXXX MISS"
-   VCL_call       MISS
-   VCL_return     fetch
-   Link           bereq 196935 fetch
-   Timestamp      Fetch: 1577129676.180708 64.376101 64.376101
-   RespProtocol   HTTP/1.1
-   RespStatus     503
-   RespReason     Backend fetch failed
-   RespHeader     Date: Mon, 23 Dec 2019 19:34:36 GMT
-   RespHeader     Server: Varnish
-   RespHeader     Content-Type: text/html; charset=utf-8
-   RespHeader     Retry-After: 5
-   RespHeader     X-Varnish: 196934
-   RespHeader     Age: 0
-   RespHeader     Via: 1.1 varnish-v4
-   VCL_call       DELIVER
-   RespUnset      Age: 0
-   RespUnset      Server: Varnish
-   RespUnset      X-Varnish: 196934
-   RespUnset      Via: 1.1 varnish-v4
-   VCL_return     deliver
-   Timestamp      Process: 1577129676.180742 64.376135 0.000034
-   RespHeader     Content-Length: 283
-   Debug          "RES_MODE 2"
-   RespHeader     Connection: keep-alive
-   Timestamp      Resp: 1577129676.180834 64.376226 0.000092
-   Debug          "XXX REF 1"
-   ReqAcct        1658 0 1658 175 283 458
-   End

I have used the 'default.vcl' from Magento 2 backend export.


texts:
I am performing reorder in magento 2. I am able to fetch no of items of a particular order but now I want to move those product into my shopping cart. can anyone please suggest me now what should I do?

namespace Racom\Chatbotapi\Model;

use Racom\Chatbotapi\Api\ChatbotapiInterface;

class Chatbotapi implements ChatbotapiInterface
{
    protected $order;
    protected $_customerRepositoryInterface;

    public function __construct(
        \Magento\Sales\Model\Order $order,
        \Magento\Customer\Api\CustomerRepositoryInterface $customerRepositoryInterface
    ) {
        $this->order = $order;
        $this->_customerRepositoryInterface = $customerRepositoryInterface;
    }

/**
     * Returns the Orders list.
     *
     * @api
     * @param Integer $orderId order Id.
     * @return string Greeting message with users name.
     */
    public function reOrder($orderId)
    {
        $productCollection = $this->order->load($orderId);

        $orderInformation = $productCollection->getData();

        $value = json_encode($orderInformation);

        return $value;
    }
}


texts: Ui-component form (Adding drop down field)in magento 2

texts:
I need to create backend admin form which contains two dropdown fields.But One is dependent on other. One dropdown contains attributes like brand,color etc.. The second one contains associate options of the attribute what you select in the first dropdown. If you select Brand, It should show all the available brands in second dropdown.

If you select color It would show all the available colors in the second dropdown

Is above scenario is possible in ui-component form in magento 2. Please suggest me, Am I need to create ui-component form or php form to do my task. Thanks in advance


texts: Magento 2: Changing layout for a theme at store level

texts:
I am recently asked a question, that if a customer wants to change his theme pages for a US store to the 2-column layout but in the default theme, the page has a 3-column layout. How we can achieve this.
Is there a way to do it by overriding layout in the same theme.
As far as I understand we need to create two separate themes itself, making default as the parent of the US store theme. Is this the correct solution or any other best solution is there.


texts: Know Whether Guest User or Registered User buy any thing on current session

texts: I am new in magento.How can we check whether Guest User or Registered user buy any thing on current session of browser using programatically ? I want to make one analysis form based on that check . So please help me out. Any suggestion will guide me to my journey.


texts: Magento 2: Get root category ID programmatically in backend

texts: How can we get root category ID (Default Category) programmatically in backend ?


texts: Add additional text to email template container

texts:
This is my system.xml file:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
    <tab id="afteremail" translate="label" sortOrder="10">
        Label
    </tab>

        <class>separator-top</class>
        After Email
        <tab>afteremail</tab>
        <resource>Module_Vendor::afteremail_config</resource>
        <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
            <field id="display_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
                Display Text
                <comment>This text will display on the all transactional emails.</comment>
            </field>
        </group>

</system>
</config>

And config.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
    <afteremail>
        <general>
            <display_text>Hello World</display_text>
        </general>
    </afteremail>
</default>
</config>

Helper Data.php

<?php

namespace Vendor\Module\Helper;

use Magento\Framework\App\Helper\AbstractHelper;
use Magento\Store\Model\ScopeInterface;

class Data extends AbstractHelper
{

const XML_PATH_AFTEREMAIL = 'afteremail/';

public function getConfigValue($field, $storeId = null)
{
    return $this->scopeConfig->getValue(
        $field, ScopeInterface::SCOPE_STORE, $storeId
    );
}

public function getGeneralConfig($code, $storeId = null)
{

    return $this->getConfigValue(self::XML_PATH_AFTEREMAIL .'general/'. $code, $storeId);
}

}

As well as Plugin.php

<?php

namespace Vendor\Module\Plugin;

use Magento\Email\Controller\Adminhtml\Email\Template\DefaultTemplate;

class AddText
{
/**
 * @var \Magento\Framework\Serialize\Serializer\Json
 */
protected $serializer;

protected $helperData;

public function __construct(
    \Magento\Framework\Serialize\Serializer\Json $serializer,
    \Vendor\Module\Helper\Data $helperData
) {
    $this->serializer = $serializer;
    $this->helperData = $helperData;
}

/**
 * @param DefaultTemplate $template
 * @param $result
 */
public function afterExecute(DefaultTemplate $template, $result)
{
    $displayText = $this->helperData->getGeneralConfig('display_text');
    /** @var \Magento\Framework\App\Response\Http $response */
    $response = $template->getResponse();
    $body = $this->serializer->unserialize($response->getBody());

    $body['template_text'] .= PHP_EOL . PHP_EOL . $displayText;

    $response->representJson(
        $this->serializer->serialize($body)
    );
}
}

For now, additional text displays out of email container.
I want to achieve that it displays in the container.
Any suggestions on how to do that will be highly appreciated!
Thanks!