texts:
I hope you can help me to resolve an issue I am experiencing with Magento,
When I import product images, magento automatically decreases the size to fit a thumbnail size photo, which dramatically affects the quality of the photo, The thumbnail quality is terrible however the quality of the photo once you click on the item is fantastic.

I am using Magento 1.9, which is quite a recent update so I cannot find the solution for this perticular version,
I have found threads for previous versions like 1.4 which have the solution to them, with the comments positive saying it had fixed the issue, but It does not work for 1.9 (Unless I am doing something terribly wrong!)

I saw another thread with the same issue, but it was closed because the author did not put enough detail,
My question is this,
How do I improve the quality of the thumbnail that Magento automatically decreases?

I have also attached photos to show you my issue.

Hope we can get this resolved!!

Edit: The photos I've uploaded are decreased to fit the thread so the quality looks okay, If you need a link to see the site for yourself let me know!


texts: how to call controller using ajax in admin backend magento 2

texts:
I have to call the controller using Ajax in Admin backend of Magento 2. Can we directly call the controller or do we have to include any key values?

Please help me.


texts:
Magento 2.0.10
PHP 5.6.27

I created a Credit Card payment module (Save) which works very well.
The encryption feature seems to work correctly.

$info->encrypt($data->getDataByPath('additional_data/cc_number'))

but decrypt function always returns an empty field

in Magento\payment\Model\info.php line 76

public function getData($key = '', $index = null)
{
    if ('cc_number' === $key) {
        if (empty($this->_data['cc_number']) && !empty($this->_data['cc_number_enc'])) {
            $this->_data['cc_number'] = $this->decrypt($this->getCcNumberEnc());
        }
    }
    if ('cc_cid' === $key) {
        if (empty($this->_data['cc_cid']) && !empty($this->_data['cc_cid_enc'])) {
            $this->_data['cc_cid'] = $this->decrypt($this->getCcCidEnc());
        }
    }
    return parent::getData($key, $index);
}

idem in

$info->decrypt($info->getCcNumberEnc());

nothing.

Have you successful used the decrypt? It's a Bug ?


texts: Avs FastSimpleImport - Import all images

texts:
i'm using the Avs_FastSimpleImport extension to import my products from an csv file. Im building up my product array according to the documentation of the extension, found here

I manage to import the base_image for now. But i have three images (base_image, small_image & thumbnail) and dont find the right solution how to import the other two. According to this, it should be an array, or what:

my code for images, so far:

            '_media_attribute_id'     => !empty($media_attribute_id) ? $media_attribute_id : null,
            '_media_image'            => isset($product['image']) ? $product['image'] : null,
            'image'                   => isset($product['image']) ? $product['image'] : null,
            'small_image'             => isset($product['small_image']) ? $product['small_image'] : null,
            'thumbnail'               => isset($product['thumbnail']) ? $product['thumbnail'] : null,

My Question is how to build up my array to be able to import and set the thumbnail and small_image.

Thanks in advance


texts: Failed to open stream Autoload.php in logs after I removed the package

texts:
I manually removed a package that I had manually installed a couple years ago so that I could replace it with a new package. Right now when I click on a product in Catalog (in Admin view) the following error throws:

2017-02-14T14:26:02+00:00 ERR (3): Warning: include(Mage/Elasticsearch/Model/Attribute/Source/Weight.php): failed to open stream: No such file or directory  in /html/lib/Varien/Autoload.php on line 94
2017-02-14T14:26:02+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Elasticsearch/Model/Attribute/Source/Weight.php' for inclusion (include_path='/html/app/code/local:/html/app/code/community:/html/app/code/core:/html/lib:.:/usr/share/pear:/usr/share/php')  in /html/lib/Varien/Autoload.php on line 94

Note: I removed prefixes to some of the paths as it includes my site's url.

I've purged the cache and confirmed that there are no files left over that would trigger this. Any ideas of where I should look to troubleshoot this?


texts:
I am in situation where I have to remove all products from cart after user logs in.

I have seen code examples to remove previous cart items, but don't know how to make the cart completely empty after the user logs in.
How to remove the old cart product after customer login

The above url is for the logic
Customer already have 5 products in cart > Visit the site > add newly 2 products in cart > login customer account > show the cart newly add 2 product (old cart products are removed)

But in my case, When the customer logs in all 7 products has to be removed from cart.

Any suggestions will be appreciated.
Thank you.


texts: Magento-2 : Display gender field as radio instead of dropdown

texts:
Magento-2 customer address Gender Prefix - Mr.;Mrs. field display by default as drop-down ,but I want to display it as radio button in customer address form like checkout shipping, billing address, customer registration.

Anyone have done this ?


texts: Bundle Product Coupon Code Discount not working with subselection of items

texts:
Cart price rule in Magento 2.3.5-p1 not working with subselection condition.
I have attached screenshots for reference.
It says coupon is not valid when applied with only bundle product in cart.
However, if we add another product(simple/configurable) to cart and apply coupon again, it works and discount applies to all products in cart including bundles


texts: Content > Design >Config shows no records on fresh 2.1.3 install

texts:
Fresh install of Magento 2.1.3 with Lumo sample data has no records to edit in Content > Design > Configuration.

How can I fix this?


texts: Magento 2 Invoice Pdf footer paragraph cutting off - not going to next page

texts:
I am trying to add a couple of lines as my magento 2 store's pdf invoice's footer - technically trying to set it just after the Totals.

So I have overriden the file Magento\Sales\Model\Order\Pdf\Invoice.php in my custom module. To add the footer I have written the below function:

