texts: Magento 2: Logged-in customer can't place order with new shipping module

texts:
The logged-in customer can't place an order with the custom shipping module

gives warning msg and can't process due to Please specify a shipping method

But the guest user can place an order without a problem.

Thank You in advance!


texts: Weird issue with Magento 1.9 success page and JS code

texts:
I am facing a rather strange issue with Magento 1.9. In the success page I have a piece of code that dynamically creates a  tag based on the order just placed.
The problem is that the  tag is not showing up, although the comment just above it does. Here is the code I am using:

<!-- analytics -->
<?php $_order = Mage::getModel('sales/order')->loadByIncrementId( $this->getOrderId() ); ?>
<script type="text/javascript">
    sa('ecommerce', 'addOrder', JSON.stringify({
        order_id: '<?php echo $this->getOrderId(); ?>',
        revenue:  '<?php echo number_format($_order->getGrandTotal(), 2, '.' , ''); ?>',
        shipping: '<?php echo $_order->getShippingAmount(); ?>',
        tax:      '<?php echo $_order->getTaxAmount(); ?>'
    }));

    <?php foreach( $_order->getAllVisibleItems() as $item): ?>
        sa('ecommerce', 'addItem', JSON.stringify({
            order_id:   '<?php echo $this->getOrderId(); ?>',
            product_id: '<?php echo $item->getProductId(); ?>',
            name:       '<?php echo $item->getName(); ?>',
            price:      '<?php echo $item->getPriceInclTax(); ?>',
            quantity:   '<?php echo (int)$item->getQtyOrdered(); ?>'
        }));
    <?php endforeach; ?>
</script>

Weird thing is, if I remove the line just below the comment (the code that gets the order object), the script shows up with the expected errors. Also, if I add a line that prints the grand total for example, right after I get the order object, I get the grand total as expected...
I see nothing in the log files and I set PHP to display all errors as well...

Also, note that there are other stuff below that piece of code that show up normally (buttons etc)...

Any ideas on why this is happening?


texts: number of unique products for a selection of orders in sales_flat_order_item

texts:
Hi fellow programmers,

I'm currently trying to guesstimate how many actions a selection of orders will take to perform. A little context, each unique product ( not a number of products of said product ) counts as an action.

Therefore, if I have 200 orders that need to be processed, the total count of unique products per order should, at a bare minimum, equal that number. However, the following query ( as performed by Magento 1.9.2 ), results in a number lower than 200 ( in my simulations it came close to the actual number of orders, but was still lower ) however, as each order can have multiple products that number should be much higher.

SQL
SELECT count(main_table.entity_id) AS toship, count(distinct sfoi.item_id) AS products, sfo.shipping_method AS shipment
FROM sales_flat_shipment AS main_table
INNER JOIN sales_flat_order_item AS sfoi ON sfoi.order_id = main_table.order_id
INNER JOIN sales_flat_order AS sfo ON sfo.entity_id = main_table.order_id
WHERE (shipment_status IS NULL) AND (sfoi.product_type = 'simple')
GROUP BY sfo.shipping_method

Obviously, this isn't working as intending, however, my question is, how can I modify this query to reflect the changes I want?

What I think matters is the count( distinct sfoi.item_id ) which does its aggregation on the whole instead of each unique order, I just don't see how to fix it...


texts: Magento 2 error in inline css apply in email template

texts:
i have issue regarding apply in line css in email template.

it's showing following error in my email template

CSS inlining error: Warning: DOMXPath::query(): Invalid expression in /var/www/magento2/public_html/vendor/pelago/emogrifier/Classes/Emogrifier.php on line 269

i also update pelago reference link but no luck.


texts: php Parse error: syntax error, unexpected '\' (T_NS_SEPARATOR) in

texts:
i am new to php and i am doing some coding

<?php $url='Mage::getUrl('module_name/index/updateField/');' ?>

i am getting the following error when i used this code :

  Parse error: syntax error, unexpected '\' (T_NS_SEPARATOR)

i am not getting what is the error.

please help me to find solution


texts:
In a child theme (luma is parent), how do I extend a desktop theme but not mobile?

something like:

if desktop "color:teal;"
else "" <--- do nothing.

I'm using _extend.less, so far changes are applied to both mobile and regular version.


texts: How to get Magento 2 EE meta package for 2.2.0 release candidate?

texts:
I tried to download Magento2 EE meta package for 2.2.0-rc with so many versioning but failed to do so.

1#

composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition:2.2.0-dev

2#

composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition:2.2.0-rc1.6

3#

composer create-project --dev --repository-url=https://repo.magento.com/ magento/project-enterprise-edition:2.2.0-dev

composer create-project --dev --repository-url=https://repo.magento.com/ magento/project-enterprise-edition:2.2.0-rc1.6

(with --dev)

None of above is working for me.
Has anyone downloaded the Magento2 EE 2.2.0 Release Candidate meta package?


texts: Magento 2 - Difference between building a theme from scratch and inheriting from Blank theme

texts:
I'm so confused between whether I Should inherit my custom theme from Blank theme or start a new one from scratch.
Please what is the difference?


texts:
I'm trying to add a link to an order confirmation email.
The link should only display if SKU 2133 exists.
The problem when SKU 2133 exists it displays SKU 2133 does not exist.

Before adding the link, I'm testing with the code below. In default.phtml, I added the code below -

           <?php
            $sku = '2133';
            $id = Mage::getModel('catalog/product')->getIdBySku($sku);
            if ($id){
                echo "SKU {$sku} exists";
            }
            else{
                echo "SKU {$sku} does not exist";
            }
            ?>


texts:
I am having difficulties getting getting my form to work. I have it partially working. Fields which are required are coming up in red when not filled out. The problem is that they remain red even when they are filled out. I need to add a blur handler but I don't know where. Here is the code. Ideally I like to be able that once they fill it out the page moves to the next input field, but I imagine this might be too complex. Here is the code

initValidation: function () {

        var showError = function (message) {
            $('<div>').html($('#templateErrorMessage').render({
                message: message
            })).children().prependTo(document.body);
        };

        $(document.body).on('submit', 'form', function (e) {
            var form = $(this);
            var inputs = form.find(':input:visible, .custom-select:visible select').filter('.required-entry');
            var isValid = true;

            inputs.each(function (i, input) {
                input = $(input);

                var value = $.trim(input.val());

                input.closest('.form-row').toggleClass('has-error', !value);

            ///    $(input).blur ();

                input.blur( function() {
                    if (isValid)
                        prompt.removeClass('has-error', !value);
                });

                isValid = isValid && !!value;
            });

            if (!isValid) {
                e.preventDefault();
                showError('Please fill in required fields!');
                scrollTo(0, 0);
            }
        });
    }


texts:
After several research attempts, I still couldn't manage to limit category page to N-number of products to be shown.

I need to limit a specific category page to let's say 180 products only, with pagination as well.

$collection->setPageSize(200);

Will display 200 products but will still display remaining products because of pagination.

To clear things up:

Only list 3 pages (example 180 products regardless) of a specific category to be shown on the front end regardless of how many products are there in that category.


texts: having an issue on contact form magento 2.4.0

texts:
i am having a difficulties on contact form block, dont have themes, i use only the default luma on root/vendor/magento
Write Us
Jot us a note and we’ll get back to you as quickly as possible.
Name
please help
thanks
result:


texts:
We override the Mage_Tax_Model_Config to have different tax settings for specific customer groups. Everything went well except for the PDF documents.

We checked the current customer group ID with $customer->getGroupId() where $customer is Mage::helper('customer')->getCustomer();

Why this is don't work on the PDF documents? Please see the override class in detail:

public function displaySalesPricesInclTax($store = null)
{
    $customer = Mage::helper('customer')->getCustomer();
    if ($customer->getGroupId() > 1) {
        return false;
    } else {
        return true;
    }
}

public function displaySalesPricesExclTax($store = null)
{
    $customer = Mage::helper('customer')->getCustomer();
    if ($customer->getGroupId() > 1) {
        return true;
    } else {
        return false;
    }
}


texts:
my task at my work is that i remove spaces from a frontend sku search (the one at top and the one after hitting enter).
All sku's are formatted like AB 100001234, regexe and so on is ready to go.
If the user enters AB 10 00 01 23 4 magento should use AB 100001234.
Via interceptor i replaced the logic of Magento\Search\Model\QueryFactory->getRawQueryText()
But this will affect to much or is this the right place?
Thanks a lot.


texts:
What should be entered in the box labelled "PHP CLI command" for this option for reindexing products via Magmi? Should it be just left as "php" or should it be "php indexer.php" or something different? I've tried various combinations but nothing seems to actually get our products running through the indexes in Magmi.

I've read the documentation here:

http://sourceforge.net/apps/mediawiki/magmi/index.php?title=Magmi_Magento_Reindexer

We use the "On the fly indexer v0.1.5" currently, so are leaving boxes for calalog_url & catalog_category_product unchecked as directed.

Our products get imported fine into our store. But the url's don't get created and the products don't go into our search in frontend. If we update prices of existing items via Magmi, the prices don't update. So I fear the command we have in the "Magmi Magento Reindexer" field is wrong?


texts: Not getting full path in breadcrumb form Category page to Product description page

texts: I have a parent category SHOP and in shop, there are products. When I click on products, it goes on product description page. However, breadcrumb shows  "home- > product1"  instead of  "home -> shop -> product1"


texts: How can I insert block before breadcrumbs or just after menu on every page?

texts:
I would like to add block to the website (in general on every page) just below menu but not into header, "root" eventually "content".

I managed to add it into content but it's not what I wanted.

=> My layout :

    <reference name="content">
        <block type="core/template" name="banman" before="-" template="banman/block.phtml"/>
    </reference>

This is what I needed to put it there.

Because I'm using Ultimo(latest version), there is a slider before everything else.

Slider is in "root" so I was thinking if I change "content" into "root" then I'll be able to position it before or after slider but it does not work.

I can add it into top.container and it works pretty. But, I can't move it before breadcrumbs.

Doesn't like how it look like if I place it inside menu.Menu bar is far too high.