protected function _drawFooter(\Zend_Pdf_Page $page)
        {

            $page->setFillColor(new \Zend_Pdf_Color_RGB(1, 1, 1));
            $page->setLineColor(new \Zend_Pdf_Color_GrayScale(0.5));
            $page->setFillColor(new \Zend_Pdf_Color_RGB(0.1, 0.1, 0.1));
            $page->setFont(\Zend_Pdf_Font::fontWithName(\Zend_Pdf_Font::FONT_HELVETICA), 10);

        $page->drawText('EFT Details: ', 35, $this->y -10, 'UTF-8');
            $page->drawText('Account Name:  , 40, $this->y -25, 'UTF-8');
        $page->drawText('BSB: XXXXXXX Account No: XXXXXX' , 250, $this->y -25, 'UTF-8');

        $page->drawText('Please put your order number as reference' , 40, $this->y -35, 'UTF-8');

         $page->drawText('Return and Refund Policy: ', 35, $this->y -50, 'UTF-8');
            $page->drawText('Products returned due to change of mind, not being suitable or if the job did not go forward, must be returned within' , 40, $this->y -65, 'UTF-8');
            $page->drawText('30 days of the purchase. The amount paid will be applied as a store credit to your account. ' , 40, $this->y -75, 'UTF-8');
             $page->drawText('If a refund is required, the following fees will apply: ' , 40, $this->y -85, 'UTF-8');
            $page->drawText('2% credit card process fee applicable for all orders paid with Visa or Master. ' , 50, $this->y -100, 'UTF-8');
            $page->drawText('3% credit card process fee applicable for all orders paid with AMEX. ' , 50, $this->y -110, 'UTF-8');
            $page->drawText('Shipping cost will be deducted from refund (i.e. shipping to customers and pick up cost).' , 50, $this->y -120, 'UTF-8');
            $page->drawText('Restocking fee may apply.' , 50, $this->y -130, 'UTF-8');

               $page->drawText('Warranty' , 35, $this->y -145, 'UTF-8');

                $page->drawText(' LED Products have either a 3 or 5 years full product replacement warranty.' , 40, $this->y -160, 'UTF-8');

                 $page->drawText(Lighting Products have 2 years full product replacement warranty.' , 40, $this->y -170, 'UTF-8');
             $page->drawText('For warranty claims regarding transit damage, the claim must be made within 5 . business days of receiving of goods.' , 40, $this->y -180, 'UTF-8');
             $page->drawText('The warranty service is limited to the replacement or repair of products that have become defective due to normal usage,' , 40, $this->y -190, 'UTF-8');

                $page->drawText('For Labour Warranty conditions please refer to our website.' , 40, $this->y -210, 'UTF-8');

        }

And then called this function below the within the getPdf function like this

 public function getPdf($invoices = [])
{
  ........
 ..........
 $this->_drawFooter($page);
 $this->_afterGetPdf();
return $pdf;

}

it is generating output as following if there is only one or two items - as there are plenty of spaces on the page

but if there are lots of products and the footer needs to move to the next page  then it gets cut off at the middle like this:

I am very new to magento and totally at loss..please help.


texts:
does anyone know how to change the template of a bundle option for a specific product?

I've tried updating the Bundled Product in Magento (v1.8), and clicking on 'Design' to change the templates for the product. I have the following working:

<reference name="product.info">
     <action method="setTemplate">
           <template>catalog/product/view-custom.phtml</template>
     </action>
</reference>

but if I try the same approach with the Checkbox option nothing changes?

<reference name="product.info.bundle.option.checkbox">
     <action method="setTemplate">
          <template>bundle/catalog/product/view/type/bundle/option/checkbox-custom.phtml</template>
     </action>
</reference>

Looking at bundle.xml I can see that the checkbox block is called by AddRenderer - but I'm not sure how to hijack the template for this block if it's called in this way? (for reference, here's how it's called in bundle.xml):

<reference name="product.info.options.wrapper">
        <block type="bundle/catalog_product_view_type_bundle" name="product.info.bundle.options" as="type_bundle_options" template="bundle/catalog/product/view/type/bundle/options.phtml">
            <action method="addRenderer"><type>select</type><block>bundle/catalog_product_view_type_bundle_option_select</block></action>
            <action method="addRenderer"><type>multi</type><block>bundle/catalog_product_view_type_bundle_option_multi</block></action>
            <action method="addRenderer"><type>radio</type><block>bundle/catalog_product_view_type_bundle_option_radio</block></action>
            <action method="addRenderer"><type>checkbox</type><block>bundle/catalog_product_view_type_bundle_option_checkbox</block></action>
        </block>
        <action method="insert"><block>product.info.bundle.options</block></action>
</reference>

Many thanks for any advice/tips!

Tim


texts: Magento 2 How to add an attribute like tier price to adminhtml product details editing page?

texts: The tier price attribute is special, it contains a grid of labels, textfields and buttons. I've checked many block files and template files. But I can't locate the related codes. How can I add an attribute like it to the product editing page? Where are the related codes? Thanks.


texts:
My cart has a total order amount greater than $1.00 still it shows an error Minimum order amount is $1.00

As the cart has an order total of $2.62 even after applying a discount which is greater than the minimum order amount $1.00 then why this error is being shown?

Any idea?

EDIT: I have debugged it and I found that in file vendor/magento/module-quote/Model/Quote.php

if (!$minOrderMulti) {
            foreach ($addresses as $address) {
                $taxes = ($taxInclude) ? $address->getBaseTaxAmount() : 0;
                foreach ($address->getQuote()->getItemsCollection() as $item) {
                    /** @var \Magento\Quote\Model\Quote\Item $item */
                    $amount = $item->getBaseRowTotal() - $item->getBaseDiscountAmount() + $taxes;
                    if ($amount < $minAmount) {
                        return false;
                    }
                }
            }
        }

In above code it considers item's base row total in calculation which is $21.82 in my case and base_discount_Amount which is $21.38 and tax is $0.24 it means it would be $21.82 - $21.38+ $0.24 = $0.2  which is less than $1.00

But why it is taking base row total in the calculation instead of base_price_incl_tax which is $24.00 it would work fine then.

Can you please let me know any suggestions on how to overcome this?


texts: Mageplaza products slider items not updating

texts:
I'm using the products carousel via the shortcode method: https://docs.mageplaza.com/product-slider-m2/#cms-page-cms-static-block

I was wondering what settings there are available that I can add on here? e.g: I'd like to show 2 .owl-item divs, how can I do this? I've tried changing: products_count="2" with little luck, it still shows by default 3 items, I want to show say 4 items at any one time and then I can scroll. My shortcode is:

{{block class="Mageplaza\Productslider\Block\CategoryId" template="Mageplaza_Productslider::productslider.phtml" products_count="2" heading="Products carousel" category_id="3, 5" description="Products carousel"}}

I guess I need to somehow use: Max Items Slider as a setting on my shortcode to choose how many items display at different viewports

I've tried setting items="4" however I still get the default 3 shown. It appears this option isn't working?

Does anyone else have this issue?

I'm using Magento 2.2.7


texts: Magento 2 - Get configurable product from current product

texts: I can get current product attribute using $product->getAttributes(). How can I get the configurable product list and their corresponding attributes programmatically?


texts: Magento 2 store switcher - store cookie not changing because of full page cache

texts:
I have a Magento 2 site with a basic store switcher that lets the user switch between 2 stores using the URL method (e.g __store=default).

When I have FPC enabled, the cookie that sets the current store doesn't update when I change the store using the switcher and then when Ichange page I see the previous store currency.

Without resorting to hole punching and thus breaking FPC, does anyone know a way around this?


texts: Cannot sign in (login) to Magento 2 admin

texts:
I am having a strange issue with Magento 2 sign in admin panel.

It's been working fine but since yesterday the sign in just doesn't work. It shows the panel to enter user and pass but just 'refreshes' on entry - although it does put an index key in the url.

No error message.

Anyone experienced similar or can assist in troubleshooting?

Frontend is working OK (except checkout module).

Additional info: just before we had the issue the Full Page Cache remained invalidated, even when we refreshed. Any edits at FTP level (FileZilla) are not going through giving 'error: failed'. We are on AWS EC2 server instance.


texts: admin page issues - Cloudflare with Magento 2

texts:
I have configured a Magento 2.0.7 website with Cloudflare. The issue is some admin pages are not loading correctly. For example, catalog management page cannot load products list, user management page cannot load user list. Other admin pages work OK.
When I used it as static ip ex (xx.xx.xx.xx) it really work but not in subdomain
I created page rules with admin url but nothing changes.
Please can you help me ?


texts: How to Get Product Category IDs Without Loading the Whole Product

texts:
By default, you can load product category IDs using this:

$product = Mage::getModel('catalog/product')->load($_productId);
$category_ids = $product->getCategoryIds();

But how can we load the category IDs without loading the whole product model? Note that getCategoryIds() is a function of product model not data.


texts: Magento 2 - How to add custom JS file path into CMS Block

texts:
How to get JS file in the blocks,
How to declare like:
<script type="text/javascript">
    src="{{skin url=''}}js/my_custom.js">
</script>

My JS path:
app/design/frontend/Codazon/fastest/grocery_gourmet/web/js/my_custom.js

OR Recommended way to declare JS.


texts: How can I integrate Google Suggest with Magento address?

texts:
I searched after some ideas how to achieve this and I couldn't find any hint. I know that there is a module which uses this but I am not interested to buy it only for this option.
The link with the module
http://www.magestore.com/magento-one-step-checkout-extension.html


texts:
I want to create a Model that could be called from another extension.
The tutorials I've found so far are quite confusing and I couldn't get it to work.

What is the minimum I need to do to make a fully functional model?

I have setup a simple module.
config.xml with the content:

<?xml version="1.0"?>
<config>
    <modules>
        <Jurgis_Checkoutstep>
            <version>0.1.0</version>
        </Jurgis_Checkoutstep>
    </modules>
    <frontend>
        <routers>
            <Checkoutstep>
                <use>standard</use>
                <args>
                    <module>Jurgis_Checkoutstep</module>
                    <frontName>Checkoutstep</frontName>
                </args>
            </Checkoutstep>
        </routers>
    </frontend>
</config>

Path: /app/code/local/Jurgis/Checkoutstep/etc/config.xml

Let's say I want to have a Model called deliverydate.php in:app/code/local/Jurgis/Checkoutstep/Model

What do I need to add to config.xml and deliverydate.php (anywere else?) to create a working Model?


texts: Error log: cache_dir "‘tmp’" must be a directory

texts:
I'm getting the error:

  cache_dir "‘tmp’" must be a directory

Trace:

#0 lib/Zend/Cache/Backend/File.php(178): Zend_Cache::throwException('cache_dir "???t...')
#1 lib/Zend/Cache/Backend/File.php(129): Zend_Cache_Backend_File->setCacheDir('???tmp???')
#2 lib/Zend/Cache.php(153): Zend_Cache_Backend_File->__construct(Array)
#3 lib/Zend/Cache.php(94): Zend_Cache::_makeBackend('File', Array, false, false)
#4 lib/Zend/Locale/Data.php(314): Zend_Cache::factory('Core', 'File', Array, Array)
#5 app/code/core/Mage/Core/Block/Html/Calendar.php(42): Zend_Locale_Data::getList('en_US', 'days')
#6 app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Html_Calendar->_toHtml()
#7 app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#8 app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('calendar', true)
#9 app/design/adminhtml/default/default/template/page/head.phtml(33): Mage_Core_Block_Abstract->getChildHtml('calendar')
#10 app/code/core/Mage/Core/Block/Template.php(241): include('/home/krudmart/...')
#11 app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#12 app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#13 app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#14 app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#15 app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('head', true)
#16 app/design/adminhtml/default/default/template/page.phtml(43): Mage_Core_Block_Abstract->getChildHtml('head')
#17 app/code/core/Mage/Core/Block/Template.php(241): include('/home/krudmart/...')
#18 app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#19 app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#20 app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#21 app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#22 app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#23 app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#24 app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(180): Mage_Core_Controller_Varien_Action->renderLayout()
#25 app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_ProductController->indexAction()
#26 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#27 app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#28 app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#29 app/Mage.php(684): Mage_Core_Model_App->run(Array)
#30 index.php(87): Mage::run('', 'store')
#31 {main}

  Error log record number: 428748724167


texts: Is it possible to override the Session Cookie Lifetime found in the sys. config.?

texts:
Is it possible to override the Session Cookie Lifetime found in the system configuration?

The reason I ask is because it appears that Magento is not honoring the value I set for Cookie Lifetime no matter what. This is an instance that MANY developers have had their hands in and it seems someone found a way to override it. Any thoughts?


texts: Make tier_price behave/replace normal price Magento 1.7

texts:
I'm looking for a way to display my Tier_pricing as a normal price. Because I use SOAP to import prices for different groups.

I've managed to let magento show the tier_prices on list page;

<?php  $this->setProduct(Mage::getModel('catalog/product')->setStoreId(Mage::app()-      >getStore()->getId())->load($_product->getId()))?>
<?php echo $this->getTierPriceHtml()  ?>

But, it isn't showing up when the tier_price is higher then the normal price ! How can I work around this? I need it to show up also when tier_price is higher then normal price (basicly my tier_price just needs to replace my normal varien price).

Also, can I make it to show the tier_prices like the normal price (so Incl. & Excl. VAT taxes, is their any way to just get the tier_price into the price-box instead of the price ?). So, I want Magento to think that the tier_price is actually the normal price for a certain customer_group...

I know you can use customer_groups for this, but that can't be used with SOAP.


texts:
I setup a Magento 2.0.4 website, added some products and then gave access to the store owner to add remaining products.
Some of them were added using duplicate function and were disabled by default.

In PRODUCTS => CATALOG I selected them, clicked on ACTIONS => CHANGE STATUS => ENABLE.

Some of them are still disabled.

Products seem fine:

PRODUCT ONLINE
Quantity: 100 - In Stock

Inventory:

Manage Stock: no
Min quantity in shopping cart: 1
Max: 10000

Maybe I'm missing something since I'm unable to set them as Enabled.

Magento version: 2.0.4

Store is in Developer mode.

EDIT: I just updated to Magento 2.0.5 and I don't see any change


texts: Add new Action to a existing Magento route - Magento2

texts:
Here is my scenario, I want to add a new Action to an existing Magento route, for example under the MyAccount section you can find /sales/order/[view, history, etc]; I want to add an index like an Order section dashboard.

I tried to implement this solution:
https://stackoverflow.com/questions/34908125/magento-2-controller-post-throwing-404-error
without luck.

Any suggestions?


texts: Magento remove + percentage from option dropdowns

texts:
My client is using the MageWorx plugin Advanced Product Options but wants to remove the (+ percentage) from the option drop downs. I've managed to remove the (+ price) no problem, but I cannot figure out where to remove the percentage.

Here's the page where the options are: http://magento-28691-62076-166572.cloudwaysapps.com/products/business-cards/business-cards.html

If you choose an option from the first dropdown, then you can choose from the second one (quantity) which will adjust the price, but the following drop downs still have the (+ 20%) etc. in them.

Does anyone know how these can be removed, as I'm not comfortable with the Magento code base and don't want to go playing around in Core plugin files which could break it.


texts: Use of a 'where' clause on a calculated field value

texts:
I have a query for calculating the minimal price. The select statement part is:

IF(at_price_index.tier_price IS NOT NULL, LEAST(at_price_index.min_price, at_price_index.tier_price), at_price_index.min_price) AS theprice

How can I add the following where clause?

where theprice = 10

I have tried the following code:

$myProductCollection->addFieldToFilter('theprice', '10');

But I get an error:

  Fatal error: Call to a member function getBackend() on a non-object


texts: Can't get extension attributes in observer - Magento 2

texts:
As the title says

Background:
I have followed the guide in the Magento 2.1 docs about adding a custom input to Shipping Address in checkout:
http://devdocs.magento.com/guides/v2.1/howdoi/checkout/checkout_new_field.html

I am confident I followed the instructions to a T.  The input was renamed to 'birthday' from 'custom_field'.

I have an observer attached to sales_order_save_before. I am trying to access 'birthday' as a custom attribute, but when I call

$birthday = $address->getExtensionAttributes()->getBirthday();

I get an error saying 'Uncaught Error: Call to a member function getBirthday() on null'.  I know that the interface is being generated properly.  Is there another way I can grab this information?

Related code:

Block/Checkout/LayoutProcessor::process()

public function process($jsLayout) {

    $customAttributeCode = 'birthday';
    $customField = [
        'component' => 'Magento_Ui/js/form/element/abstract',
        'config' => [
            'customScope' => 'shippingAddress.custom_attributes',
            'customEntry' => null,
            'template' => 'ui/form/field',
            'elementTmpl' => 'ui/form/element/date'
        ],
        'dataScope' => 'shippingAddress.custom_attributes' . '.' . $customAttributeCode,
        'label' => 'Birthday (MM/DD/YYYY)',
        'provider' => 'checkoutProvider',
        'sortOrder' => 1000,
        'validation' => [
            'required-entry' => true
        ],
        'options' => [],
        'filterBy' => null,
        'customEntry' => null,
        'visible' => true,
    ];

    $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']['shippingAddress']['children']['shipping-address-fieldset']['children'][$customAttributeCode] = $customField;

    return $jsLayout;
}

etc\frontend\di.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Checkout\Block\Onepage">
        <arguments>
            <argument name="layoutProcessors" xsi:type="array">
                <item name="birthdayCheckout" xsi:type="object">Vendor\Module\Block\Checkout\LayoutProcessor</item>
            </argument>
        </arguments>
    </type>
</config>

etc/extension_attributes.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Quote\Api\Data\AddressInterface">
        <attribute code="birthday" type="string" />
    </extension_attributes>
    <extension_attributes for="Magento\Quote\Api\Data\AddressInterface">
        <attribute code="file" type="string" />
    </extension_attributes>
</config>

Mixin code

/*jshint browser:true jquery:true*/
/*global alert*/
define([
    'jquery',
    'mage/utils/wrapper',
    'Magento_Checkout/js/model/quote'
], function ($, wrapper, quote) {
    'use strict';

    /*
     add file upload logic here
     */
    return function (setShippingInformationAction) {

        return wrapper.wrap(setShippingInformationAction, function (originalAction) {
            var shippingAddress = quote.shippingAddress();
            if (shippingAddress['extension_attributes'] == undefined) {
                shippingAddress['extension_attributes'] = {};
            }

            shippingAddress['extension_attributes']['birthday'] = shippingAddress.customAttributes['birthday'];
            // pass execution to original action ('Magento_Checkout/js/action/set-shipping-information')
            return originalAction();
        });
    };

});


texts: SUPEE 7405: Frontend Cart Delete Action (Doesn't Work)

texts:
After SUPEE 7405 installation, when using AJAX product delete action, it throws an error "Cannot remove the item." This message is due to added FORM-KEY validation into app/code/core/Mage/Checkout/controllers/CartController.php

Now, the question is: How to fix this issue? I've received comments saying I need to add a FORM-KEY to .phtml file responsible in ajax. But I DO NOT know which code to insert or file exactly I need to edit.

Any help?


texts: How to solve an error 404 with Nginx after login on dashboard?

texts:
Magento 1.9.2.1
Nginx 1.8.1

I'm trying to set up a Magento shop, a development server with Nginx for further change.

Currently, it runs on a server with Apache.

Developing I have no problems with redirects. The frontend works well.
I used to access the dashboard http: //www.domain.tld/index.php/admin/

But it does not work on my Nginx installation.

If you use http://www.domain.tld/admin/ it asks for my user and password, but then I redirected to a page http://www.domain.tld//index.php/admin/admin/dashboard/index/ giving a 404 error.

server {
    listen      x.xxx.xxx.x:80;
    server_name domain.es www.domain.es;
    root        /home/user/web/domain.es/public_html;
    index       index.php index.html index.htm;
    access_log  /var/log/nginx/domains/domain.es.log combined;
    access_log  /var/log/nginx/domains/domain.es.bytes bytes;
    error_log   /var/log/nginx/domains/domain.es.error.log error;

    location / {

        # START Tamaniut
        try_files /maintenance.html $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
        expires 30d; ## Assume all files are cachable
        # END tamainut

        location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
            expires     max;
        }

        location ~ [^/]\.php(/|$) {
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            if (!-f $document_root$fastcgi_script_name) {
                return  404;
            }

            fastcgi_pass    127.0.0.1:9002;
            fastcgi_index   index.php;
            include         /etc/nginx/fastcgi_params;
        }
    }

    error_page  403 /error/404.html;
    error_page  404 /error/404.html;
    error_page  500 502 503 504 /error/50x.html;

    location /error/ {
        alias   /home/user/web/domain.es/document_errors/;
    }

    #START tamainut
    #location ~* "/\.(htaccess|htpasswd)$" {
    #    deny    all;
    #    return  404;
    #}

    ##
    # dont log robots.txt requests
    ##
    location /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    ## These locations would be hidden by .htaccess normally
    location ^~ /app/                { deny all; }
    location ^~ /includes/           { deny all; }
    location ^~ /lib/                { deny all; }
    location ^~ /media/downloadable/ { deny all; }
    location ^~ /pkginfo/            { deny all; }
    location ^~ /report/config.xml   { deny all; }
    location ^~ /var/                { deny all; }
    location /var/export/            { deny all; }

    # deny htaccess files
    location ~ /\. {
        deny  all;
        access_log off;
        log_not_found off;
    }

    #This @handler it's on several tips on stackExchange, Magento Exchange, but when try restart get: "named location "@handler" can be on the server level only"
    #location @handler { ## Magento uses a common front handler
    #    rewrite / /index.php;
    #}

    location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
        rewrite ^(.*.php)/ $1 last;
    }

    rewrite ^/minify/([0-9]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d=$1 last;
    rewrite ^/skin/m/([0-9]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d=$1 last;
    # END Tamainut
    include     /etc/nginx/conf.d/phpmyadmin.inc*;
    include     /etc/nginx/conf.d/phppgadmin.inc*;
    include     /etc/nginx/conf.d/webmail.inc*;

    #include     /home/user/conf/web/nginx.naturjoya.es.conf*;
}


texts: Spam bots & SQL Injections - How do I stop this?

texts:
how do I stop this?

Hundreds upon hundreds of these searches.


texts: Magento 1.9.1 Cart Pricing Rules: discount on X products or more

texts:
I am trying to create a rule that does the following: when you buy 12 or more products a discount of 18% is given per item - not on the total amount of the cart.

I can't seem to find a way to do this.

Question: how can this be achieved?

Here is my cart rules page with the drop down open


texts: CSS doesnt Load on custom theme - Magento2

texts:
I created a custom theme and now NO css is loading anymore..
Yesterday I had the same custom theme with Luma / blank as its parent and it did load, now doesn't load at all.

I removed cache and everything but it seems to be not working....


texts: Show custom attribute in Order view backend

texts:
I would like to be able to see additional attributes within the order items. So far I'm in the sales/order/view/items/renderer/default.phtml - and I've got the attributes with this snippet:

$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $_item->getSku(), array('cost'));
echo $product->getCost();

But this attribute is the cost price, and I want it to show as a price, not lige 66.000 - Is there a better solution to this? The same goes for other attributes, their attribute number is shown instead of their name, like if it was a color attribute it would say 2595 instead of Black.

UPDATE

With this I'am now able to see the suppliers:

$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $_item->getSku(), array('suppliers'));
echo $product->getAttributeText('suppliers');


texts: Get store id of the current user logged in admin

texts:
How can i get store id of the current user logged in admin in magento?
I want to restrict custom module data by the type of user logged in admin area. I followed below link http://www.pixelpaul.net/magento-restrict-admin-order-website-store-view-certain-user-role/

I have also used Amasty Advanve permission but it doesn't work for custom module


texts: Magento2 error while extension installation in create backup step

texts:
In my magento2 store I want to install the extension. I have tried this via composer as well as admin extension  manager. Every time the process failed in Backup stage after generating the 4Gb of data process automatically stop with below error,

  Warning: stat(): stat failed for
  /vendor/magento/module-page-cache/view/frontend/web/js/page-cache-bak.js
  in /vendor/magento/framework/Archive/Tar.php on line 324

I have google regarding this error, but didn’t find any solution. Can anyone tell me why this issue occurs and how to solve this.

Thanks in advance!


texts: Input type number in admin edit form Magento 2

texts:
I try to add input field type number for magento 2 by using \Magento\Backend\Block\Widget\Form\Generic in backend like this:

$fieldset->addField(
            'sorting_order',
            'number',
            array(
                'name' => 'sorting_order',
                'label' => __('Sort Order'),
                'title' => __('Sort Order'),
                'required' => false,
            )
);

when i try to load the form, it will not render the input field type number and make the form and other input fields do not render at all, but when i change the number to text, it will render the input as type text and the form fine


texts:
I use the following PHP code to get all categories and subcategories, the code is work, the only issue is that code doesn't have the URL. Is there any way to get/add URLs too?

function categoryLoop($id, $is_sub = false){
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $categories = $objectManager->create('Magento\Catalog\Model\Category')->load($id);
    if($categories->hasChildren()){
    echo '
';
        $subcategories = explode(',', $categories->getChildren());
        foreach ($subcategories as $category) {
            $subcategory = $objectManager->create('Magento\Catalog\Model\Category')->load($category);
            echo '
';
            echo $subcategory->getName();
            echo "
";
            if($subcategory->hasChildren()){ categoryLoop($category, true); }
        }
    echo "
";
    }
}
categoryLoop(2);  // enter your category id here

I created a CMS page for the contact page.


texts: Adminhtml ACL only in effect after removing given permission

texts:
I wonder if this is a bug or a problem at my side, when accessing the adminhtml page, with a user whose user role does not have the required permissions to access the page, it is possible to access the page!

This only works correctly after giving and removing the permission from the user role.

etc/acl.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="Magento_Backend::stores">
                    <resource id="Magento_Backend::stores_settings">
                        <resource id="Magento_Config::config">
                            <resource id="Vendor_Module::config" title="Custom Config Section"/>
                        </resource>
                    </resource>
                </resource>
                <resource id="Vendor_Module::general" title="Vendor Module" sortOrder="100">
                    <resource id="Vendor_Module::custom" title="Custom Resource"/>
                </resource>
            </resource>
        </resources>
    </acl>
</config>

Controller:

<?php
namespace Vendor\Module\Controller\Adminhtml\Custom;

class Index extends \Magento\Backend\App\Action
{
    /**
     * Authorization level of a basic admin session
     *
     * @see _isAllowed()
     */
    const ADMIN_RESOURCE = 'Vendor_Module::custom';

    /**
     * @return bool
     */
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed(self::ADMIN_RESOURCE);
    }
}
?>


texts: Get Customer information from order Magento 2

texts:
I want to retrieve customer information from sales order view observer in adminhtml section, currently i only know how to retrieve order in that observer like this:

namespace Namespace\Module\Block\Adminhtml\Order\View;
class Custom extends \Magento\Backend\Block\Template
{
  public function getCustomAttribute(){
    $order = $this->getParentBlock()->getOrder();

    return $order->getId();
  }
}

i need to retrieve the customer information from that order, if the order is from logged in customer


texts: Magento 2: Get quantity item from the order

texts:
I'm trying to build a custom payment module for magento 2 and i have a function in my payment module that is called on the success page. The problem is that i can't get the items quantity. I can get the name, price and sku but not the quantity. Below a bit of the code:

    $order = $this->getOrder($orderId);
    $items = $order->getAllItems();

    $i = 1;
    foreach($items as $item) {
        $product = $item->getProduct();
        $item = "<item id='".$i."'>";
        $item.= "<name>".$product->getName()."</name>";
        $item.= "<infos>".$product->getName()."</infos>";
        $item.= "<amount>".$product->getPrice()."</amount>";
        $item.= "<categoryId>".$category_id."</categoryId>";
        $item.= "<quantity>".intval($item->getQtyOrdered())."</quantity>";
        $item.= "<reference>".$product->getSku()."</reference>";
        $item.= "</item>";
        $xmlItems[] = $item;
        $i++;
    }