texts:
Where is the file: CartSuccess.phtml being called from when the users clicks on the "Add to cart" button on a simple product from within a category page?

I want to change the way that the Cart Success is being rendered so that it features multiple "pop-up" boxes


texts: How to show time in product attribute "news_from_date" in admin side in Magento 2?

texts: How to show time in product attribute "news_from_date" on admin side in Magento 2 give below


texts: Translate for specific customer group - Magento 1.9

texts:
Pretty straight forward really, obviously I can do translations via the following file:

  app/design/frontend/theme/default/locale/en_GB/translate.csv

But this will do it across the whole site, for any customer - what I want to do is do a translation just for a specific customer group.

Can this be done?
Do I need to write a module for it?
It's a stupid idea, but I need to get it done. haha

Thanks in advance.


texts: How to disable shipping method if weight is more than 30 Kg

texts:
I installed this extension

  https://landofcoder.com/magento-2-table-rate-shipping-extension.html

to manage shipping rates

but i want to hide it or disable it if  weight is more than 30 kg any help please


texts: Is it a bad practice to use "translate" functionality to get a variable in JS script

texts:
I am looking for a way of getting a store view specific variable in my JS mixin.
I have had no success getting it from my admin config, which would be ideal.

So now  I have the idea of using $.mage.__("storeview specific variable") in my JS, and in my .csv file I would "translate" it to the variable I need.

Is there any reason I should not do this?


texts: Correct Method of Flushing Caches & Managing the Compiler

texts:
I'd like to know if there's any prefered procedure for the following:

Flushing of the Magento cache
Enabling/Disabling of the Magento Compiler

1. Flushing of the Magento Cache

There are a few options here, namely:

Checking the line items and submitting refresh from the Actions dropdown box
Clicking the Flush Magento Cache button, and
Clicking the Flush Storage Cache button

Is there any prefered order in which to do these? What is the difference between the Magento cache & the Storage cache?

2. Enabling/Disabling of the Magento Compiler

a) Enabling the Compiler

When it comes to enabling the Magento compiler, should one have all the store caches enabled? Or should you only activate the caches after enabling the compiler & running the compilation process? Once you've enabled the compiler should you refresh all caches? And if so, does that include Flushing the Magento cache & storage cache (as mentioned above)

b) Disabling the Compiler

When it comes to disabling the Magento compiler, should you disable all the caches first, and then re-enable them after it has been disabled?

Is there any difference between leaving the caches on and disabling / enabling the compiler? What performance impact does it cause?

Any input would be much appreciated


texts: Cron Jobs not successful 502 Bad Gateway

texts:
I am having an issue where i can not run specific cron jobs successfully. Within the scheduler in magento. The job takes quite some time until i get "502 Bad Gateway nginx/1.4.4". I'm not 100% sure on how to proceed, i am suspecting it could be using too much memory...

Among others, one of the cron jobs i am trying to run is from an extension called Xtento  Advanced Order Status "orderstatusimport/observer::importOrderStatusJob".


texts: all links redirecting to old domain after moving to new domain

texts:
we moved the site from one domain to another domain

after moving, admin panel working fine.

but in frontend, except the home page, every page/link is redirecting to the old domain.

means categories and products links are also redirecting to old domain

please help me to find solution


texts: magento2 remove the category id from url?

texts:
In magento2 click on category, that category url look like this www.example.com/catalog/category/view/s/hook-and-loop-brands/id/71/

how can i remove the category id and category path in url?


texts: CE 1.9.2.2 - Changing quantity to ZERO in product page should remove the product from cart

texts:
Go to cart page and click on [Edit] link. You will be now in product
page.
Change quantity to zero and click on [Update] button

This should remove the product from cart. You will get again cart
page with quantity unchanged.
Now change in cart page quantity to zero and update it. The product
will be remove from cart which is a correct behavior.

Maintenance team - Please change the script to allow zero quantities in product page then delete the product from cart.


texts: Simplify Product Import Export in Bulk with Custom Attributes Magento 2.3.5

texts:
I have requirement to import products in bulk from CSV file which have multiple custom attributes of different type (Multiple Select, Dropdown, Text, etc.). Standard Import/Export option for Magento gets complicated for custom attributes as it groups all custom attribute in one column "additional_attributes". To simplify this I have two requirements.

Export and Import product based on Attribute Set. What I am looking for is to export all products within Attribute Set so that each attributes associated with Attribute Set including custom attributes show up as a separate column. For import, I want to upload products which have each custom attribute as separate column.

I am looking for some way to get list of values for attributes which are of Multiple Select, Dropdown and Yes/No types so basically, I can verify the values before I upload data for such attributes.

I tried to search for any extension which can help simplify this but couldn't find one which meets the need. Any thoughts or suggestion would be great help.


texts: Magento 2.3: category image gets overwritten

texts:
I came across an unexpected behaviour in Magento 2.3 Adminhtml area.
Uploading an image with the same name of another already present in the upload category folder replaces the old the one with new uploaded one.
I thought that the new one was renamed example: "same_name_1.jpg", but this does not happen.

Anyone is experiencing this behaviour? Should I change some settings in the backend?


texts: magento 1.9 how to get the associated products of a configurable sorted by super attribute position?

texts:
I need to get all the simple products associated with a configurable, but sorted by the super attribute position, for example, size.

If I have $parent_product, I need $child_s, $child_xl, $child_m, $child_xs sorted by: xs -> position 0, s -> positon 1, m -> position 2, xl -> position 3. So the product order should be $child_xs, $child_s, $child_m, $child_xl

I begin getting all the child product of a configurable this way:

$simpleCollection = Mage::getModel('catalog/product_type_configurable')
                                    ->getUsedProducts(null,$_product);

later I iterate a foreach loop where I use only the products with stock:

foreach ($simpleCollection as $simple):
    if($stockItem->getIsInStock()):
        $label = $simple->getResource()->getAttribute('size')->getFrontend()->getValue($simple);
        echo $label;
    endif;
endforeach;

In the example I print the label of the attibute, but I need and use more data of the products.

The simple products remain unsorted.

I tryed:

usort($simpleCollection, function ($item1, $item2) {
    if ($item1['size'] == $item2['size']) return 0;
    return $item1['size'] < $item2['size'] ? -1 : 1;
});

But it is sorting the products by the size value, that sometimes is the same as product position but not always. So the order I get is not correct, I need the same order in the products than the size position.


texts: Custom registration fields and the difference between templates in /persistent/customer and /customer

texts:
I am trying to add custom fields to the customer create form but I am having some trouble (in Magento 1.7.2).

so, I added the custom attribute and it shows up fine on the adminhtml/customer/edit but it doesn't show on the create customer form (register) knowing that I included it in the forms for the field, and when I made it required I found out that the form controller is looking for it's value but it doesn't find it. So I figured I have to add the field manually to the template of the form.

So my first question is : is my process correct (is this the right way to do it)?

my second question is : why the registration form template is under /persistent/customer/form and not under /customer/form ? what is the difference between them ?


texts: magento2.1 paypal checkout fail when items having custom option

texts:
I found paypal failed with message "We can't place the order". This message shows after login your paypal account and redirect back to the order review page (even thought I disable it).

I'm wondering is there anyone else also having such problem? If so, what's the solution or any thread in github related to this. Thanks


texts:
I have recently moved my site to run on HTTPS and have just discovered my stock update script is no longer functioning.

The script opens a SOAP API connection but the response i'm receiving is:

Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /home/username/public_html/stockticker/processupdates.php:22 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://www.kid...', 'urn:Mage_Api_Mo...', 1, 0) #1 /home/username/public_html/stockticker/processupdates.php(22): SoapClient->__call('login', Array) #2 /home/username/public_html/stockticker/processupdates.php(22): SoapClient->login('apiusername', 'apipassword') #3 {main} thrown in /home/username/public_html/stockticker/processupdates.php on line 22

I am using mod_rewrite to force everything to HTTPS, not sure if this might of had an impact?

RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

and

Header add Strict-Transport-Security "max-age=84600; includeSubDomains"

Any idea's? I'm baffled and unfortunately this has a pretty big impact on my operations.

Thanks,


texts: UpgradeSchema not working in Magento 2.2.5?

texts:
I have make

  setup:upgrade with changing module version

here is my code:

<?php namespace Tatva\ProductImport\Setup;

  use Magento\Framework\Setup\UpgradeSchemaInterface;
  use Magento\Framework\Setup\ModuleContextInterface;
  use Magento\Framework\Setup\SchemaSetupInterface;

  class UpgradeSchema implements UpgradeSchemaInterface
      {

/**
 * {@inheritdoc}
 */
public function upgrade(
    SchemaSetupInterface $setup,
    ModuleContextInterface $context
) {
    $installer = $setup;

    $installer->startSetup();
    if (version_compare($context->getVersion(), '1.0.1', '<')) {
      $installer->getConnection()->addColumn(
            $installer->getTable('product_import_details'),
            'product_categories',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                'nullable' => true
            ]
        );
      $installer->getConnection()->addColumn(
            $installer->getTable('product_import_details'),
            'product_url',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                'nullable' => true
            ]
        );
        $installer->getConnection()->addColumn(
            $installer->getTable('product_import_details'),
            'product_download',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
                'length'=>11,
                'default'=>0,
                'nullable' => true
            ]
        )
      ;
    }
    $installer->endSetup();
 }
}


texts:
I'd like to open other website page using outer link.

For example, when I write a code like this google
it doesn't work. Just 404 page opened.

If I open google page, do I have to use another code?


texts: One click update from a beta install to production install

texts: We have a BETA site for proposed changes/updates that if approved will get moved to the PRODUCTION (LIVE) site. Is there an option/extension that will automate those changes rather than having to log and apply the same changes from BETA to LIVE manually?


texts: How to divide street address into 3 lines with label for each line and update them in checkout form for billing address

texts:
I have referred to below solution for dividing the street address into 3 lines.

For shipping form in checkout .

I have made changes for billing address below referring the above link.

   <?php
namespace Vendor\Module\Model\Checkout;