When using $item->getQtyOrdered(). i get the following error:

  Fatal error: Call to a member function getQtyOrdered() on string on
  line 139.

And when using $product->getQtyOrdered() the result is null.

Now the interesting part is that i use PhpED to debug the code and when i add to the watch list this $item->getQtyOrdered() the result is 1.0000.

What am i missing?


texts: PHP requirement incompatible with your PHP version | Composer module installation error

texts:
I try to install an extension using the composer:

composer require magenest/module-worldpay-and-subscriptions:2.0.0

And get this:

  [InvalidArgumentException]
  Package magenest/module-worldpay-and-subscriptions at version 2.0.0 has a PHP requirement incompatible with your PHP version (5.4.45)

When I run the php -v command it returns:

PHP 5.4.45 (cli) (built: Nov 28 2017 10:34:31)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.4, Copyright (c) 2002-2017, by ionCube Ltd.
    with Zend OPcache v7.0.5, Copyright (c) 1999-2015, by Zend Technologies

However, I have all PHP version installed on my server so when I run a command I usually specify the PHP version beforehand, e.g. php-7.0 bin/magento

Also, when using fakechroot - it has PHP version set within the context of the domain group itself. e.g when I run this command: /usr/bin/fakechroot /usr/sbin/chroot /microcloud/domains/vampm2 /bin/bash and then php -v I get:

[http]$ /usr/bin/fakechroot /usr/sbin/chroot /microcloud/domains/vampm2 /bin/bash
bash-4.1$ php -v
PHP 7.0.26 (cli) (built: Dec 19 2017 17:26:19) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.4, Copyright (c) 2002-2017, by ionCube Ltd.
    with Zend OPcache v7.0.26, Copyright (c) 1999-2017, by Zend Technologies
bash-4.1$ exit

Can anyone tell me how can I run the composer require without composer to read the default PHP 5.4? Working on Magento ver 2.1.8


texts: Programatically Updating A Categories Parent ID

texts:
I am currently in the process of reordering an entire category tree via an upgrade script. I am aware that you can update the parent ID via the following:

$category->setParentId($value);
$category->save();

Is this the right method to carry out this update?

In doing this will the path and children_count values in the catalog_category_entity table auto update or will I have to set these before saving the category?


texts: how to use plugin/other module for add html for other module in magento 2?

texts:
I want to render html (Front-side) using plugin/other module in different module.

There's already existing form in Module X.
I want add one drop-down in that from using Module Y.
How can i achieve this using Plugins/Module Y ?


texts:
i am trying to export all my products and the URL so i can edit them and then import them back, but everytime i click export after about a minute i get a 500 Internal Server Error

Request Timeout

This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.

This is getting annoying as i use to have this problem with reindexing but fixed that by using SSH. Does anybody know of a way to either increase the connection time so it doesnt timeout or a script i can use to export the URL and all products and then re import. I found this online but after about 40 seconds it jsut goes to a white screen and nothing else happens.

http://t3jsot.blogspot.co.uk/2011/08/magento-export-products-with-full-urls.html

thank you if you can help as it is very annoyign to not be able to quickly export and import data


texts: Update price attribute and save attribute

texts:
I'm updating a bunch of product prices at once, I plan on doing this using a shell script that loads a SKU and the price to update. I also need to make sure this only applies to a specific store. So here is how I planned to go about it:

Load my list of products into an array
Include Mage.php
Load the store scope
Load each product in my list by SKU
Change the price using setPrice
Save the product attribute without having to save the entire product (I have a lot of SKUs to update)
Iterate through each product using the same process

My question is, can this be done with core attributes? Or does it need a full product save? I've seen several posts and scripts of people using saveAttribute with custom attributes under the default store, but the last time I attempted this it had huge reprocussions. I've tried a CSV using the import and it won't work right, and magmi is failing due to some strange errors, so I'm forced to take matters into my own hands.


texts: Magento 2: I need to call same class method in static function

texts:
I need to call same class method in same Class static function. Is it possible.

Any idea please share.

public function getMake()
{
  // sample
}
static public function getMaker()
{
   // call getMake() function here

}


texts:
Design of website requires the final price on product view page to be formatted as below

In order to do this we need to have html like

$49900

By extending formatCurrency function we can add extra span, but what about price change on selecting custom options?

Is there any other way to do this only with CSS?


texts: Magento 2.3 added app/code/magento modules after 2.3 update (with sample data)

texts:
I recently update a site to 2.3 (with sample data enabled) no I find a lot of TestModules in the app/code/magento folder. I have 4 questions regarding these modules:

Do they come from the 2.3 update or do they come from the sample data?
Can I remove them?
Can I git ignore them because they came after composer update?
Is there a way so they do not get installed with composer?


texts: How to change Swatch Image on click swatch options in Magento 2?

texts: I have configured several products so that their images change according to the color selection, however nothing works. I recently installed an extension to be able to modify the sku of my configurable products, I don't know if it has a thing to do with the problem


texts: Join from custom table to customer_entity table and get all data customer in Magento 2

texts:
I used this code but it not working. Please help me!

$customerEntity = $locationList->getTable('customer_entity');

$locationList = $this->mpSellerMapLocatorModel->getCollection();
$locationList->getSelect()->join(
            $customerEntity.' as cpev',
            'main_table.seller_id = cpev.entity_id',
            ['firstname','lastname']
        );


texts: Magento admin not able to create new customer while creating new order

texts:
While creating new order from backend i am getting number of jquery errors and i am not able to click "Add New Customer" button as well

Any suggestions to solve above issue ? Thanks


texts: Magento 1.9 wrong price indexed for configurable products

texts: In my project some configurable products min_price,max_price and minimal_price are wrongly indexed in catalog_product_index_prices. Because of this, Sorting with price in listing is always bringing wrong result. Can you please help me out on this.