class LayoutProcessorPlugin
{
    public function afterProcess(
        \Magento\Checkout\Block\Checkout\LayoutProcessor $subject,
        array  $jsLayout
    ) {
            $jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children']
            ['payment']['children']['afterMethods']['children']['billing-address-form']['children']['form-fields']
            ['children']['street'] = [
                'component' => 'Magento_Ui/js/form/components/group',
                'required' => false, //turn false because I removed main label
                'dataScope' => 'billing-address-form.street',
                'provider' => 'checkoutProvider',
                'sortOrder' => 52,
                'type' => 'group',
                'additionalClasses' => 'street',
                'children' => [
                    [
                        'label' => __('Flat, House no., Building, Company, Apartment: '),
                        'component' => 'Magento_Ui/js/form/element/abstract',
                        'config' => [
                            'customScope' => 'billing-address-form.street',
                            'template' => 'ui/form/field',
                            'elementTmpl' => 'ui/form/element/input'
                        ],
                        'dataScope' => '0',
                        'provider' => 'checkoutProvider',
                        'validation' => ['required-entry' => true, "min_text_length" => 1, "max_text_length" => 255],
                    ],
                    [
                        'label' => __('Area, Colony, Street, Sector, Village: '),
                        'component' => 'Magento_Ui/js/form/element/abstract',
                        'config' => [
                            'customScope' => 'billing-address-form.street',
                            'template' => 'ui/form/field',
                            'elementTmpl' => 'ui/form/element/input'
                        ],
                        'dataScope' => '1',
                        'provider' => 'checkoutProvider',
                        'validation' => ['required-entry' => true, "min_text_length" => 1, "max_text_length" => 255],
                    ],
                    [
                        'label' => __('Landmark e.g. near apollo hospital: '),
                        'component' => 'Magento_Ui/js/form/element/abstract',
                        'config' => [
                            'customScope' => 'billing-address-form.street',
                            'template' => 'ui/form/field',
                            'elementTmpl' => 'ui/form/element/input'
                        ],
                        'dataScope' => '2',
                        'provider' => 'checkoutProvider',
                        'validation' => ['required-entry' => true, "min_text_length" => 1, "max_text_length" => 255],
                    ],
                ]
            ];
        }

        return $jsLayout;
    }
}

The street field gets divided into three lines with label for each but when saved the fields are not getting saved.

How can I make this working for Billing address in checkout.


texts: Adding new attribute to static block(cms/block)

texts:
Greetings StackExchange.

I'm not quite sure whether this has been answered before or not. I have done a fair amount of blog / thread searching on this problem/topic.

Is there a way to add a custom attribute to Static Blocks? For example it is possible via. the backend to create a new attribute and add it to a attribute set for products. For categories it has to be done with a small module, a install script and so on.

I have not come across a way of doing this to either of CMS pages or static blocks.

Can somebody help me getting in the right direction?

WHAT I WANT:
A dropdown value/attribute for each unique static block, eg "Include, Exclude, Ignore", in the same area as "Status".


texts:
To alter product price before displaying on frontend we can use Plugin afterGetPrice() same for Name afterGetName and so on for default product attributes.

Is there any way to perform same for any custom product attribute?


texts: Magento 2 Index Controller - Display customer, product details on Custom Module

texts:
I have created the Custom module and also its Index controller file named Index.php in app/code/Companyname/Modulename/Controller/Index directory.

In that Index.php file, I have already added my custom function. Along with that I need to get Customer, Product, Sales, etc,. details in that index contoller.

How to display the customer, product, sales, etc details in my Custom module's Index controller file on Magento 2?

Here is my Index contoller Index.php

<?php

namespace Companyname/Modulename/Controller/Index;

use Magento\Framework\App\Action\Context;

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

     public function myAction()
    {

            /*
           My CODE
        */

    }

}

Any help appreciated.


texts:
While Save Product I got Error. I don't know what is the problem suddenly it happen

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
  '16963-1' for key
  'UNQ_CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID', query was:
  INSERT INTO cataloginventory_stock_item (product_id, stock_id,
  qty, use_config_min_qty, is_qty_decimal,
  use_config_backorders, use_config_min_sale_qty,
  use_config_max_sale_qty, is_in_stock, low_stock_date,
  use_config_notify_stock_qty, use_config_manage_stock,
  stock_status_changed_auto, use_config_qty_increments,
  use_config_enable_qty_inc, is_decimal_divided) VALUES (?, ?, ?, ?,
  ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)


texts: Removing Tax Computation and Tax Labels on a condition

texts:
When the company tax status is tax exempt
I want this to happen.
In the cart and checkout pages, and invoices:

Remove the “incl. tax” items from the totals.
Remove the “excl. tax” tags on remaining totals.
Do not calculate tax on shipping cost.
Do not calculate tax in order total.

Any help would be appreciated..


texts: Magento 2 Video's not showing with images on product detail page when enable zoom for product

texts: Video Not showing on product detail page when enabling zoom option from amasty color swatches please help for this.


texts: Add product to cart from third party and view products added in cart

texts: Can I add products to my cart using Magento API and when I view cart, I should find that products listed in cart. I am using Magento 2.2?


texts: how to truncate eav_attribute_option_value table in magento 2

texts: I have a shop where some customer information is in the eav_attribute_option_value-table. now I want to truncate this table


texts:
I am trying to create a new directory in /pub/media/import folder. Creating a directory works with mkdir() but I'm having issues with folder persmission rights.

How would I create a directory with Magento\Framework\Filesystem?

My current code:

private function createImagesDir()
{
    if ( ! file_exists($this->directoryList->getPath('media').'/import/images')) {
        mkdir($this->directoryList->getPath('media').'/import/images','775', true);
    }
}


texts: Problem with users and sessions on Magento frontend

texts:
I have a problem that is driving me crazy , I'm completely lost. With my limited knowledge I think is a problem of sessions, but really have no idea how to approach it. This is the problem:

Users can not enter their accounts through the frontend. When they try to sign in, the page just refreshes but not enter, on your own account or through Facebook . The system will not show any errors or anything , just do not walk , so the reaction is the same when you put the correct data or when you put the wrong key on purpose , just refresh and nothing else.
If you create a new user you can get in, but if you come back later you can not enter anymore, you'd have to go create a new user again.

Now comes the strangest :
If is given the case you are a new user, you have created an account and get to order , such order appears in the admin with a dummy user that I created a few days ago . That is, last clients, each one different , besides not receive any order confirmation email , their orders appear to me on the panel with my dummy user data , only the email of the client is correct, although them of course when ordering have entered their data. I have to say that I removed yesterday the dummy user but still appears.


texts: Reindexing option not available in magento 2.0

texts:
I applied some product catalog rules and deleted them but site still shows the discount.

I also clicked on apply filter but nothing happened.

Prior to 2.0, I was able to do it from the admin panel. 2.0 has only two options under System > Index Management

Options are:

Update on save
Update by schedule

All of my indexes need reindexing, as I can see the message "Reindex Required".


texts:
Is there any way, we could restore a Purchase Order that was accidentally deleted?
when I was editing the organizer tab of a specific purchase order, I was supposed to delete the task but I clicked the delete for the Purchase order instead.


texts:
Can  I use two CMS Magento and WordPress in One Site
I want to crate a site in Magento But i want to write this blog on Wordpress and i just want to connect wordpress to Magento. is there any way to this please let me know. Thanks !


texts:
Having hit a possible bug in Magento 2.0.2 I wanted to download the develop branch and see if it had been fixed. I pulled this down and ran composer install. It removed all the magento community packages and now Magento 2 says it is missing classes. As well it might.

Looking in the composer.json currently in the develop branch, unlike the released versions it has no entry for magento/product-community-edition - instead it has a bunch of supporting libraries and all the magento packages in a "replace" section. I'm supposing this is so that forked version of the packages can be worked on. But I have no idea how to get to that point.

I cannot find any documentation anywhere for how to get hold of the missing libraries - do I add the magento/product-community-edition line back in with dev-master as the version? Or do I manually download the packages and put them somewhere? Where?


texts:
I managed to migrate magento 1 to new magento 2.2.5
When I reindex for the first time I get in indexer

  Category Products

[2019-02-07 21:58:57] main.CRITICAL: Warning: PDOStatement::execute(): MySQL server has gone away in /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228 {"exception":"[object] (Exception(code: 0): Warning: PDOStatement::execute(): MySQL server has gone away in /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228 at /var/www/html/vendor/magento/framework/App/ErrorHandler.php:61)"} []

  mysql.conf settings are:

[mysqld]
#
# * Basic Settings
#
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address            = localhost
#
# * Fine Tuning
#
key_buffer_size         = 512M
max_allowed_packet      = 1024M
thread_stack            = 192K
thread_cache_size       = 256
connect_timeout=320 # default 10
table_open_cache = 4096
table_definition_cache  = 4096
sort_buffer_size        = 16M
max_heap_table_size     = 512M
tmp_table_size          = 512M
interactive_timeout     = 3600
max_connections         = 400
max_connect_errors      = 1000000
skip_name_resolve
#skip_secure_auth
wait_timeout            = 28800
innodb_buffer_pool_size = 2G
myisam_sort_buffer_size = 128M
innodb_log_file_size    = 256M
innodb_thread_concurrency  = 18
innodb_flush_log_at_trx_commit       = 2
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover-options  = BACKUP
#max_connections        = 100
#table_open_cache       = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit       = 1M
query_cache_size        = 64M
query_cache_type        = 1

Tried to increase the limits in mysql with no luck.
Any suggestions please?


texts: Show Upsell Product in product detail page

texts:
i would like to show only the upsell products in product detail page, the issue is when i hide the upsell from Catalog and Search also it hide from product detail page, how i can show the update only in product details page?

Thank you

Magento ver. 2.0.10


texts: Magento 2 - Best practice for extending customer entity

texts:
I'm looking for the best practice for extending the customer entity.
I want to add some custom fields (user_name, company_infos, etc.) and I don't know if it's better to extend the customer entity with the new attributes or creating a new table to store the additional data. The goal is to visualize the custom data on the product detail page.
So what do you think, which is better the solution to get the best performance?