texts: magento 2: value not saved for attribute by programmatically

texts:
I am trying to save some values in my attribute by programmatically.
My attribute name is storage. type is dropdown
I am trying to save values like 32GB or 16GB
this values do not saved but if I used 'Black' or 'White' values ,it saved this kind of data
I am using Magento 2.3.4
Here is code
$optionValue = '32GB';
$attributeCode= 'storage';
    try{
                $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                $entityType = 'catalog_product';
                $attributeInfo = $objectManager->get(\Magento\Eav\Model\Entity\Attribute::class)
                                     ->loadByCode($entityType, $attributeCode);

              $attributeFactory = $objectManager->get('\Magento\Catalog\Model\ResourceModel\Eav\Attribute');
                $storeManager = $objectManager->get('Magento\Store\Model\StoreManagerInterface');
              $attributeId = $attributeInfo->getAttributeId();
              $attribute_arr = [$optionValue];

              $option = array();
              $option['attribute_id'] = $attributeId;
              foreach($attribute_arr as $key=>$value){
                  $option['value'][$value][0]=$value;
                  foreach($storeManager as $store){
                      $option['value'][$value][$store->getId()] = $value;
                  }
              }

              if ($option) {
                  $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                $eavSetupFactory = $objectManager->create('\Magento\Eav\Setup\EavSetup');
                $eavSetupFactory->addAttributeOption($option);
              }
            }catch(Exception $e){
              echo $e->getMessage();
            }


texts: Can't delete a block (SKU number) from product page. (Magento 2)

texts:
I want to remove the SKU numbers from the product page, so I copy the content of vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml to <vendor>/<my-theme-dir>/Magento_Catalog/layout/catalog_product_view.xml and I replace the following lines...

<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.sku" template="product/view/attribute.phtml" after="product.info.type">
    <arguments>
        <argument name="at_call" xsi:type="string">getSku</argument>
        <argument name="at_code" xsi:type="string">sku</argument>
        <argument name="css_class" xsi:type="string">sku</argument>
        <argument name="at_label" xsi:type="string">default</argument>
        <argument name="add_attribute" xsi:type="string">itemprop="sku"</argument>
    </arguments>
</block>

... to the following:

<referenceBlock name="product.info.sku" remove="true"/>

After saving, I do the following commands

sudo php bin/magento cache:clean
sudo php bin/magento setup:static-content:deploy nl_NL en_US

and I delete the content of pub/static/frontend/<my-theme> and var/view/preprocessed/css/frontend/<my-theme>

I also tried

sudo php bin/magento setup:upgrade
sudo setup:di:compile
sudo php bin/magento setup:static-content:deploy nl_NL en_US

However, the SKU number is still there:

What should I do? Thanks in advance.


texts:
For a new fashion project we want to define a new product image attribute (color_swatch or pattern). We can't use the standard color swatch functionality, because for fashion products the color swatch is mostly product specific. The definition of the new attribute(s) is exactly like in M1, and can be done in backend or in code. So far so good.

It would be nice to define image sizes via view.xml, so that we have a standard resize of these new images that is generated automatically. Unfortunately, the view.xml is validated against an XSD validation, which restricts the type options for the different images (see vendor/magento/framework/Config/etc/view.xsd). I tried to extend the default validation using DI, it might work (kind of) but it feels really hacky and it's absolutely neither flexible nor portable. I really thought this would be an easy task (in M1 it was very straightforward and we used it in nearly every project), but I couldn't find a solution that feels proper.

Has anyone already tackled a similar task? How did you solve it? I could maybe skip this view.xml step altogether, or rewrite the whole thing, but I feel there should be a way to get around it. Does the system have a standard way to achieve what I'm trying to do?


texts: Magento reindex from command line, still having timeout error

texts:
I'm trying to reindex my catalog_url_rewrite table (Magento website) through the command line using the command "php indexer.php --reindex catalog_url" in /shell. I get the following error:

PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /var/www/domain.com/lib/Zend/Db/Statement.php on line 141

The file and line on the error varies.

I've double checked to confirm that php in the command line is indeed using the php-cli version (by using "php -i") and that there are no limits in its config that should yield such an error.

I've also looked around to see if any magento file is setting the "set_time_limit" manually, but couldn't find anything that points that way. I can't find the 60 seconds max_execution_time anywhere.

Any idea on what's going on?

Edit:

So far I've tried:

Running "php -d max_execution_time=0 indexer.php --reindex catalog_url"
Setting "set_time_limit(9000);" on indexer.php directly.
Running "php -i" to see "Configuration File (php.ini) Path => /etc/php5/cli" & "Loaded Configuration File => /etc/php5/cli/php.ini"
Setting max_execution_time on fpm's php.ini to 61 just to see if it was using it by accident.
Made sure "set_time_limit(60)" is not hardcoded anywhere in the magento framework.


texts: How to add quantity option to each product item in the category list page?

texts:
How can I add quantity option to each product item in the category list page?

By default, you can find this in Magento list.phtml,

<?php if($_product->isSaleable()): ?>

<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Add to Cart') ?></button>

<?php else: ?>

<?php echo $this->__('Out of stock') ?>

<?php endif; ?>

So every time you click the Add to Cart button, it is only 1 quantity to be added to the shopping cart.

I want to add this option so the customer can add the quantity they want at this stage,

<?php if(!$_product->isGrouped()): ?>
    <input type="text" name="qty" id="qty" placeholder="1" maxlength="12" value="<?php echo $_product->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty input-quantity" />
<?php endif; ?>

The first problem is that <?php echo $_product->getProductDefaultQty() * 1 ?> always shows the value of 0.

The second problem is that if I put the quantity value manually to be, say 20, I will still get 1 only for that product item that I have clicked to add to the shopping cart.

Any ideas?


texts:
I created a custom attribute called validity_date and assigned it to the default product attribute set. When I create a product I have to enter some values for it. Seems all to be fine, but in the checkout process I have a function that should group the products in a specific way. The problem is that the validity_date is not delivered with the product. I wonder what I can do to get the attribute value, set to the product.

public function getProductsOrderedByValidityDate($order) {

    // get all products
    $productCollection = $order->getAllItems();

    // sort all products for each day
    $orderProductArray = array();
    foreach ($productCollection as $product) {
        $validityDate = $product->getData('validity_date');
        Mage::log($product->debug());
        if ( !array_key_exists($validityDate, $orderProductArray) ) {
            $orderProductArray[$validityDate] = array();
        }

        array_push($orderProductArray[$validityDate], array(
          'product' => $product->getId(),
          'qty' => $product->getQtyOrdered()
        ));

    }
    return $orderProductArray;
}


texts: CMS statsic blocks doesn't show for Ar store language - Magento 2?

texts:
i have a multi language Magento2 Store and i have CMS static blocks in home page , so to translate these blocks i had to duplicate each block and change store view to En or Ar for each block to show in En or Ar Store View only
But after doing that and adding the blocks in cms_index_index.xml i found no blocks showing in the Ar Store View

so here i have the code for adding blocks,Both of En and Ar Blocks

  <container name="alert.block" htmlTag="div" htmlClass="alert show" after="subscribe.block">
    <block class="Nobles\Core\Block\Alert" cacheable="false" name="alert-block">
      <arguments>
        <argument name="block_id" xsi:type="string">alert-block</argument>
      </arguments>
    </block>
  </container>

  <container name="alert.block" htmlTag="div" htmlClass="alert show" after="subscribe.block">
    <block class="Nobles\Core\Block\Alert" cacheable="false" name="alert-block-en">
      <arguments>
        <argument name="block_id" xsi:type="string">alert-block-en</argument>
      </arguments>
    </block>
  </container>

and here is the settings for the block that doesn't show


texts: How to add a custom customer attribute to the sales grid

texts:
I have a custom customer attribute named "sage_account_number" and I would like to add this to the sales grid.

Could someone advise how I would add this?

I have tried

$collection->getSelect()->join('customer_entity','main_table.customer_id = customer_entity.entity_id', array('sage_account_number' => 'sage_account_number'));

However this doesnt seem to work


texts: How to override a magento 2 extension installed using composer

texts:
I have installed a magento 2 extension via composer. Using composer to install an extension places the file inside of the core vendor file.

File I want to edit:

vendor/extension-vendor/magento2-extention/view/frontend/templates/email/template.phtml

I have tried to place the above path inside of app/code wit hthe following path, but this did not seem to work.

app/code/extension-vendor/magento2-extension/view/frontend/templates/email/template.phtml

If I want to extend the extension that I just installed. How would I do this?


texts: CSS files not loading in the backend after base URL changed

texts:
I had to change the Base_URL since the pages were not loaded by simply giving localhost/magento/ so i had to change it as localhost/magento/index.php

I set the values of the web/unsecure/base_url and web/secure/base_url as http://localhost/magento/index.php/ in the default scope and same in the website scope. By changing this way all pages were loaded correctly but without the CSS .

I did many changes described in many forums and nothing worked out.
Then i changed the values of website scope of web/unsecure/base_url and web/secure/base_url as http://localhost/magento/ and frontend seems to be working well with the CSS files being loaded properly.

But the problem persists in the backend where CSS is not loading..

Help me. Thanks in advance.. :)


texts: Change lowercase to uppercase in transactional emails

texts:
I'm very new to all this but I'm still learning even after 50! Maybe one day I know it all! ;-) I'm looking at the transactional emails and want to make some changes on the following code: See bold

{{var vendor.vendor_id}} The outcome of this is the vendor_name but this is lower case. How can I make the outcome uppercase?

{{var vendor.email}} The outcome of this is the vendor email address but how to hide this url and have this replaced by just Email Us

{{var homepage}}. Also here the outcome is a long URL of the vendor store but would like to replace this with the vendor name only. So the url should be hidden and show Vendor only

Thank you so much for your help!