Thanks.

Marco

Update:
I followed the hints below, but the extension Attribute won't be saved.
Do you have any suggestions to solve it?

I created an extension_attributes.xml file:

<config>
    <extension_attributes for="Magento\Customer\Api\Data\CustomerInterface">
        <attribute code="user_name" type="string">
           <join reference_table="customer_extension" reference_field="customer_id" join_on_field="entity_id">
              <field>user_name</field>
           </join>
        </attribute>
    </extension_attributes>
</config>

And an Observer which is registered on the "customer_register_success" event:

<?php
namespace My\Module\Observer;

use Magento\Framework\Event\ObserverInterface;

class AfterCustomerSaveObserver implements ObserverInterface {

    protected $_logger;
    protected $_customerExtensionFactory;
    protected $_customerRepository;

    public function __construct(
            \Psr\Log\LoggerInterface $logger, //log injection
            \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository,
            \Magento\Customer\Api\Data\CustomerExtensionFactory $customerExtensionFactory
    ) {

        $this->_logger = $logger;

        $this->_logger->addDebug('AfterCustomerSaveObserver_Constructor_Begin');

        $this->_customerRepository = $customerRepository;
        $this->_customerExtensionFactory = $customerExtensionFactory;

        $this->_logger->addDebug('AfterCustomerSaveObserver_Constructor_End');
    }

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

        $this->_logger->addDebug('AfterCustomerSaveObserver_Execute_Begin');

/*      try { */

            $event = $observer->getEvent();
            $customer = $event->getCustomer();

            $customerExtension = $customer->getExtensionAttributes();
            if ($customerExtension === null) {
                $customerExtension = $this->_customerExtensionFactory->create();
            }
            $customerExtension->setUserName("Test123");
            $customer->setExtensionAttributes($customerExtension);

            $this->_customerRepository->save($customer);
            //$customer->save();

/*      } catch (\Exception $e) {
            $this->_logger->critical($e);
        } */

        $this->_logger->addDebug('AfterCustomerSaveObserver_Execute_Begin');
    }

}


texts:
I have a multi-seller marketplace built on magento. I need to offer discounts on the site such that:

Only registered users can avail the discount
Discount amount has an upper limit (e.g. 10% off cart value but a max discount of $100 only) that I can define

Do you think there is a plugin that addresses these requirements?


texts: Custom options not loading after saving the product in admin - Magento 2.1.7

texts:
I tried creating few custom options for a product. A field type and dropdown type. After saving the product getting a javascript error in the console as shown in the screenshot

data.forEach is not a function.

If I keep the field type option at last, then no javascript error. If it is kept as the first option, then experiencing this error.

It is a core issue and I found a solution here https://github.com/magento/magento2/issues/10321. But I want to know how to override this file using the custom module instead of changing the core file.

File Path to override: vendor\magento\module-ui\view\base\web\js\dynamic-rows\dynamic-rows-grid.js

I tried this solution with both adminhtml and base as path but it didn't work.

Create a file at below location,

Custom/Modulename/view/adminhtml/requirejs-config.js

    var config = {
    map: {
        '*': {
            "Magento_Ui/js/dynamic-rows/dynamic-rows-grid": 'Custom_Modulename/js/dynamic-rows/dynamic-rows-grid'
        }
    }
};

create a file at location,

Custom/Modulename/view/adminhtml/web/js/dynamic-rows/dynamic-rows-grid.js

Copy content from core file to your custom file and run these commands.

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush


texts: I cannot change Page Wrapper with ann way

texts:
I will start with a strange problem that I cannot find its solution for a week.

In my template, there are a lot of kind of headers. In the most of them there is a problem.

They have a line in top in which there is the text "Free Shipping On Orders Over $59".

I try to find the phtml file of header an I find this part:

<div class="header-panel <?php echo ($full_header_width == 1 ? 'full_header_width' : 'container')?>">

        <?php echo $this->getChildHtml("top.contact"); ?>
        <?php echo $this->getChildHtml("currency"); ?>
        <?php echo $this->getChildHtml("store_language"); ?>

The problem come from the top.contact.

Is there anyone that can help me changing this?

Thanks a lot.


texts: Magento upgrade from 2.3 to 2.3.1 via CLI error

texts:
Getting following error while compilation.

In Generator.php line 218:

  Source class "\Magento\Elasticsearch6\Model\Adapter\FieldMapper\ProductField" for "Magento\Elasticsearch6\Model\Adapter\FieldMapper\P
  roductFieldMapper" generation does not exist.


texts:
In our project 04 different developers have each own environments (Dev, Prod) in Localhost. And we have also 02 Environments in Server (Dev + Prod). My question is:

1-  When 02 developers work in the same time with Theme, and want to deploy into server. How could they synchronize their database to obtain the only database to deploy.?

2- How could we using Upgrade files of Magento to synchronize different database when deploying into server ?


texts: Adding tracking pixel on multistore per domain?

texts:
Im trying to add Facebook custom audience pixel on magento. Directions state to add to head file. Oiginally I added to /isolatorfitness.eu/html/app/design/frontend/base/default/template/page/html BUT it applying to all stores. Does any one know what file I need to add each code to, to apply to all stores with seperate domains. Right now we have our main Europe store that has the tracking pixel but Germany and Uk stores need there own code under there own domain.

Thank you


texts: Magento 2 Check if a Variable contains JSON encoded code or not?

texts:
I have a variable $image, Sometimes it containes JSON Encoded value and sometimes it is not.
What I need?
If $image doesn't have JSON encoded data, I want to do my custom code.

I am trying this:

public function isJSON($string){
    return is_string($string) && is_array($this->jsonHelper->jsonDecode($string, true)) && (json_last_error() == JSON_ERROR_NONE) ? true : false;
}

if(!isJSON($image)){
   $decode_image = $image;
}

But it is not working, Please help me.


texts: Magento 2: Error with ElasticSearch after upgrading from 2.2.5 to 2.3.4

texts:
I just recently upgraded a Magento project from 2.2.5 to 2.3.4, went in the Catalog Search configuration to change to use Elastic Search 6, tested connection successfully. However when trying to run reindex

bin/magento indexer:reindex catalogsearch_fulltext

I got this error:

Undefined index: elasticsearch6 in /app/vendor/magento/module-elasticsearch/Elasticsearch5/Model/Adapter/FieldMapper/ProductFieldMapperProxy.php on line 44

Does anyone know how to resolve this? Why is it trying to call from Elasticsearch5 module?


texts: How to store custom data against a product

texts:
I have a bunch of data I need to store against a product when importing from another system. These can be things like Arm Length, SomeOther Property.

What is the best way to store this information in Magento based on the fact I need to:

Be able to update the values regularly (the products will be re-imported to update them).
Be able to see the values in the product section in Magento.

Initially I tried creating a group called My Options against the default Attribute Set and adding each of my options as an attribute against that group however, if I need to add more attributes to a product, adding them to the My Options section in the Default set doesn't add them to the existing product.

Can anyone offer some advice please?


texts: Consumer is not authorized to access %resources self

texts:
I am bulding a mobile app and I know there are a lot of these questions and I went trough them all, but i still got this problem (Using Magento 2.2.2). I tried with curl, postman, hurl.it and i get this message

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

This is my request (Postman)

GET /rest/V1/customers/me HTTP/1.1
Host: myshop.dev
Authorization: Bearer grw5y9b3se261541evcdl1js8jd27c8f
Cache-Control: no-cache

What i did so far:

I did put space on Bearer grw5y9b3se261541evcdl1js8jd27c8f
Checked everything multiple times (letter by letter)

Further explanation:

This is a new installation of Magento with sample data.
I have read the documentation here http://devdocs.magento.com/guides/v2.0/get-started/authentication/gs-authentication-token.html , and i am doing it using Customer access tokens. (Since i am doing a mobile app i chose this way) I also registered/created a customer and with his email / password i am doing the following:

(Curl example)

  curl -X POST "http://myshop.dev/rest/V1/integration/customer/token"
       -H "Content-Type:application/json"
       -d "{"username":"customer1@example.com", "password":"customer1pw"}"

and that returns me token, with it i am trying to do a request (see Postman request) to see user data, but with no success. Am i missing something here? Something in apache, php? or am i doing something wrong.

EDIT

Since nothing worked I deleted Magento and did a fresh installation again, and now it works, I didn't do anything different than before, and that is very confusing.


texts: Magento 2 PayPal Express button visible & works, but PP payment option not visible on OPC

texts:
As topic states, the PayPal Express button is visible on both minicart and
cart pages. The button works just fine.

On the checkout page, however, there is no PayPal option.

Settings are as follows:

Enable PayPal Guest Checkout: No
Require Customer's Billing Address: No
Billing Agreement Signup: Never
Skip Order Review Step: Yes

magento_paypal is enabled
magento_payment is enabled

Nothing present in debug.log, exception.log, or system.log, error console to indicate a problem.

No modules have been installed that would modify or interfere with PayPal.

It has worked in the past. The problem first showed up when I changed Transfer Shipping Options to Yes then back to No again.

I've tried clearing my local browser cache, deleting cookies, reentering PayPal credentials. On the server setup di:compile, setup:deploy-static-content, setup:upgrade, disabling and reenabling magento_paypal and so far nothing has fixed.

My staging server, with near-identical PayPal express settings works just fine. The only difference on that server is it uses Sandbox credentials. Any ideas?

CE Magento 2.1.8 running Apache 2.4.18 on Ubuntu 16.04, php 7.0.22


texts: Address Validation in checkout page in Magento 2

texts:
I want to validate street address line 1 & 2 with maximum 40 character and without special character. I am using below code for this but it's not working for me.

etc/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">

      <type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
        <plugin name="add-street-field"  type="X\Y\Model\Checkout\LayoutProcessorPlugin" sortOrder="1"/>
    </type>
</config>

Model\Checkout\LayoutProcessorPlugin.php