texts: force VAT number / only sell to B2B customers

texts:
I have a situation where a shop can only sell to B2B customers. The boss suggests that the simplest way to force this validation is using the VAT ID - if a customer doesn't enter a VAT ID, then the checkout cannot continue.

Does anyone know how to best implement this? I don't find a specific extension for that yet.


texts: 404 Error when accessing image in pub/media

texts:
Ive been struggling with this for a few weeks now and dont seem to be getting anywhere. I have installed a module that reads images from a directory 'pub/media/import' however when I navigate to the image I get a 404 error. If I move the image up a directory the image works fine. Any ideas? I assume this is something to do with .htaccess but im unsure which file.

Working: https://www.example.com/pub/media/1.jpg,

404 error: https://www.example.com/pub/media/import/1.jpg


texts: Magento 2 Translation on Ajax Backend Not Working

texts:
I am making ajax request , and I call __('string to translate') function on backend. The problem is that translate is not working at all.
My ajax controller is implementing HttpPostActionInterface Interface to avoid massive data load. If I use previous way, i.e extending \Magento\Framework\App\Action\Action , the translation is working good, however I don't wan't to extend this huge class. Have anybody got idea why HttpPostActionInterface is not working with translations?
I've tried various things, including this here , however nothing seems to be working. I will do translations on frontend side eventually , but this doesn't explain why translations are missed on this interface?


texts: Magento admin taking too much time to save product in admin


texts: Magento 2 Shipping Address Validations doesn't work

texts:
I try to create one module for display all steps together in checkout. Its like one step checkout. But I have got a very strange issue. Shipping Address validation work perfectly while I try to select shipping method directly without filling shipping address but its not working while I try click Place Order button directly. Its give only email address validation.

Anyone have idea how can I do validation on place order button click event?


texts:
[[ TLDR: I'm looking for info about (or a module) that would allow me to have child themes inherit widgets from their parents. For widgets that were created on the backend. ]]

This is for Magento 1.9x (1.9.3.8 to be exact).
I'll describe what I did; and then what I expected it to do but doesn't.
To start with, we're using the default theme rwd/default.

Step 1: Make a static block named test_block

Step 2: make a widget, configure it to show on the right-side column

Result: GOOD - This works just fine when viewing the site with rwd/default theme

Step 3: make a new theme: rwd/green

specified parentage in app/design/frontend/rwd/green/etc/theme.xml

<?xml version="1.0"?>
<theme>
    <parent>rwd/default</parent>
</theme>

and switch appropriate settings in Configuration > GENERAL > Design > Themes so the site uses the rwd/green theme.

Result: BAD -- the widget does not get inherited into the child theme

Observed behaviour: widgets don't get inherited.

Expected behaviour: I expected the child theme to inherit the widget from its parent instead of me having to explicitly specify all widgets on all child themes.

This can/will be a significant pain with temporary themes (ie xmas/easter/summer break themes that are minor tweaks based on a parent and used sporadically or for a short time) or with customizations used only under a specific scope (ie. one category or one product with theme tweaks by using a child theme)

As you can imagine, specifying all those widgets explicitly for each theme color variation or for each seasonal theme is going to be an issue. I would like to be able to propagate the widgets into the child themes thus only have to set the widgets once, at the parent.

Is there a module floating around out there that covers this?

To be clear this is a question about widgets/cms blocks made using the backend system and not the layout xml/template phtml files.


texts: Magento 2.2.9 question about foreach data into popup modal

texts:
I am trying to do a popup modal with this information I have in an array.
I have ID, NAME and DESCRIPTION

So in a function, I have done foreach to gather all the information and i am showing it on phtml by

       if ($ReleaseDate <= $currentTime){
            echo "<div>" ."ID => ". implode(" ", $product_id) . " NAME=> "  .$productData->getName() . " DESCRIPTION=>" .$productData->getDescription();"</div>";
        } else {
            return false;
        }

Currently, I get this following details :
ID => 1
NAME=> test
DESCRIPTION =>testing product

I want to do a popup modal not sure if this is possible.
First only show the ID and click ID to see NAME and DESCRIPTION


texts: synchronization between multiregion Shops

texts:
Our main business is in Germany and we try to sell our products in China. At first we used our existing infrastructure in Germany with new a new storeview, but the latency from China was very high. A Varnish cached page took ~12 Seconds.

So, we set up new server in Singapore. Singapore is the nearest AWS region to China. We also set up a read-replica which was also hosted in Singapore.
All read-transactions were very fast, but the writes to the master-database in Germany were still very high. To add a Product to the Cart it took ~4s. In our German store it took ~400ms. Even the replication lag was high.

A Solution which I thought about was to host a standalone Shops in China and synchronize everything to centralized systems like a ERP, PIM etc.
At the moment, we don't have a ERP or PIM and in my opinion we don't need it, because we have just ~50 Products, don't use automatic stock management and outsourced the shipping.

My second thought was, that we could use our Magento system in Germany as a centralized system and synchronize Products, Orders, Customer, etc. between the standalone Shops. If we synchronize everything with a cronjob the latency should no longer be the problem.

For me it's important that our Employees don't have to use multiple backends.

Does anybody has a similar problem and found a convenient solution?
Or is there already a good synchronization script for Magento?

P.S.: We tested the performance of our Chinese Site with a lot of local Chinese people in different regions in china and not from Germany :)


texts: Trying to locate the file that contains the code for index.php/admin/catalog_product/edit

texts:
I'd assume the file to be Adminhtml/controllers/Catalog/ProductController.php looking at the editAction() function but this seems to not be the case.

Could somebody point me at the correct file location please.


texts: Is it possible to get an object if exist by object manager in magento 2?

texts:
I wanna get some object in magento to like

 $this->objectmanager->create(`'path\to\some\class\in\another\module'`)

but i wanna get 'path\to\some\class\in\another\module' object just if the module of this class exist(and get null if not exist instead of php errors).
is that possible?


texts: jquery.mobile 1.4.3 Uncaught TypeError: Cannot read property 'concat' of undefined

texts:
Whenever I trying to use a greater version of jquery 1.12.4 then this issue comes.
and whenever I use lower version then "post" function error

so please give me a solutions.


texts: Convert a production database into test data

texts:
The closer a test is to production, the better it can emulate production behavior. I would like to copy the database backups from production into our test environments, but what do I need to change so that test works, and to keep from interfering with production or accidentally emailing real customers (besides setting web/%secure/base_url with the test url)?

Another way to think about this question would be to consider how to generate something like Magento Sample Data from my own production data.


texts: Magento 2 USPS Log Not Created in Debug Mode

texts: So I have debug set to Yes on the USPS shipping method but no log is being created in var/log. I am in developer mode and I have checked all scopes to be sure debug is enabled. Anyone else have this issue on Magento 2.1.10?


texts: Programmatically Add a string custom option to a product in the cart?

texts:
I just would like to add a string as custom option so that it visible in the cart, when the product is rendered.

There is any straight way to do that ?


texts:
We have Magento 2 EE installation, and we are using native Cybersource extension for Credit Card payment. Each site has it's own base URL (with different domains). In Cybersource we have created different profiles per site, with corresponding response page configuration. On storefront each site can do it's payment well, but when we are trying to do payment from Magento Admin (backend) we are having this error:

Refused to display 'https://site1_base_url/cybersource/SilentOrder/TokenResponse' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Because admin's and site's (for which we are doing payment) domains are different.


texts: magento 2 custom api return in json without response tag

texts:
I have created a custom api following "inchoo" tutorial. But I am getting the data in string format instead of json.

From my browser I am getting a  tag surrounding the api return as below.

But Chrome's postman extension showing a double quote ("") and some extra slashes () in the in the response even after header to "Accept":"application/json" and "Content-Type":"application/json".

I just want to receive the exact same string I am returning in my Model class.

 public function name() {
    //return "Hello, raihanruhin";
    $arr = '[{"name":"MasterCard"},{"name":"VISA"}, {"name":"DBBL-NEXUS"}, {"name":"American Express"}]';
    return $arr;
}


texts: How to move product.info.mailto block in custom layout file in magento 2?

texts:
In vendor file

  \magento226\vendor\magento\module-catalog\view\frontend\layout\catalog_product_view.xml

I found

<container name="product.info.extrahint" as="extrahint" label="Product View Extra Hint">
                        <container name="product.info.social" label="Product social links container" htmlTag="div" htmlClass="product-social-links">
                            <block class="Magento\Catalog\Block\Product\View" name="product.info.addto" as="addto" template="Magento_Catalog::product/view/addto.phtml">
                                <block class="Magento\Catalog\Block\Product\View\AddTo\Compare" name="view.addto.compare" after="view.addto.wishlist"
                                       template="Magento_Catalog::product/view/addto/compare.phtml" />
                            </block>
                            <block class="Magento\Catalog\Block\Product\View" name="product.info.mailto" template="Magento_Catalog::product/view/mailto.phtml"/>
                        </container>
                    </container>

Now I want to move product.info.mailto block in custom layout file and for that, I added this is in

  /app/design/frontend/Local/argento-stripes-custom/Swissup_Amp/layout/catalog_product_view.xml

<move element="product.info.mailto" destination="product.info.main" after="-" />

parent theme is luma but its not working


texts: E-mail admin when customer changes address on frontend

texts:
Is it possible to create an e-mail function to send the store administrator an e-mail when a customer changes his/her address on the My Account page?

How can i accomplish this, where and how should i start?


texts: Magento 2.3: Search is not working for specific search terms/queries

texts:
I'm having a strange issue with our website. The issue is that, when I'm searching with some specific keywords like TV, AC, It's not giving me the results and its returning empty results as below though we are having the products related to that keywords.

Your search returned no results

I thought its because of the search keyword length but its not because if I search with different keywords with 2 letters its working fine.
So I have removed the existing query from Search Terms which are AC, TV and created a new with same names but still its returning empty results.
Please guide.


texts: When i wants upload any image for product, i can't get image Browse and Upload Image option. I am using Magento 1.9.0.1. How can i solve this issue?


texts:
I've created a new customer address attribute called 'landline' (required). I've used the code generated by https://mage2gen.com/ which seems 'correct' to me:

Attribute is correctly created and displayed
I can save the attribute from the backoffice

However, if I try to create a new address programmatically and set a value for this new attribute, I get the following error:
"Landline" is a required value.

If I create the attribute but it's not required, then the address is generated, but the landline field is empty.
This is the code I use for address generation:
$address = $this->customerAddressFactory->create();

$address->setCustomerId($customerId)
                ->setFirstname($addressData['firstname'])
                ->setLastname($addressData['lastname'])
                ->setCountryId($addressData['country_id'])
                ->setRegionId($addressData['region_id'])
                ->setPostcode($addressData['postcode'])
                ->setCity($addressData['city'])
                ->setTelephone($addressData['fax'])
                ->setData('landline', $addressData['telephone'])
                ->setStreet($addressData['street_array']);

$this->customerAddressRepository->save($address);

As you can see, I'm using 'setData' for landline attribute. If I use: setLandline, the following error is thrown:
Call to undefined method Magento\Customer\Model\Data\Address::setLandline()

How can I save this attribute programmatically? What am I doing wrong? I'm using Magento 2.4.1


texts:
I require a marketplace extension where I can heavily restrict what the logged in user sees and what they can do.

I want to be able to:

Create/edit the listings
Handle all of the shipping tracking input
Handle any inquiries from buyers

I only want the seller to able to see the listing in their account. They will not able to change, add, edit or communicate with buyers. Basically it would be like viewing their order history however it will show what items of theirs are for sale.

A marketplace extension may not be the right solution so if anybody has any suggestions it would be greatly appreciated.

Thanks.


texts: Save multiple repository with rollback(if any error)

texts:
I need to save multiple repository like this, but I need to use to save Id of first repository in second repository and third and fourth one, so I think I can't use the link example with repository. Is there any other way to do this?
For example,
$repositoryOne = $this->repository->save($demo);
$someAnotherObject->setSomeId($repositoryOne->getId());
$repositoryTwo = $this->repository->save($someAnotherObject);
$someAnotherObject->setSomeId($repositoryTwo->getId());
$repositoryThree = $this->repository->save($someAnotherObject);

If some repository failed to save by any reason then It should revert all saved data.


texts: Duplicate Order Creation in Magento 1.9.1.0

texts:
I am getting an issue with Paypal standard for few customers.
When payment received there are two orders logged in magento. Both of which go into payment pending status and then subsequently one is released into processing state and the other remains in pending payment state.

Can anyone share me how to fix this.


texts:
I'm trying to figure out why when the inventory quantity of a product reaches 0, the stock_status for the product is still In Stock. This happens after reindex as well. The only way to get the product stock_status on Out of stock is to save the store configuration from Catalog->Inventory section.
 Does anyone know the reason.
Magento version currently used is 2.2.2

EDIT:

I update with stock configuration

Product settings


texts: Trigger event , when product comes from search

texts:
I want to trigger Product Viewed event , when product is viewed , but only for the product that comes from search results.

Any idea how to achieve this ?

Thank.


texts:
Magento 2 Admin Url Redirecting to Homepage with index.php

my admin name is admin

https://www.muzikhausberlin.de/admin

when i enter this it goes to

https://www.muzikhausberlin.de/index.php

any once can advice?


texts: Image not shown in edit page in Magento 2

texts:
I used this answer to implement ui image uploader in my custom module.

It's working good. But whenever I go into edit the page image is not coming.

How can we show the uploaded image in edit page?


texts: I am trying to install composer using "composer install" from my command terminal display error.


texts: Resize just bundge and grouped images for list and PDP

texts: How to resize just bundge and grouped images for list and PDP? Looks like it's necessary to do via view.xml, but IDs are not clear


texts:
I recently installed a theme I purchased (called Venedor) on the latest magento ce install.  I'd been manually adjusting the css file of the theme until I recently discovered that magento allows for subthemes, which sounds great since it would help prevent me from having to keep track of the changed files for future updates.

Unfortunately I seem to have run into a strange problem.  I was able to create my subtheme files in /skin/frontend/venedor/my_subtheme, and it looks like the changes work perfectly on the home page of the site, as well as on the product pages.  But for some strange reason the subtheme changes aren't working at all on the category pages, and magento seems to be reverting back to the Venedor default theme.  Is there some reason why this might happen?  I'm not sure if there's some sort of configuration on the backend I'm missing, or if there might be some sort of problem with the Venedor theme.


texts:
I was wondering if someone knows how i can customize the "browse" (change language, and add some css to it ) button for uploading a file on the product page(custom options)

The customer should be able to upload multiple files, no you can only upload 1?

I also want to hide the max allowed image dimensions.

Thanks!


texts: Cannot read contents from file app\design\adminhtml\Magento\backend\etc\module.xml in Magento 2

texts:
I have created a adminhtml theme but it's throwing error. Could you please clarify me where I went wrong?

my code is:

root/app/design/adminhtml/Magento/backend/composer.json

{
    "name": "magento/theme-adminhtml-backend",
    "description": "N/A",
    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0",
        "magento/framework": "100.0.*"
    },
    "type": "magento2-theme",
    "version": "100.0.2",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
                 "files": [
             "registration.php"
         ]
     }

}

root/app/design/adminhtml/Magento/backend/registration.php

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

\Magento\Framework\Component\ComponentRegistrar::register(
        \Magento\Framework\Component\ComponentRegistrar::MODULE,
        'adminhtml/Magento/backend',
        __DIR__
    );

root/app/design/adminhtml/Magento/backend/theme.xml

<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Magento 2 backend</title>
</theme>

Could you please clarify me where I went wrong?


texts: How Magento2 add attribute option programmatically (not in setup)

texts:
I try to add options for size and color attributes in my importer modul but I don't how...:

private function addOption($attributeCode, $value)
{
    $ob = $this->_objectManager;
    /* @var $m \Magento\Eav\Model\Entity\Attribute\OptionManagement */
    $m = $this->optionManagement;
    /* @var $option \Magento\Eav\Model\Entity\Attribute\Option */
    $option = $this->attributeOption;

    $option->setLabel($value);
    $option->setValue($value);

    $m->add(\Magento\Catalog\Api\Data\ProductAttributeInterface::ENTITY_TYPE_CODE,
            $attributeCode,
            $option);

This report an error (I modified exception reporting on OptionMaganger.php to Exception->message)

  Cannot save attribute size Notice: Undefined index: delete in /var/www/html/magento2/vendor/magento/module-swatches/Model/Plugin/EavAttribute.php on line 177

The OptionManagement and Option come from _contstructor
With OptionManagement I can retrieve the existing items, so should be ok..

setLabel() and setValue() are default, but I tried setData, load option instance and pass by OptionManagement->getItems to add(...) "again",
but error still exists...

Any idea, how can I append EAV Options (swatches?) during the import process? (not in modul setup)

Update :

Other way I can add option:

$attributeCode = 137; /* on size, 90 on color ... */

$languageValues[0]='Admin Label';

$languageValues[1]='Default Store Label - XXXXL';
$ob = $this->_objectManager;

private function addOption($attributeCode,$languageValues){
$ob = $this->_objectManager;
/* @var $attr \Magento\Eav\Model\Entity\Attribute */
$attr = $ob->create('\Magento\Eav\Model\Entity\Attribute');
$attr->load($attributeCode);
$option = [];
$option['value'][$languageValues[0]] = $languageValues;
$attr->addData(array('option' => $option));
$attr->save();
}

This way Magento2 can save an option to attribute, but I dont know what is the "official" way :)


texts: Got 70 Items in Cart which I can't remove!

texts:
Good Morning to all.

First of all please note that I am not the merchant but a buyer. I do use shop.funko.com to purchase Pop Vinyl Figures. This problem has been persistent and I ended up buying via guest to temporary be able to buy.

However I want to see my order history but whenever I log in (successfully). Whenever I try getting either into my basket or my order history I keep getting the blank white page with

  There has been an error processing your request Error log record
  number: 712693230067 (numbers vary this is just one).

It is happening on all browsers and cache is clear.

Thanks for any help.

Clayton :)


texts: Product price as per weekdays in Magento 2

texts:
If I need to change product price based on week days what is the efficient way for this?
Like product is a booking entity (like flight ticket) & every Wednesday & friday amount of product is higher than usual.
Customer can book it for future so price will show & calculate accordingly.


texts: Magento 2 : How to display the category image in the topmenu

texts:
How to display the category image in the topmenu?

I need to edit/overwrite the block file, but I can't get the code to actually extract the image.


texts: Magento2 Display Edit Account in a popup

texts:
When a user logs into their account, they see their dashboard. Upon clicking "Edit" under Account information, instead of default functionality, where magento redirects user to

  magento.local/customer/account/edit/

and displays the edit form, i need to display the form in a modal popup

I know where to edit the form styling etc, but how can i use the same form to display in a modal popup?


texts:
I have my magento 2 site in develop mode and have disabled the cache but my theme is not picking up changes to my css file.

Is there anyway to update the css without the need to:

Remove pub/static [keep the .htaccess]
Remove var/cache
Remove var/generation
Remove var/page_cache
Remove var/view_preprocessed
run php bin/magento setup:static-content:deploy


texts: Magento 2 :- How to add product on CMS page

texts:
I want to add product url as button for product programmatically. After clicking it should process for purchasing process. I want to add it on CMS or any custom page.(exactly how we can add it through

admin panel,

> Page->edit page->add widget(product url link)->save).


texts: magento 1.8 bundle product get 2 highest product price

texts:
I am trying to create a bundle product here i just show final price as highest 2 product prices.

For example

Product-1 price Rs. 100
Product-2 price Rs. 200
Product-3 price Rs. 300

Final price is Rs. 500