public function afterProcess(
    \Magento\Checkout\Block\Checkout\LayoutProcessor $subject, array $jsLayout
    ) {

        $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
        ['billingAddress']['children']['shipping-address-fieldset']['children']['street'] = [
            'component' => 'Magento_Ui/js/form/components/group',
            'label' => __('Street Address Custom Validation'),
            'required' => true,
            'dataScope' => 'billingAddress.street',
            'provider' => 'checkoutProvider',
            'sortOrder' => 10,
            'type' => 'group',
            'additionalClasses' => 'street',
            'children' => [
                [
                    'component' => 'Magento_Ui/js/form/element/abstract',
                    'config' => [
                        'customScope' => 'billingAddress',
                        'template' => 'ui/form/field',
                        'elementTmpl' => 'ui/form/element/input'
                    ],
                    'dataScope' => '0',
                    'provider' => 'checkoutProvider',
                    'validation' => ['required-entry validate-alphanum-with-spaces' => true, "min_text_length" => 5, "max_text_length" =>20],
                ],
                [
                    'component' => 'Magento_Ui/js/form/element/abstract',
                    'config' => [
                        'customScope' => 'shippingAddress',
                        'template' => 'ui/form/field',
                        'elementTmpl' => 'ui/form/element/input'
                    ],
                    'dataScope' => '1',
                    'provider' => 'checkoutProvider',
                    'validation' => ['required-entry validate-alphanum-with-spaces' => true, "min_text_length" => 5, "max_text_length" =>20],
                ]
            ]
        ];
                return $jsLayout;
    }

After added this code flush cache and refresh page but this code did not work for me. Anyone can help?

Thanks for support in advance.


texts: 6788 patch - page not found error in admin

texts:
After installing the 6788 patch,I get page not found error in admin custom module.my adminhtml.xml likes this

    <config>
    <menu>
        <sales>
            <children>
                <camshiprestriction translate="title" module="camshiprestriction">
                    <title>Ship Restrictions</title>
                    <sort_order>700</sort_order>
                    <action>adminhtml/camshiprestriction_rule</action>
                </camshiprestriction>
            </children>
        </sales>
    </menu>

config.xml file

          <admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <camshiprestriction before="Mage_Adminhtml">Ami_Shiprestriction_Adminhtml</camshiprestriction>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

<adminhtml>
    <menu>
        <sales>
            <children>
                <camshiprestriction translate="title" module="camshiprestriction">
                    <title>Shipping Restrictions</title>
                    <sort_order>700</sort_order>
                    <action>adminhtml/camshiprestriction_rule</action>
                </camshiprestriction>
            </children>
        </sales>
    </menu>

how to solve it


texts: Google Content Experiments and A/B Testing Strategies

texts:
We are wanting to start implementing A/B testing on various areas of sites. This may range from design/template changes to configuration settings. Most of the time, it's going to be tracking what impact a change has on conversion rates. Particularly we wanted to use Google Content Experiments to track this.

I haven't had much experience doing it before, so I'm interested in how we'd go about implementing the code and the best strategies for testing (I understood you can only accurately test changes in isolation). For example, on a template change do we make all of the changes in one template and show/hide what's necessary or should we be setting it at a higher level before the rendering happens?

Thanks for any help in advance.


texts: Magento 2: How can display Name of Tax Rule on product page

texts:
I create two tax rule name rule1 and disability tax ,check below images

Now I want to display these two tax rule names on the product page. any help will be appreciated.


texts: Magento custom attribute for shipping address not saving to sales order grid in magento2

texts:
I have added a custom field in checkout page shipping address, it is saving in the database, but not displaying sales orders admin section in magento2.
but it is saving to billing address section.

Can anyone help me how to resolve this?

Please find the screenshot below:

enter link description here

Thanks


texts: installschema wont create table even though it is being called magento 2

texts:
I had created a sample module when I tried to create table I knew I have to delete the entry from my setup_module table or else the install schema wont run so.

DELETE from setup_module where module='Mastering_SampleModule'

After that I performed
sudo bin/magento setup:upgrade;

Everthing runs fine, the module is being created again in the setup_module table as I check from

select * from setup_module WHERE module= 'Mastering_SampleModule'

but the table is not being created .

on trying to introduce error in installschema class and then running sudo bin/magento setup:upgrade the error is shown in the console according to error introduced and it is irrelevant. But table is not being created as expected if I run

sudo bin/magento setup:upgrade;

 command without any errors.

<?php

namespace Mastering\SampleModule\Setup ;

use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\DB\Ddl\Table;

class InstallSchema implements InstallSchemaInterface
{

        public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
        {
            $setup->startSetup();

            $table = $setup->getConnection()
                ->newTable($setup->getTable('mastering_sample_item)'))
                ->addColumn(
                    'id',
                    Table::TYPE_INTEGER,
                    null,
                    ['identity'=>true,'nullable'=>false,'primary'=>true],
                    'Table Id'
                )->addColumn(
                    'name',
                    Table::TYPE_TEXT,
                    255,
                    ['nullable'=>false],
                    'Table Name'

                )->addIndex(
                    $setup->getIdxName('mastering_sample_item',['name']),
                    ['name']

                )->setComment(
                    'Sample Items'
                );

            $setup->getConnection()->createTable($table);
            $setup->endSetup();
        }
    }

I think there is any error in my install method , can someone tell me how to debug installschema and upgrade schema classes?


texts: USPS priority and express options not showing up

texts:
This is a really odd scenario I have going on here. If I checkout with 1 or 2 items in my cart First Class Mail Parcel shows up as an option. If I check out with more than 2 items (each item is btwn .3 to .4 lbs) then the only USPS option disappears.
I cannot get any kind of Priority or Express to show up for any item regardless of count.

Any ideas of what's going on here?


texts: Magento2 store switcher not working when enable the add stores codes

texts:
magento2 store switcher not working when enable the Add Store Code to Urls in configuration.

Thanks


texts: Magento override customer address controller not working

texts:
I am trying to override customer address controller but its't overrides

Config.xml

<frontend>
    <routers>
        <salesperson>
            <use>standard</use>
            <args>
                <module>VestricsB2B_Salesperson</module>
                <frontName>salesperson</frontName>
            </args>
            <!--<args>
                <modules>
                    <general before="Mage_Customer">VestricsB2B_Salesperson</general>
                </modules>
            </args>-->
        </salesperson>

        <customer>
            <args>
                <modules>
                    <general before="Mage_Customer">VestricsB2B_Salesperson</general>
                </modules>
            </args>
        </customer>
    </routers>

    <layout>
        <updates>
            <salesperson>
                <file>salesperson.xml</file>
            </salesperson>
        </updates>
    </layout>
</frontend>

AccountController.php

 require_once(Mage::getModuleDir('controllers','Mage_Customer').DS.'AddressController.php');
class VestricsB2B_Salesperson_AddressController extends Mage_Customer_AddressController {

    public function createPostAction(){
        echo "override"; exit;
    }
}


texts:
I'm looking for a solution to the following scenario:

My store sells shirts that vary in size and color, like most clothing stores.
The twist: a shirt can come with a school logo printed on it.
There should be a category for each school, that contains all shirts with the school's logo on them.

A simple setup for #1 is to add the shirts as configurable products, and upload images (without the logos) to the associated simple products. But I can't think of a way to achieve #2 & #3 - add in the product images with the logos and display them in different school categories.

How is it done?

Is there such a thing as configurable configurable products?


texts:
i need to return the response of custom web api as JSON.

i need it to be like this:

{
  "data": [
    {
      "id": "1",
      "name": "Tiger Nixon",
      "position": "System Architect",
      "salary": "$320,800",
      "start_date": "2011/04/25",
      "office": "Edinburgh",
      "extn": "5421"
    },
    {
      "id": "2",
      "name": "Garrett Winters",
      "position": "Accountant",
      "salary": "$170,750",
      "start_date": "2011/07/25",
      "office": "Tokyo",
      "extn": "8422"
    }
  ]
}

however, my module is coming out as

[
    {
      "id": "1",
      "name": "Tiger Nixon",
      "position": "System Architect",
      "salary": "$320,800",
      "start_date": "2011/04/25",
      "office": "Edinburgh",
      "extn": "5421"
    },
    {
      "id": "2",
      "name": "Garrett Winters",
      "position": "Accountant",
      "salary": "$170,750",
      "start_date": "2011/07/25",
      "office": "Tokyo",
      "extn": "8422"
    }
]

My Interface is as follows:

<?php
namespace Mag\Rest\Api;

interface OrdersManagementInterface
{
  /**
   * GET for Stock api
   * @param mixed $items
   * @return string
   */
  public function getOrders();

}

My model is as follows:

<?php
namespace Mag\Rest\Model;

use \stdClass;

/**
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 * @SuppressWarnings(PHPMD.TooManyFields)
 */

class OrdersManagement
{
    protected $connection;

    public function __construct(
    ) {
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $configLoader = $objectManager->get("\Magento\Framework\ObjectManager\ConfigLoaderInterface");
        $objectManager->configure($configLoader->load('frontend'));
        $this->connection = $objectManager->get('Magento\Framework\App\ResourceConnection')->getConnection();
    }

    /**
     * {@inheritdoc}
     */
    public function getDelayedOrders()
    {
        $sql = "Select *  FROM custom_order";
        $results = $this->connection->fetchAll($sql);
        return $results ;
    }
}


texts: Create Magento product that redirect to an external website

texts:
Hello any one can help me i will be very thankful to you....i want to add a product that is not held on my magento website only show on my website...but when customer click on product directly goes to the website that hold the product.
i want to give url to the product..how can i do...please help me thanks again..
here is some screen shot that show what actually what i want to do....

http://i.stack.imgur.com/VDaQt.png


texts: How to create Filter for custom field in Sale Order Grid magento 2

texts:
This is my grid sale order grid have custom field Ready To Ship

This is my error

Because Ready ship not in database. I just check condition to return Yes/No

Now, how can filter custom field Ready To Ship


texts: How to remove or hide swatches for specific products?

texts:
Some of our products are available in a range of colors and sizes, and other products are only available in one color and one size.

For example:

A t-shirt might be available in red and blue, sizes XS-XXL (Configurable with multiple simple products)
A scarf is available in white only, and in one size only (Configurable with one simple product)
A one-off membership is offered (Configurable with one virtual product)

We use swatches for the selection of sizes and colors in the frontend. The swatches are also shown for those products which are available in only one size and color; the customer is forced to select a color and size.

How can I hide swatches for products that are available in only one size and color, and ensure that the customer can add them into the shopping cart without any disruptions?


texts: Get Payment Method used in order in totals.phtml

texts:
i'm using Magento 1.9.0.1 and i want to get the used order payment method in the totals.phtml

Here is what i have in: totals.phtml:

<?php foreach ($this->getTotals() as $_code => $_total): ?>
    <?php if ($_total->getBlockName()): ?>
        <?php echo $this->getChildHtml($_total->getBlockName(), false); ?>
    <?php else:?>
    <tr class="<?php echo $_code?>">
        <td <?php echo $this->getLabelProperties()?>>
            <?php if ($_total->getStrong()):?>
            <?php echo $this->escapeHtml($_total->getLabel());?>
            <?php else:?>
            <?php echo $this->escapeHtml($_total->getLabel());?>
            <?php endif?>

        <td <?php echo $this->getValueProperties()?>>
            <?php if ($_total->getStrong()):?>
            <?php echo $this->formatValue($_total) ?>
            <?php else:?>
            <?php echo $this->formatValue($_total) ?>
            <?php endif?>

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

I want to get a simple echo with the the payment method like <?PHP echo $PaymentMethod; ?>

How can i get the payment method used for the order ?


texts:
I want to override Mage_Catalog_Model_Config.

app/code/local/Myname/Catalog/etc/config.xml

<?xml version="1.0"?>

<config>
    <modules>
        <Myname_Catalog>
            <version>0.1.0</version>
        </Myname_Catalog>
    </modules>

    <global>
        <models>
            <catalog>
                <rewrite>
                    <config>Myname_Catalog_Model_Config</config>
                </rewrite>
            </catalog>
        </models>
    </global>
</config>

app/etc/modules/Myname_Catalog.xml

<?xml version="1.0"?>

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

Why on Earth is this not working??


texts:
I'm using MSI for inventory management.

I've imports products and by default Magento assigned default stock to every products.

So I need to reassign products to my custom created stock that is under Stores->Configurations->stocks

I've created new stock from above and assigned my sources to it.

Than after I've imported sources using default import/export functions.

After than product updated as per data provided.

But issue I'm facing is after I import sources then previously assigned stock and sources information is still there and displays at product grid as well as in product form.

Can anybody have solution to this ? In short I want to remove old stock which is currently out-of-stock ?

Any hack/workaround will also work. Thanks


texts: catalog_category_view.xml - Layout file not working

texts:
I have created a catalog_category_view.xml file:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="breadcrumbs" remove="true"/>
        <referenceBlock name="page.main.title" remove="true"/>
    </body>
</page>

and placed it in

app/design/frontend/Company/theme/Magento_Catalog/layout/catalog_category_view.xml

or

app/design/frontend/Company/theme/Magento_Theme/layout/catalog_category_view.xml

In both cases, the layout file has no effect on category page. BUT Placing the same code in app/design/frontend/Company/theme/Magento_Theme/layout/dafault.xml works ok.

Any ideas? Am I missing something here?


texts: Show product discount in percentage Magento 2.1

texts:
Is it possible to display discount percentage in Magento 2.1 as referred to in the thread below? (This is for older versions)

I tried to install the "Display discount" extension from the Mage Extensions Shop, but the extension just causes my entire Configuration section to freeze. Also I spent the entire afternoon searching on Google, but nothing really helpful..

I'm on a tight schedule and working with Magento 2.1 CE.

Any suggestion is welcome!

Show product discount percent in Magento


texts: how to change custom attribute value before save it

texts:
I need to change custom attribute added by admin before saving it.

use Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Filesystem;
use Magento\MediaStorage\Model\File\Uploader;
use Magento\MediaStorage\Model\File\UploaderFactory;
use Psr\Log\LoggerInterface;

class MyClass extends AbstractBackend{
public function beforeSave($object)
{
    $object->setData($changedValue);

    return parent::beforeSave($object);
}
}

but that doesn't work


texts: Upgrade to 2.1 breaks grunt theme fallback?

texts:
Since the upgrade to 2.1 I get the following error on grunt exec:mytheme:

$ grunt exec:mytheme
Running "exec:mytheme" (exec) task
Running "clean:mytheme" (clean) task
>> 231 paths cleaned.

Done, without errors.

Execution Time (2016-06-27 18:20:12 UTC)
loading tasks                217ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 70%
loading grunt-contrib-clean    4ms  ▇ 1%
clean:mytheme             88ms  ▇▇▇▇▇▇▇▇▇▇ 28%
Total 312ms

Processed Area: frontend, Locale: de_DE, Theme: Mytheme/default, File type: less.
>> [InvalidArgumentException]
>>   Verify entered values of the argument and options. Unable to get content for 'frontend/Mytheme/default/de_DE/Magento_Theme/css/source/module/_collapsible_navigation.less'
>> dev:source-theme:deploy [--type="..."] [--locale="..."] [--area="..."] [--theme="..."] [file1] ... [fileN]
>> Exited with code: 1.
Warning: Task "exec:mytheme" failed. Use --force to continue.

Aborted due to warnings.

Execution Time (2016-06-27 18:20:11 UTC)
loading tasks     281ms  ▇▇▇▇▇▇▇▇ 5%
exec:mytheme   5.7s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 95%
Total 6s

I did not overwrite _collapsible_navigation.less.

This is my themes.js for grunt:

'use strict';

/**
 * Define Themes
 *
 * area: area, one of (frontend|adminhtml|doc),
 * name: theme name in format Vendor/theme-name,
 * locale: locale,
 * files: [
 * 'css/styles-m',
 * 'css/styles-l'
 * ],
 * dsl: dynamic stylesheet language (less|sass)
 *
 */
module.exports = {
      blank: {
          area: 'frontend',
          name: 'Magento/blank',
          locale: 'en_US',
          files: [
              'css/styles-m',
              'css/styles-l',
              'css/email',
              'css/email-inline'
          ],
          dsl: 'less'
      },
      luma: {
          area: 'frontend',
          name: 'Magento/luma',
          locale: 'en_US',
          files: [
              'css/styles-m',
              'css/styles-l'
          ],
          dsl: 'less'
      },
      backend: {
          area: 'adminhtml',
          name: 'Magento/backend',
          locale: 'en_US',
          files: [
              'css/styles-old',
              'css/styles'
          ],
          dsl: 'less'
      },
      mytheme: {
          area: 'frontend',
          name: 'Mytheme/default',
          locale: 'de_DE',
          files: [
              'css/styles-m',
              'css/styles-l'
          ],
          dsl: 'less'
      }
};

Edit

There is a @import 'module/_collapsible_navigation.less'; in app/design/frontend/Mytheme/default/Magento_Theme/web/css/source/_module.less and I did not copy the _collapsible_navigation.less - but I think it should be loaded via the fallback system from Luma (as it was before the upgrade).

If I copy the module/_collapsible_navigation.less to my theme, it works.

Is this intended?


texts: I have enabled JavaScript Bundling after that If i am changing in any JS codes it's not reflected on frontend in Magento 2

texts:
I am trying to update the JS code on the frontend of my website.

I made changes in the checkout page JS files. After changing code, I ran all relevant commands.

1. php bin/magento setup:static-content:deploy ar_SA en_GB en_US
2. after running this command running - php bin/magento cache: clean & flush
3. after that putting permission 777.

Codes are updating in required js file of pub/static folder but not in frontend browser.

I have enabled  JavaScript Bundling. I think it's causing me. anyone can help me regarding this.

I am using Ngnix and Redis Cache.

Thanks in advance for your support.


texts:
I am new for Google Analytics.I have read about this.But I can not get solution of my query.

Please help me on that.

My query is, suppose I have 3 customers on my store and they can upload their products from their own dashboard.Now I want to display a graph/chart on these 3 customer's dashboard for visitors who visits that particular customer's product.

So how can be done ?


texts:
I used others post but not working, My currently problem is that I cannot seem.

how can i upload and use SVG file in magento 2.3? please help.


texts:
i added tax rule in my store but the issue is my exl price and incl price showing same in magento2.3.3 what is the bug.

£210.00
£210.00 Exlude tax


texts: Magento2.3: How to fix Undefined variable issue?

texts:
We are facing issues from the custom module which we have done for EMI calculator. The issue is when we try to load the category page from the megamenu, its throwing the below error:

1 exception(s):
Exception #0 (Exception): Notice: Undefined variable: productprice in /var/www/html/app/code/Butterfly/Emi/Block/Index/Index.php on line 52

Below is the code:

<?php

namespace Butterfly\Emi\Block\Index;

class Index extends \Magento\Framework\View\Element\Template
{

    protected $_registry;
    protected $_categoryFactory;

    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Catalog\Model\CategoryFactory $categoryFactory,
        array $data = []
    )
    {
        $this->_registry = $registry;
        $this->_categoryFactory = $categoryFactory;
        parent::__construct($context, $data);
    }

    public function getCurrentCategory()
    {
        return $this->_registry->registry('current_category');
    }

    public function getCategory($categoryId)
{
    $category = $this->_categoryFactory->create();
    $category->load($categoryId);
    return $category;
}

public function getMinDownpayment($categoryId)
{

    $products = $this->getCategory($categoryId)->getProductCollection();
    $products->addAttributeToSelect('downpayment')
   ->addAttributeToSort('downpayment', 'asc')
   ->setPage(1, 1);
   // $products->addAttributeToSelect('*');
   if($products){
    foreach($products as $productprice){
        $productprice=$productprice['downpayment'];
    }
   }else{
    $productprice=0;
   }
    return $productprice;
}
public function getMaxDownpayment($categoryId)
{

    $products = $this->getCategory($categoryId)->getProductCollection();
    $products->addAttributeToSelect('downpayment')
   ->addAttributeToSort('downpayment', 'desc')
   ->setPage(1, 1);
   // $products->addAttributeToSelect('*');

      if($products){
    foreach($products as $productprice){
        $productprice=$productprice['downpayment'];
    }
   }else{
    $productprice=0;
   }
    return $productprice;
}
public function getMinInstallment($categoryId)
{

    $products = $this->getCategory($categoryId)->getProductCollection();
    $products->addAttributeToSelect('monthlyinstallment')
   ->addAttributeToSort('monthlyinstallment', 'asc')
   //->getFirstItem()
   ->setPage(1, 1);
      if($products){
    foreach($products as $productprice){
        $productprice=$productprice['monthlyinstallment'];
    }
   }else{
    $productprice=0;
   }
    return $productprice;
}
public function getMaxInstallment($categoryId)
{

    $products = $this->getCategory($categoryId)->getProductCollection();
    $products->addAttributeToSelect('monthlyinstallment')
   ->addAttributeToSort('monthlyinstallment', 'desc')
   //->getFirstItem()
   ->setPage(1, 1);
      if($products){
    foreach($products as $productprice){
        $productprice=$productprice['monthlyinstallment'];
    }
   }else{
    $productprice=0;
   }
    return $productprice;
}

public function getProductlist($categoryId,$downpayment,$monthlyinstallment)
{

    $hireprice= $downpayment + ($monthlyinstallment*18);
    $products = $this->getCategory($categoryId)->getProductCollection();
    $products->addAttributeToSelect('*')
    ->addAttributeToFilter('hireprice',array('lt'=>$hireprice))
   ->addAttributeToSort('hireprice', 'asc');
   //->setPage(1, 1);
   // $products->addAttributeToSelect('*');

    return $products;
}

}

Any help will be appreciated!


texts: Magento 1.9.1.0 catalog price rules and new product issue

texts:
A friend asked me to help him to understand an issue on his magento.
His catalog price rules doesn't apply anymore after two days.
New product doesn't take care of end date.

I found a module on magento connect to fix catalog price rules issue but can't install it because of PHP version (need 5.4 max).

Have you any idea ? I think that these two issues can have the same origin but any idea of why..

Thanks for all


texts: Adapting Shopping Cart Price Rules Magento CE 1.7

texts:
I need to set up a promotion such that if a customer spends at least $X, he can get one item from category Y free (the prices in category Y vary). When I set it up as follows:
Actions
Apply percent of product price discount
Discount Amount 100
Maximum Qty Discount is Applied to 1
Discount Qty step (buy x) 0
Apply to shipping amount No
Free Shipping for shipment with matching items
Stop Further Rules Processing No
If all of these conditions are true
Category is

Conditions
Subtotal in cart is greater than or equal to 125

I have also tried under Actions
It all of these conditions are true
Category is one of
Quantity in cart is 1

When I do this and add multiple products from category Y, one of 2 things happens:
The coupon doesn't apply because there is more than 1 qualifying item (with Quantity in cart is 1)
The coupon discounts every item from category Y in the cart (instead of one free, they get a bunch)

Is there a way to make it so that the discount of the full price of only one item from category Y is applied to the cart? (Note: my interim solution is to use Fixed amount discount for the whole cart/is median value of product from category Y)?

Thanks in advance!


texts:
After changing some data for product inside particular store view, "Label" and "Sort order" fields no longer obtain values from Default Values scope if those values are changed.
I will illustrate the example:

This is default scope view:

Then I change Store View into English and change any data (product name for example).

I switch again to Default Values scope and change in images Sort Order.

But English view don't obtain this updated value.
Why there is no option "Use Default Value" for image Label and Sort Order fields? There is just for Base Image, Small Image, ... Is there any way to solve this problem? Or do we need to make any changes twice just because we changed product name?


texts: Error on install modules with composer in Magneto 2.3.1

texts:
I have installed Magento 2.3.1 and PHP 7.2.31 and I have run below command,
COMPOSER_MEMORY_LIMIT=-1 composer require company/module --no-plugins
and getting error like below,
 Problem 1
    - magento/framework 102.0.1 requires php ~7.1.3||~7.2.0 -> your PHP version (7.0.33) does not satisfy that requirement.
    - magento/framework 102.0.1 requires php ~7.1.3||~7.2.0 -> your PHP version (7.0.33) does not satisfy that requirement.
    - magento/framework 102.0.1 requires php ~7.1.3||~7.2.0 -> your PHP version (7.0.33) does not satisfy that requirement.
    - magento/framework 102.0.1 requires php ~7.1.3||~7.2.0 -> your PHP version (7.0.33) does not satisfy that requirement.
    - Installation request for magento/framework (locked at 102.0.1) -> satisfiable by magento/framework[102.0.1].

Any solution on this?


texts:
I want to add lazy load js file in custom module.

In templates folder in that web/js/lazy_load.js file I have put.

Then in layout file

  <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">

<head>
    <title>Pest Library</title>
    <script src="js/jquery.lazyload.js"/>
</head>

<body>

    <referenceContainer name="content">
        <block class="Iksula\PestLibrary\Block\Index\Index" name="pestlibrary_index_index" template="Iksula_PestLibrary::pestlibrary_index_index.phtml"/>
    </referenceContainer>

</body>
</page>

But js file is not called.


texts: Combine checkout payment method and order review

texts:
Extending the default Magento One Page Checkout:

is there a way to combine in one single step Payment Method (Step 4) and Order Review (Step 5) ?

If not possible is there a way to revert their order ?

Because usually a customer first has to check if the order then can send the payment.

Using paypal as unique payment method this doesn't happen.

After the point 4 the user is automatically redirect to the paypal page.

I know that other users marked this question as duplicate but unfortunately they didn't read well the solution they gave me:
OneStepSolution Provided

Says:

  In my extension I will not restrict myself to any specific scenario; instead, I will attempt to build a OneStep checkout as a replacement to the fully fledged Magento OnePage checkout.


texts: Remove shipping block from magento admin order

texts:
How to remove shipping block from magento admin order.I have attached image also please have look.

any help would be much appreciate.
Thanks


texts: Magento 2 Move related product above Product info tabs

texts:
i want to move , related product before product tabs, as highlighted by line in image.
I tried below code but it seems not working and even the related product section is not showing:
<move element="content.aside" destination="content" after="product.info.media"/>


texts:
I have recently migrated a Magento 1.9.x site to Magento 2.2.2.  On my product pages, I have noticed that one attribute (which is Text Area), whenever I used Magento directives such as {{media url=...}} the media url path is not resolved.  However, I have other Text Area attributes and the media url paths work as expected.  Not sure where to look to figuring out what is causing this.

Any advice would be appreciated.


texts: Add custom phtml file before the category filter in Magento2

texts:
I am trying to add custom file in left navigation before the filters.

<referenceContainer name="sidebar.additional">
        <block class="Magento\Framework\View\Element\Template" name="seotext_sidebar" template="Magento_Catalog::product/seotext.phtml" before="-">
        </block>
    </referenceContainer>

the above code appears after the filters but not before the filters.

how can i load custom file before the filters. I need to move breadcrumbs to left navigation.


texts: Problems with M2E Pro plugin correctly detecting product/ASIN from barcode

texts:
We use the M2E Pro plugin for selling on Ebay and are now in the process of setting up with Amazon.

The problem is in finding the ASIN. The plugin correctly matches some products from the barcode, for others it gets the brand/product right but some other detail like colour wrong and finally for others it's completely off the mark (though the product is sold by others on Amazon).

Is there any way to make the detection more accurate? The barcodes are going in correctly and the item titles pretty much match Amazon's naming convention - so I'm not sure what the issue is. Is there a problem with settings - or the installation of the plugin itself?

Thanks,


texts: Magento In Store Pickup Restrict Regions

texts:
I want to restrict my in store pickup to only one state (Illinois). Below is my system.xml code for this module

          <sort_order translate="label">
                        Sort Order
                        <frontend_type>text</frontend_type>
                        <sort_order>100</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                    </sort_order>
                    <sallowspecific translate="label">
                        Ship to Applicable Countries
                        <frontend_type>select</frontend_type>
                        <frontend_class>shipping-applicable-country</frontend_class>
                        <source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
                        <sort_order>90</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                    </sallowspecific>
                    <specificcountry translate="label">
                        Ship to Specific Countries
                        <frontend_type>multiselect</frontend_type>
                        <sort_order>91</sort_order>
                        <source_model>adminhtml/system_config_source_country</source_model>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <can_be_empty>1</can_be_empty>
                    </specificcountry>


texts: Translate.csv Failed to Overwrite Module Translation

texts:
I got a problem with Magento translation in my translate.csv, because it does not work. It should be easy as all tutorials saying.

I had download the package/module translation put into
\app\locale\xx_XX folder and create own translate.csv file in *

\app\design\frontend\[theme]\default\locale\xx_XX

folder.

Some word get the translation was giving priority to the module .csv not to my translate.csv. I cleared all cache files but to no avail.

For instance:

  module Mage_Customer.csv: “Fax”,"Faks"
  translate.csv: “Fax”,"Fax"

Problem: In the customer account page, it always displayed “Faks” instead of “Fax” which is not I expected.

Did I miss out something? Fyi, im using magento vers 1.7.0.2 CE.

Thank you in advance.


texts: Magento 2 Category url rewrite is not working

texts:
After migration by using ubertheme, my category url is not working.
Its showing all category urls are like below
http://domain.com/catalog/category/view/s/trouvez-le-fauteuil-ou-canape-chesterfield-fait-pour-vous/id/51/

Can you pleas help me how can i change it to seo format?

I have tried reindexing via ssh and also enable seo url for category and product from Configuration/catalog/SEO tab.

I am using magento 2.1.0

Thanks in advance.


texts:
Set catalog prices with date in future.

The special price will be deleted after 2-3 days in the product data (all rules regarding) , although the date is not yet reached.

problem strikes with flat data and without.

Using Magento 1.9.0.1


texts: magento 2.3.2 captcha for checkout not showing in admin settings