For the above  final price = (Product-2 + Product-3) as Rs. 500 /-

How can i show that in bundle products view & list pages.

Thanks in advance...!


texts:
unfortunately I am new to Gulp, and I really need it to debug and sourcemapping, so to better understand less too, which is also quite new for me.

Anyway everything in place, I deploy trough usual bin/magento since the gulp exec and gulp deploy give me errors.

but it seems that gulp less --theme --map does not produce any less or map file, where they should be? If I use web inspector on Safari 11 it still give me the style-l.css and style-m.css and not the less behind them,

I read on another tread to cmd-click should bring me to the less, but it doesn't

what am I do it wrong?


texts: why Magento2 serves LESS files when I'm in server-side-less-compilation modus?

texts:
I have changed my admin-config LESS compilation modus to: Client side less compilation.
Now I have changed it back to: Server side less compilation.

But my admin panel and webstore still serve less files instead of css files...

I have tried:

flush cache
setup:di:compile
rm -rf var/view_preprocessed

But nothing is working.

How can I get css files instead of less files?


texts: How to print email body data before send email in magento 2

texts:
How to print email body data before send email i am working on local i want see the email data what data is going on email
i tried to print $transport but its not working can someone please let me know how we can trying email data


texts:
I am about to implement the HTML in Magento (Skinning), should I go with the base theme building everything custom or should I go with the provided RWD theme and use default functions and their functionalities. I want to know which one is less complicated and less time consuming. Also, I have not any experience with implementing the RWD theme. I have worked with base theme.

I would like to know the pros and cons a comparison between these two.


texts:
I have recently started learning magento and would appreciate if anyone could explain what this does, especially the method addItemRender.

<adminhtml_sales_order_view>
 <block type="adminhtml/sales_order_view_items" name="order_items" template="sales/order/view/items.phtml">

                        <action method="addItemRender"><type>default</type><block>adminhtml/sales_order_view_items_renderer_default</block><template>sales/order/view/items/renderer/default.phtml</template></action>

                    </block>
</adminhtml_sales_order_view>

I do understand that it calls the method addItemRender with params $type, $block, $template on the block adminhtml/sales_order_view_items, but what I dont understand is what happens next and is it the same as below and calling getChildHtml() in the parent phtml ?

    <adminhtml_sales_order_view>
     <block type="adminhtml/sales_order_view_items" name="order_items" template="sales/order/view/items.phtml">

<block type="adminhtml/sales_order_view_items_renderer_default" name="order_items" template="sales/order/view/items/renderer/default.phtml"/>

                    </block>
</adminhtml_sales_order_view>

Any help would be really appreciated


texts:
If select payment method Paypal Express Checkout, Redirecting to
SHOPPING CART You have no items in your shopping cart.  Click here to continue shopping.


texts:
In setting up a Cart Rule, I wanted to restrict the use of coupon code from a particular category. Meaning, products from all other categories can use the coupon, just not this particular one. It really confuses me because the below works:

If ALL  of these conditions are TRUE :

    If total quantity  greater than  0  for a subselection of items in cart matching ALL  of these conditions:
    Category  is  114

The category that I don't want the coupon to be able to be used for is 114. However, only with this rule did the effect works.

When I change it to

If ALL  of these conditions are TRUE :

    If total quantity  greater than  0  for a subselection of items in cart matching ALL  of these conditions:
    Category  is not  114

Suddenly I can use the coupon code for only products in category 114.

Is this a magento bug? I am using 2.1.5.


texts:
sort by price is not working in magento 1.9

my site has just configurable products only .
when i checked code it was using below code to load products

$_productCollection=$this->getLoadedProductCollection();

so i though of temporary fix (below code) , but that code work fine for just single page , issue is still there when user navigates to next page. so i need way to fix this bug . Does any one have idea page where getLoadedProductCollection is defined . So i can add sort there to fix issue

foreach($_productCollection as $mprod){
    $products=Mage::getModel("catalog/product")->loadByAttribute('sku',$mprod->getSku());
    $obj = Mage::getModel('catalog/product');
    $product = $obj->load($products->getData('default_configuration_id')); echo " ";
    $mysortprice[(int)$product->getPrice()] =  $mprod;
}
$sortorder = (string)$this->getRequest()->getParam('dir');
$sorttype = (string)$this->getRequest()->getParam('order');

if($sortorder=='asc' && $sorttype=='price'){
    ksort($mysortprice);
}else if($sortorder=='desc' && $sorttype=='price'){
        krsort($mysortprice);
}


texts: Magento2: How to add script .js to block

texts:
I want add script with reviews to custom_block in magento 2.

    &raquo; przeczytaj wszystkie opinie

after save, I see only this content in html.
 Looks .js do not work here. Any solution?


texts: magento projects opens as php code on ubuntu

texts:
I'm deploying on ubuntu ec2 instance, but when I tried to open the store, it open index.php code instead of running it

How to solve this problem


texts: Magento 2 : Payment Method is Hidden in Admin When Creating Manual Order

texts:
Recently I upgraded to Magento 2.2.2 and tried to create a test order on my site via admin.

All goes fine until selecting the payment method. I've enabled Purchase Order as a payment method, and prior to the 2.2.2 upgrade, this was selectable in the order screen.

The option label appears but the input box doesn't.

I checked the console for errors, and none are shown. So I looked for the input field itself and noticed that the fieldset element has a style applied - style="display: none" but it's not in the admin stylesheet, it's applied directly to the fieldset element.

This means I can't place the order, as the field is required... If I disable the "hidden" style in the console I can see the form error when trying to submit the order.

Can anyone advise how to fix this?


texts: How to do multiple partial online refunds?

texts:
I am trying to perform online partial refund on Magento 2.2.0, but once I press on creditmemo button in invoice page, and first partial refund is performed, you cannot perform another partial refunds after first one, because credit memo button will not appear anymore.

I traced the issue, and found that there is is_used_for_refund column inside the invoice table, that is set to 1 and prevent other partial refunds from taking place,

I am asking is it possible to issue partial refunds multiple times in Magento2? if yes, how can I enable that?


texts:
I've migrated my shop to another server but getting following error, even

php bin/magento setup:upgrade

couldn't help.

a:4:{i:0;s:559:"Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Magento_Catalog schema: current version - 2.1.4, required version - 2.1.3
Magento_Catalog data: current version - 2.1.4, required version - 2.1.3
Magento_Quote schema: current version - 2.0.4, required version - 2.0.3
Magento_Quote data: current version - 2.0.4, required version - 2.0.3
Magento_Usps schema: current version - 2.0.1, required version - 2.0.0
Magento_Usps data: current version - 2.0.1, required version - 2.0.0";i:1;s:2711:"#0 /home/blackdee/public_html/project/LCS-Webshop/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#1 /home/blackdee/public_html/project/LCS-Webshop/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#2 /home/blackdee/public_html/project/LCS-Webshop/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#3 /home/blackdee/public_html/project/LCS-Webshop/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#4 /home/blackdee/public_html/project/LCS-Webshop/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#5 /home/blackdee/public_html/project/LCS-Webshop/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#6 /home/blackdee/public_html/project/LCS-Webshop/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#7 /home/blackdee/public_html/project/LCS-Webshop/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#8 /home/blackdee/public_html/project/LCS-Webshop/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#9 /home/blackdee/public_html/project/LCS-Webshop/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#10 /home/blackdee/public_html/project/LCS-Webshop/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#11 {main}";s:3:"url";s:21:"/project/LCS-Webshop/";s:11:"script_name";s:30:"/project/LCS-Webshop/index.php";}

Thanks.


texts:
I`m building digital store in Magento 1.9. Site is selling the same downloadable products but with different prices depending on what license our client want to buy.

Let me clarify what I need:

We have several types of licenses: for personal use, for advertising, for TV etc. Respectively the prices are changed when client chooses the type of usage of our downloadable product. If user selects "for personal use" the whole catalog have to show the price for "personal use".

How to change whole catalog prices on the fly?
The best example of what I need I found in audionetwork.com


texts: How to show Block depending on Customer Logged In/Out in Magento 2

texts:
I want to Show Conditionally Depend of customer logged in status

For Magento 1 i Found this Solution i want Same Lopic for Magento 2

// is Logged in
<customer_logged_in>
    <reference name="name_of_reference_block">
        <block type="cms/block" name="block_name">
            <action method="setBlockId">
                <block_id>block_id</block_id>
            </action>
        </block>
    </reference>
</customer_logged_in>

// is Not Logged IN

<customer_logged_out>
    <reference name="name_of_reference_block">
        <remove name="name_of_block_to_remove"></remove>
    </reference>
</customer_logged_out>


texts: How to add code to Magento shop with uDropship marketplace installed

texts:
I have an installation of Magento community installed (v. 1.81). In this installation I have installed the uDropship Marketplace, which allows us to have multiple vendors on the site.

But my problem is, that I need some additional information on the different vendors that the module do not support out of the box. I need the vendors to be able to include their nationality and native VAT-rate (a special European sales tax rate).

How do I do this, the VAT/tax-rate is needed to calculate the products prices based on the specific vendor VAT rate. In other words, can I just add the fields in the Unirgy uDropship_vendor table or do I need to implement and consider std. Magento functionality as well?

I hope you are able to help me out - I do not hear back from Unirgy support, though they have been great on helping me out earlier..


texts: Edit module records redirects me to Dashboard

texts:
I am developing my 1st module for Magento 2.
It's a simple module showing a list of records from a db table which can be edited, opening a form.

The problem i have is that each time i am trying to edit a record redirects me to the dashboard.
I disabled the keys from the urls and is working fine without the keys.

Does anyone has a clue why this could happen?


texts: I am facing very weird issue, when i add a products on my cart and then register as a new user and later on try to place an order by going to the billing information page. It doesn't move ahead. nothing happens after clicking the continue button. On mobile website everything is working fine. But on desktop i am facing such isse. Do anyone know any way out this ?