texts:
I am using magento 2.3.2 and I am trying to set google recaptha on checkout page.
In google search i get this option as below picture but this option not found in my magento2 version. How can I add google recaptcha for all type for checkout.


texts: Show custom price for product In all the pages

texts:
I want to change the price accordingly to custom conditions which i created in my custom module. I rewrote the price model file in my custom module like

<models>
    <catalog>
        <rewrite>
            <product_type_price>My_Module_Model_Price</product_type_price>
        </rewrite>
    </catalog>
</models>

Also I rewrote the function in my price model file

public function getPrice($product){ ...
    My Conditions Logic.....
    return $new_price;
}

in price model file. $new_price is the price which I get from the calculations from my condition logic. My Problem is that in Product List Page, if my custom price is greater than The Default Price of Product then my custom price becomes regular price and Magento marks the default price as Special Price. While if my custom price is less than the default price then only default price is displayed while in Product View Page My Custom Price is Displaying correctly. I attach screen shot of list page. Can anyone tell me what I am missing.


texts:
I want to display products in registration side bar.
i have added reference to customer.xml.

 <customer_account_index translate="label">
        <label>Customer My Account Dashboard</label>
         <reference name="right">
            <block type="reports/product_viewed" name="right.reports.product.viewed" template="catalog/product/list/featured.phtml" />
        </reference>
        <update handle="customer_account"/>
        <!-- Mage_Customer -->
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        </reference>
        <reference name="my.account.wrapper">
            <block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">
                <block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/>
                <block type="core/template" name="customer_account_dashboard_top" as="top" />
                <block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/>
                <block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/>
                <block type="customer/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/>
            </block>
        </reference>

    </customer_account_index>

but side bar is not display.


texts: Programmatically Set/Change Thumbnail Image To Another From Gallery

texts:
I have a huge catalog of products which all have about 4 images per product with the same naming structure being something like "xxxxxx_FR.jpg" "xxxxxx_BK.jpg" "xxxxxx_FL.jpg" where the x's represent the product's ID and FR, BK, FL stand for front, back, full length etc.

Currently Base, Small and Thumbnail are all assigned to the FR images, but what I'm trying to do is change just the Thumbnail image for each product to the FL image from the gallery programatically. I am approaching this by  building a custom product collection, going through the products and then loading the following:

foreach ($_productCollection as $product){
   $workingProduct = Mage::getModel('catalog/product')->load($productID);
   $gallery = $workingProduct->getMediaGalleryImages();
   $cameraAngle = str_replace(".jpg","",explode("_",$image->getUrl())); //This results in string that is just FR, BK, FL etc.

if (strtolower($cameraAngle[1]) == 'fl') {
//I have tried both of the below methods
$workingProduct->setThumbnail($image->getUrl());
$product->addImageToMediaGallery($image->getUrl(),array('thumbnail'),false,false);
 $workingProduct->save();
}
}

The first method doesn't do anything and the second method adds a new image into the image gallery (which I don't want) but it doesn't change the thumbnail image either. I am thinking that there is more potential in method 1 as I do not want to import or create a new image in the gallery, but I'm not sure what I'm doing wrong.


texts: after upgrading from 1.4.1 to 1.9 navigation menu doesn't show anymore

texts:
I'm updating an old magento install and I just upgraded it from

1.4.1 (to 1.4.2 first) to 1.9.

Now the top navigation menu doesn't show anymore. The category structure is still intact. I've tried several tutorials online on how to display the top navigation menu, but none worked so far.

I'm following this tutorial..http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/navigation/add_home_link_to_menu_bar

I'm looking inside

app/design/frontend/default/yourtheme/template/catalog/navigation/top.phtml

But the file isn't being parsed, I can put nonsense php statements inside it and don't get any error messages on the site. I've disabled compilation and all cache on the site.

How can I get this working? Or normally where is this file called from?

Edit1: I see now that in

app/design/frontend/default/yourtheme/template/page/html/header.phtml

the top menu is called..

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

But this string is empty. I've added topmenu.phtml to

app/design/frontend/default/yourtheme/template/page/html/

This file isn't called as well. I don't know why this isn't working, any advice is welcome.

Edit2

The content of top.menu is empty, I'd like to get this fixed first. I've tried to call it in several ways..

$this->getLayout()->getBlock('top.menu')->toHtml()

or

$layout = Mage::app()->getLayout();
$layout->getUpdate()
        ->addHandle('default')
        ->load();

$layout->generateXml()
        ->generateBlocks();

var_dump( $layout->getBlock('top.menu')->toHtml());

Edit3

I wanted to know where the top.menu is filled, I've found two files

   app/code/core/Mage/Page/Block/Html/Topmenu.php
   app/code/core/Mage/Page/Block/Html/TopMenu/Renderer.php

The functions in both classes aren't called, even though I'm using

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

in a file that gets parsed. So I'm wondering am I calling the right method to  display the top menu? Or am I looking at the wrong files?


texts: Display Page Title of cms page in 1column.phtml

texts: I am working on Magento 1.9. By using <?php echo $this->getChildHtml('content') ?>, it is Displaying the content Heading, content and Breadcrumbs, but I want to know how to Display the CMS Page Title and the Content Heading in a specific tag From 1comumn.phtml.


texts: Require JS error mime(text/html) not supported

texts: I have just installed magento with composer and I am facing require js errors in my javascript console and the page in blank. no features are exposed


texts:
I have just started to use magento and made a child theme of Blank. I have followed the documentation about making a theme at

devdocs.magento.com

And i have activated the theme but the problem is i dont know why require.js or Icons are not loading. I have tried to deploy the static content but no results, do i have to copy them from Parents theme (But shouldn't child theme inherit?)

Folder Structure

app/design/frontend/myVendor/
├── myTheme/
│   ├── etc/
│   │   ├── view.xml //Copy from vendor/magento/theme-frontend-blank
│   ├── media/
│   │   ├── preview.jpg
│   ├── web/
│   │   ├── images
│   │   │   ├── logo.svg
│   │   ├── css
│   │   │   ├── source
│   │   ├── fonts
│   │   ├── js
│   ├── registration.php
│   ├── theme.xml
│   ├── composer.json

Also my registration.php

 <?php
  /**
  * Copyright © 2015 Magento. All rights reserved.
  * See COPYING.txt for license details.
  */

 \Magento\Framework\Component\ComponentRegistrar::register(
   \Magento\Framework\Component\ComponentRegistrar::THEME,
   'frontend/myVendor/myTheme',__DIR__);

And theme.xml

 <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
 <title>myTheme</title> <!-- your theme's name -->
 <parent>Magento/blank</parent> <!-- the parent theme, in case your theme inherits from an existing theme -->
    <media>
        <preview_image>media/preview.jpg</preview_image> <!-- the path to your theme's preview image -->
    </media>
 </theme>

And also a question, does magento looks in vendor for theme? ( i have read that if it doesnt find it in app/design/frontend that it gets it from vendor)

Issue about this on git with answer

If understood it correctly it wouldnt make me select this theme if it didn't


texts: Getting error when we switch from developer mode to production mode - Magento 2.3.5-p1

texts:
All the pages getting these errors
Error : Warning: include(magento_dir/var/view_preprocessed/pub/static/vendor/magento/module-theme/view/base/templates/root.phtml): failed to open stream: No such file or directory in magento_dir/vendor/magento/framework/View/Result/Page.php on line 327


texts: append multiple child blocks from controller

texts:
I'm trying to append more than one block from controller.

The code I've written is

            $this->loadLayout();
            $layout = $this->getLayout();
            $layout->getBlock('root')->setTemplate('page/1column.phtml');
            $noResult = $layout->getBlock('search.result')->setTemplate('excatsearch/noresult.phtml');
            $newArrival = $layout->createBlock('Mage_Catalog_Block_Product_New', 'new_arrivals', array(
                'template' => 'excatsearch/newarrival.phtml'
            ));
            $bestSellers = $layout->createBlock('Mage_Page_Block_Html', 'best_sellers', array(
                'template' => 'excatsearch/best_seller.phtml'
            ));
            $noResult->append($newArrival)
            ->append($bestSellers);
            $this->renderLayout();

and code in noresult.phtml is

$this->getChildHtml();

But I'm only able to see the new_arrival block not best_sellers. So, How can I add the other block?


texts:
In my codebase I have a line of code, which is triggered through a cron

const SALE_ORDER_NR = '{{order}}';
$text = str_replace(self::SALE_ORDER_NR, $order, $text);

I am using Magento 1.9;

Here,  $order is of type : Sales_Model_Order

$text is not having any substring as {{order}}, instead it is :

Refund of Rs.150.00 for your order 145004617 has been initiated. Refund may take upto 8-9 days to credit into your bank account.

So, the strange behavior is that when I try to run the above code in my local server it passes without any issue.

But when I am trying to run the lines of code via the cron in my Testing Server, I get the following errors :

Catchable fatal error: Object of class Dbaux_Sales_Model_Order could not be converted to string in /var/www/html/magento3/app/code/local/Artio/SMSNotifier/Model/Sms/Template.php on line 351

Since I am new to the world of magento, it would be really helpful if reason for above behavior can be cleared.

Why is the error being thrown when running the cron, and not when I directly call the observer method from another method.


texts:
SELECT entity_id, sku , type_id
FROM catalog_product_entity
WHERE entity_id NOT IN (
    SELECT product_id
    FROM `sales_flat_order_item`
)
ORDER BY sku

Need to include product name with above SQL Query and unsure how to format the join. Magento 1.9.3.2


texts: I need to apply a filter in Region loader in Magento 2.1

texts:
I wish to apply a filter on the states being loaded anywhere on the website. So far I have got to know that the toOptionArray() function of Magento\Directory\Model\ResourceModel\Region\Collection class has this data. So i need to extend this function in my child class. How to override it ?

I have tried rewriting through di.xml of my custom module:

<preference for="Magento\Directory\Model\ResourceModel\Region\Collection" type="CustomNameSpace\CustomModule\Model\ResourceModel\Region\Collection" />

and extended this customclass from the actual Collection class. But the code doesn't pass through my custom toOptionArray() function and continues to pass through the base class' function