texts: Magento 2: Move place order button from payment to sidebar on checkout page?

texts:
I want to move the place order button from the payment to sidebar on checkout page.

Anyone can give me a suggestion?

Edit: Is this even possible (with the answer/approach provided)?

From my research every payment method has its own .html template including an own button. This button is not loaded from a knockout.js template. E.g. a part of the "free" payment method:

            <button class="action primary checkout"
                    type="submit"
                    data-bind="
                    click: placeOrder,
                    attr: {title: $t('Place Order')},
                    css: {disabled: !isPlaceOrderActionAllowed()}
                    ">

            </button>

While the "check / money order" payment method looks like this (only differences are enable: (getCode() == isChecked()) but hey, there still are differences and there is no "1 almighty general place order button":

            <button class="action primary checkout"
                    type="submit"
                    data-bind="
                    click: placeOrder,
                    attr: {title: $t('Place Order')},
                    css: {disabled: !isPlaceOrderActionAllowed()},
                    enable: (getCode() == isChecked())
                    "
                    disabled>

            </button>

The answer provided only moves the aggreements which results in something like this:


texts: Magento 2: Is there a way to send money over to a customer?

texts: I'm currently looking around for a way to send money over to a customer, thus far the only way I've found is through refunds, but that doesn't seem like the most optimal way to do it. Is there a built in way to make such payments?


texts: How to configure Varnish in Magento 2 admin?

texts:
I've my Magento 2 installed in Cloudways with Varnish enabled, I'm sure that Varnish is well configured because it works in other projects and I can't change the configuration, I'm using the default Magento configuration with Varnish enabled.

am I using the configuration right?


texts: Magento 2: Cutom product attribute is not available for lyered navigation

texts:
I have created product attribute using following code. But attribute is not available in layered navigation filter.

$eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
            'custom_dropdown',
            [
             'type'                    => 'varchar',
             'backend'                 => '',
             'frontend'                => '',
             'label'                   => 'Course Location',
             'input'                   => 'select',
             'class'                   => '',
             'source'                  => '',
             'global'                  => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
             'visible'                 => true,
             'required'                => true,
             'user_defined'            => true,
             'default'                 => '',
             'searchable'              => false,
             'filterable'              => false,
             'comparable'              => false,
             'visible_on_front'        => true,
             'used_in_product_listing' => true,
             'is_used_in_grid'         => true,
             'unique'                  => false,
             'apply_to'                => '',
            ]
        );

I have searched in back end there is no Use In Layered Navigation option available. This attribute is previously added and lot of data is filled for the same. Now requirement is to show this attribute in layered navigation.


texts: Unit test 'non-existent' factory methods

texts:
Potentially same question has been asked but differently.
You are testing something in isolation and assume no access to generated folder.
Helper method

class HelperClass extends AbstractHelper

    public function __construct(
        Context $context,
        CurrencyFactory $currencyFactory
    ) {
        $this->currencyFactory = $currencyFactory;

    [...]

    /**
     * Format price with symbol
     * @param float $price
     * @param string $symbol
     * @return string
     */
    public function formatPrice(float $price, string $symbol): string
    {
        return $this->currencyFactory
            ->create()
            ->format(
                $price,
                ['symbol' => $symbol],
                false
            );
    }

Unit test
    public function setUp(): void
    {
        $this->currencyMock = $this->createMock(Currency::class);
        $this->currencyMock->expects($this->any())
            ->method('load')
            ->willReturnSelf();

        $this->currencyFactoryMock = $this->getMockBuilder(CurrencyFactory::class)
            ->disableOriginalConstructor()
            ->setMethods(['create'])
            ->getMock();

        $this->currencyFactoryMock->expects($this->any())
            ->method('create')
            ->willReturn($this->currencyMock);

        $this->helper = new HelperClass(
            $this->contextMock,
            $this->currencyFactoryMock
        );
    }

    public function testFormatPrice()
    {
        $this->assertEquals('£2.23', $this->helper->formatPrice((float) 2.2294, '£'));
    }

Error: HelperClass::formatPrice() must be of the type string, null returned
Is there just no way of testing generated classes without them existing?


texts: Magento 2 Remove product using product id & customer id (REST API)

texts: How to enable functionality, by creating a rest wishlist API to delete products from wishlist using customer id & product id?


texts: How does the Magento Newsletter module handle queueing

texts:
I'm working on a project and the client surprisingly has 90,000 email subscribers from their old site.  They want to send out a newsletter when we launch.  I'm recommending MailChimp but I'm also curious how well the Magento Newsletter works, could it handle a newsletter shot of that size?

How does Magento queue it's sending newsletters?  Does it send them in batches of 50 every 5min or something similar?  What kind of impact would this have on server performance.  Can you adjust it's frequency?

I imagine this is all done by cron.


texts: UPS Shipping Method Broken For Non-US Origin?

texts:
Is the Ups service broken or Magento?

[2016-08-24 10:00:31] main.DEBUG: array (
  'request' =>
  array (
    'accept_UPS_license_agreement' => 'yes',
    '10_action' => '4',
    '13_product' => 'GNDRES',
    '14_origCountry' => 'GB',
    '15_origPostal' => 'M43 6BU',
    'origCity' => 'Manchester',
    '19_destPostal' => 'OL10 3DA',
    '22_destCountry' => 'GB',
    '23_weight' => 20,
    '47_rate_chart' => 'Customer Counter',
    '48_container' => '00',
    '49_residential' => '01',
    'weight_std' => 'lbs',
  ),
  'result' => 'UPSOnLine5%Origin postal code must have five digits.%0000
',
) {"is_exception":false} []
[2016-08-24 10:00:31] main.DEBUG: Sorry, something went wrong. Please try again or contact us and we'll try to help.: Origin postal code must have five digits. {"is_exception":false} []


texts: How to have multiple H1 tags defined in CSS for a theme

texts:
I am trying to override my current theme's H1 tag on product view only.

Current CSS

styles.css

.product-view
h1            {  background: url("../images/image.jpg") repeat scroll 50% 0 transparent;
border-radius: 8px 8px 0 0;
  border-radius: 8px 8px 0 0;
color: #FFFFFF;
font-size: 16px;
font-weight: normal;
height: 28px;
padding-left: 20px;
padding-top: 6px; }

I have added a separate class with a unique H1 to override the above:

.product-name-new h1 { font-size:16px; color:#73472e; font-weight:bold; width:350px;}

I cannot seem to override the CSS, I have also tried entering the CSS directly in my view.phtml file:

view.phtml

As soon as I use the
 tag, it uses the original code and not the code I would like to use to override my products name.

How can I correctly implement a separate H1 tag on the product view that will not affect the rest of the theme?


texts: From a plugin how can I override a different plugin template file.?

texts:
I'm really new to Magento.

How can I override a modules templates files from another module ?

I have this file:

  /app/code/Amasty/Shopby/view/frontend/templates/layer/filter/swatch/default.phtml

How can I override that file from my own module ?

Thanks.

Based on the comments below:

this is the file I'm trying to override:

app/code/Amasty/Shopby/Block/Navigation/FilterRenderer.php

I have made:

app/code/Kodal/BindingShape/Plugin/FilterRenderer.php

I have added a DI file:

<type name="Amasty\Shopby\Block\Navigation\FilterRenderer">
        <plugin name="Kodal_BindingShapePlugin"
        type="Kodal\BindingShape\Plugin\FilterRenderer"/>
</type>

in my file there is a method:

public function afterGetTemplateByFilterSetting(Amasty\ShopbyBase\Api\Data\FilterSettingInterface $filterSetting)
    {
        die('==> we are here');
    }

But nothing happens, what am I missing ?

Thanks again.


texts: "Make sure your Magento cron job is running." after installation

texts:
I am trying to run Magento 2.2 on my local machine. It has been installed successfully but in the backend, I am seeing this error.

  Make sure your Magento cron job is running

How can I correct this? I am using Linux ubuntu.


texts: Magento 2: where is located checkout/success.phtml

texts:
I want to add tracking code to last step checkout success.phtml

This file should be:

app/design/frontend/THEME/THEME_NAME/Magento_Checkout/templates/success.phtml

but here I have only folder:

Magento_Checkout/templates/cart/

coupon.phtml

form.phtml
minicart.phtml
shipping.phtml

@Wisam

I have found code in

app/design/frontend/THEME/THEME_NAME/Magento_Checkout/layout/checkout_onepage_success.xml

and here I have added google tracking code.

What do you think about this? Will it work?


texts: Raising invoice for manual / telephone orders where payment taken outside of Magento

texts:
Whether this defies the logic of Magento's order processing, I haven't entirely worked out...

A client takes a number of telephone orders and takes their payment via a 3rd party portal or via a handheld PDQ terminal. Subsequently, the orders get raised in Magento with no payment method.

Orders with no payment method, it would appear it is not possible to generate invoices for...?

What would be the recommended approach for implementing the ability to raise invoices for these types of orders. The provided extension from the payment gateway used offers no way to handle these types of orders.

Would there be any scope in attempting to auto-generate the invoice for orders of where there is no payment method selected maybe - would this work?

Or would it be possible to implement a method that allows you to create an invoice manually at any time against an order?

Thanks in advance.


texts: Magento 404 (expecting controller to load)

texts:
I'm trying to follow this tutorial:

  http://devdocs.magento.com/guides/m1x/magefordev/mage-for-dev-5.html

I am using Magento 1.9.x (not 2)

I'm stuck at creating a weblog module, the module is enabled but the path isn't working in my browser.

IndexController.php in `code/local/Magentotutorial/Weblog/controllers/IndexController.php

<?php
class Magentotutorial_Weblog_IndexController extends
    Mage_Core_Controller_Front_Action {
        public function testModelAction() {
            echo 'Setup!';
        }
    }

Magentotutorial_Weblog.xml in app/etc/modules/Magentotutorial_Weblog.xml

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

config.xml in app/code/local/Magentotutorial/Weblog/etc/config.xml

<frontend>
<routers>
    <weblog>
        <use>standard</use>
        <args>
            <module>Magentotutorial_Weblog</module>
            <frontName>weblog</frontName>
        </args>
    </weblog>
</routers>
</frontend>

I try to load the page http://localhost/MagentoTut/weblog/index/testModel, but it comes up with 404 Not Found. Am I missing something that I need to create a module? It says the module is enabled in my admin panel so maybe the routing is not right?


texts: Custom price attribute values not appearing in database

texts:
I created 2 custom price attributes as shown in the screenshot.

I've entered some values. I want that to be reflected in database. Here is the screen shot of the table which contains Price[USD] value.

The values for Price[INR] and Price[EUR] isn't getting reflected, it is showing NULL value. How to correct it?


texts: Swatches update gallery but only with the first product

texts:
I have my swatches working on configurable products, they are working well to add product in the cart, but I have an odd behaviour, only the photos of the first products are returned by the Ajax request.

Let's say I have 4 variations : Black, Blue, Red, Green

With the photos :

Configurable : Photo10, Photo11
Black : Photo20, Photo21, Photo22
Blue : Photo30, Photo31, Photo32
Red : Photo40, Photo41, Photo42
Green : Photo50, Photo51, Photo52

When I load the page, the gallery contains : Photo10, Photo11, Photo20, Photo21, Photo22 as expected.

But then, no matter which swatch I click, I always get the Black photos in return and my Gallery updates to Photo20, Photo21, Photo22.

I had a look at the ajax request using the Firefox debug tool and all requests seem to be fine sending different attributes value, but the response is always the same, giving me the photo list of the first variation.

Is there a setting somewhere that dictates this behaviour or is that plain outright bug?

Add information 2016-10-11 : If I change my attribute "Color" to be dropdown, then it all works perfectly. I also have a linked issue : I added a price block somewhere else in the page. With the swatch, only the one in the addtocart form updates, with the dropdown, both update properly.

Further update 2016-10-11 : When observing the requests, it appears that when it is a dropdown, there is no request except for the images themselves, when it is a swatch, then it has a first POST request for the image list, then for the images themselves. Why can't it use the local data like the dropdown does?

P.S. If it can help, my dev server is on Nginx and runs "behind" another Nginx server that redistribute the requests based on their subdomain.


texts: How can i add Manual Shipping and Handling Cost Instead of Using Webshop-Matrix Rate

texts:
I need to add manual Shipping and Handling cost, the problem is I am using webshops_Matrix rate, which is automatically calculate Shipping and Handling cost based on Weight and Zip Code. When I manually add order from back end I can't add manual cost of shipping and handling cost.

How can I add Manual Shipping and Handling cost.


texts: Magento 2 Disable Date of Birth Calendar, customer should not able to pick the date on Account edit page

texts:
We have custom requirement in Magento 2 , where customer not able update the DOB again and again because we are running some campaign to get 1000 Reward points for every customers birthday but for now as he can edit DOB from my account section so it is possibility to misuse it.
Now we are thinking that DOB field should editable only once from My account section and if he go to edit again, DOB calendar should be not editable or disable it.
Currently we are thinking to set count and save in DB and on the databases values we can enable or disable calendar.
Please share us if anyone have idea or suggestion to achieve it.And please also share how we can disable the calendar so customer not able to pick the date.
We are using default Magento 2 date of birth functionality.
Thanks,


texts: Get product name from store not from admin

texts:
I am working on product collection query which is filtered from different root categories. My products are coming correctly but my product name is coming from admin section not from store section.

  $collection->addAttributeToSelect(array('entity_id','name','description','created_at','price','status','parent_id'))

  ->addAttributeToSelect('*')
  ->addAttributeToFilter('status', 1)
  ->addAttributeToFilter('name', array('like' => '%'.$search_product.'%'));

  $conditions = array();
        foreach ($category_filters_ids as $categoryId)      {
              if (is_numeric($categoryId)) { $conditions[] = "{{table}}.category_id = $categoryId"; } }

  $collection->distinct(true)
  ->joinField('category_id', 'catalog/category_product', null, 'product_id = entity_id', implode(" OR ", $conditions), 'inner');


texts: magento 2 : How to render background images in css pages

texts:
How do you render a background image on a css page.

i.e

#account-links--point {

  background-image: url(/images/pop-up-box-point.svg);

}

i realise that for a less you can do this:

@{baseDir}images/home-slider/slide-1.jpg

but my css does not use less.The url for my css is:

\app\design\frontend\myTheme\Theme-frontend-default\web\css\local-m.css

the images are stored in my theme folder;

\app\design\frontend\Mytheme\Theme-frontend-default\web\images


texts: How to get the order data before order placing

texts:
I created an events.xml at /app/code/Test/Customer/etc

    <?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
   <event name="checkout_submit_before">
      <observer name="Test_Customer_sales_order_place_before" instance="Test\Customer\Observer\OrderPlacebefore"/>
   </event>
</config>

Created the OrderPlacebefore.php like /app/code/Test/Customer/Observer

 <?php namespace Redington\CustomerAddress\Observer;

use Magento\Framework\Event\ObserverInterface;

class OrderPlacebefore implements ObserverInterface
{
    /**
     * @param Observer $observer
     * @return void
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
    echo "<pre>";
        print_r($this->_request->getPost());
        exit;

       $quote = $observer->getQuote();

    }
}

I didn't get anything here. But I need to get all data of order like product details, totals and customer details.

Anyone, please help me.


texts: Magento2 Elastic Search Configuration Issue

texts:
I am using following configurations for my magento2 project
Ubuntu 18.04
PHP 7.2
MYSQL 5.7
Elastic Search 7.x
Magento 2.3.5-p1

When i enabled elastic search in magento2 admin panel , the connection was successful but getting below error when i run indexer or navigates to category pages.
Fatal error: Uncaught Error: Cannot instantiate interface Magento\AdvancedSearch\Model\Client\ClientOptionsInterface in /var/www/html/myproj/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121 Stack trace:
#0 /var/www/html/myproj/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Advance...', Array)
#1 /var/www/html/myproj/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Advance...')
#2 /var/www/html/myproj/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('Magento\\Advance...')
#3 /var/www/html/myproj/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Elastic...')
#4 /var/www/html/myproj/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectMan in /var/www/html/myproj/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121

Any solution for this?


texts:
Magento2 I want to change "Please specify the zip code." error message on one step checkout Canada post method

Thank you,


texts: Header not showing after i set magento to production

texts:
hey guys so i set my magento website to production finally using the command bin/magento deploy:mode:set production but now my custom header i made is not showing up
https://softncozy.com
did i miss something?

problem 2: many features does not work if i set Use Web Server Rewrites to YES
so this has been bugging me for a while


texts: how to add a custom product tab like details tab on product page in magento 2.1

texts:
I have created attributes like features and specification for product. Can anyone guide me how to show these attributes below details tab on product page.
I'm using magento 2.1 with molly theme.Please refer the image.


texts:
Fatal error: Uncaught Error: Class 'App\Helpers\LogHelper' not found in C:\xampp\htdocs\moviesone\app\core\Framework.class.php:20 Stack trace: #0 C:\xampp\htdocs\moviesone\index.php(20): App\Core\Framework::run() #1 {main} thrown in C:\xampp\htdocs\moviesone\app\core\Framework.class.php on line 20
what should I do?


texts:
I have some code that, when a button is clicked, sets a session value to 1. Then (in the same frontend place) checks that value and if present, do something else.

This is my Controller (skimmed to relevant code):

<?php
    namespace Vendor\Module\Controller\Index;

    class Search extends Action
    {
        const USERBIKE = 'userbike';

        public function execute()
        {
            # other code

            if ($this->getRequest()->getParam(self::USERBIKE)) {
                $block = $this->layoutFactory->create()->createBlock('Vendor\Module\Block\Garage');

                if ($block->getGarageCollection()->getFirstItem()->getCustomerId()) {
                    $block->getCoreSession()->setUserBike(1);
                }

                $writer = new \Zend\Log\Writer\Stream(BP. '/var/log/logfile.log');
                $logger = new \Zend\Log\Logger();
                $logger->addWriter($writer);
                $logger->info(print_r($block->getCoreSession()->getUserBike(), true));
            }

            # other code
        }
    }

Which takes data from this .phtml form:

<?php
    $vendorBlock = $block->getLayout()->createBlock('Vendor\Module\Block\Garage');
    $session = $vendorBlock->getCoreSession();

    $writer = new \Zend\Log\Writer\Stream(BP. '/var/log/logfile2.log');
    $logger = new \Zend\Log\Logger();
    $logger->addWriter($writer);
    $logger->info(print_r($session->getUserBike(), true));
?>

<div class="amfinder-common-wrapper amfinder-<?php echo $block->escapeHtml($block->getFinder()->getTemplate()); ?> <?php echo $block->getHideClassName() ? 'amfinder-hide' : ''; ?>"
     id="<?php echo 'amfinder_'. (int) $block->getFinder()->getId(); ?>"
     location="<?php echo $block->escapeHtml($block->getLocation()); ?>">

    <form method="post" action="/garage/index/search">
    <!-- etc. -->
        <button class="button action primary"
                name="userbike"
                value="1"
                title="<?php echo $block->escapeHtml(__('Use My Bike Instead')); ?>"
                type="submit">
            <?php echo $block->escapeHtml(__('Use My Bike Instead')); ?>
        </button>
    </form>
</div>

Clicking the button creates logfile.log which shows my value to be 1. However, after the page refreshes, logfile2.log is empty. It seems it works but then doesn't?

My session stuff:

<?php
    namespace Vendor\Module\Block;

    class Garage extends Template
    {
        protected $_coreSession;

        public function __construct(
            # etc.
            \Magento\Framework\Session\SessionManagerInterface $coreSession
        )
        {
            $this->_coreSession = $coreSession;
            # etc.
        }

        public function getCoreSession()
        {
            return $this->_coreSession;
        }
    }

How can I get the session values correctly so that they persist after page refresh? What is wrong with my current code?


texts:
I'm using Magento v2.3.4 and i ran this command to do performance testing
php bin/magento setup:performance:generate-fixtures -s setup/performance-toolkit/profiles/ce/small.xml

the process stop when Generating cart price rules. and showing this error:

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
update a child row: a foreign key constraint fails
(Mage.salesrule_customer_group, CONSTRAINT
FK_71F63034CF7894F1A68FD81554D91D9C FOREIGN KEY
(customer_group_id) REFERENCES customer_group
(customer_group_id) ON DELETE CASC), query was: INSERT  INTO
salesrule_customer_group (customer_group_id,rule_id) VALUES (?,
?), (?, ?), (?, ?), (?, ?) ON DUPLICATE KEY UPDATE rule_id =
VALUES(rule_id)


texts:
getCollection()->getSize() not returning correct number of records.

Here is my code

:

        /** @var $collection Mage_Reports_Model_Resource_Report_Collection */
        $collection = Mage::getResourceModel('reports/product_inventory_collection')
            ->addAttributeToSelect('*')
            ->addAttributeToSelect('vendor')
            ->addAttributeToSelect('cost')
            ->addAttributeToSelect('inventory_category')
            ->addAttributeToSelect('inventory_position')
            ->addAttributeToSelect('min_order_qty')
            ->setStoreId($storeId)
            ->addAttributeToFilter('status', array('eq' => 1))
            ->filterByIsQtyProductTypes()
            ->joinInventoryItem('qty')
            ->useManageStockFilter($storeId)
            ->addAttributeToFilter(
                                    array(
                                          array('attribute'=>'vendor', 'finset'=>$this->getFilter('vendor'))
                                    )
                                );

        if( $storeId ) {
            $collection->addStoreFilter($storeId);
        }

        $collection->getSelect()->columns(new Zend_Db_Expr("(min_qty - qty) as order_qty"));
        $collection->getSelect()->having('order_qty > 0');

        $collection->getSelect()->reset(Zend_Db_Select::ORDER);
        $collection->addAttributeToSort('inventory_category', 'ASC');
        $collection->getSelect()->order('CAST(`inventory_position` AS SIGNED) ASC');

        $this->setCollection($collection);

Then in my .phtml file:

echo $this->__('Total %d records found', $this->getCollection()->getSize())

getSize() is returning the number of records before I add this:

$collection->getSelect()->columns(new Zend_Db_Expr("(min_qty - qty) as order_qty"));
$collection->getSelect()->having('order_qty > 0');


texts: Order cancel from admin taking time in magento 1

texts:
How to speed up order cancel from admin when we cancel the order.

Scenario: when we cancel order from admin order view its taking time, so how to resolve this?


texts: Magento 2 - Default One page checkout does not work even if enabled

texts:
I am working on magento 2.3 CE.

Admin >> Store >> Configuration >> Sales >> Checkout >> Checkout Options >> Enable Onepage Checkout >> Yes.

One page checkout is enabled. However checkout is still displayed on 2 pages (Shipping and Payment)

Any kind of help would be appreciated.


texts:
I am using Magento 2.1.7 CE
sometimes when Im trying modify cart (remove product, add, or update qty) I got Error:
"Invalid customer address id XX".

I noticed that in class Magento\Framework\Exception\NoSuchEntityException\QuoteAddressValidator

there is function validate with $applicableAddressIds variable.
There should be array with all Customer's addresses:

        $applicableAddressIds = array_map(function ($address) {
            /** @var \Magento\Customer\Api\Data\AddressInterface $address */
            return $address->getId();
        }, $this->customerRepository->getById($addressData->getCustomerId())->getAddresses());

Unfortunately getAddresses() is empty (yes, I checked it).
Customer is not empty.
Someone knows what happens?


texts:
I'm facing a problem with setting a zero tax rate for some countries. Regardless that the catalogue prices are set to show including tax, whenever a quote is for 0% tax countries, grand total excluding and including tax are exactly the same and includes tax.

Someone has already similar issue but no answers Issue With Zero Rate Tax so maybe I'll have more luck.

Here are some screenshots of Magento settings:

Quote for order with standard 20% TAX:

Quote for order with 0% TAX:

Thank you.


texts: Magento 2 : How to serialise multiple values in Custom Module Product Grid

texts:
In My custom module Product Grid, I Need to serialize A, B, and C values by the user select. the additional fields are not actually reloaded, only an array containing the product_ids currently. How can I post the data with multiple column values?

Please find the attachment for the  better understaning.


texts: How to create a custom field for product?

texts:
I need to make a special text field on a product page which can be filled in by the customer. The value of this field should be passed to the shopping cart and it should be visible in the order.
How can I do this? May be there is a module for this?


texts: Multi-selection attibute for configurable product

texts:
What I'd like to create is a product in which you can select for a specific attribute multiple values.

Lets say the product is a t-shirt, the attribute is color the attribute set are various colors.
The customer can choose, for one t-shirt, multiple colors, maybe using a checkbox list instead of the usual droplist in configurable products.

Is that possible?


texts:
Currently, we are working on the compatibility of our client site. We have started this from the resolution 375x667 and completed it.

After that, we have started to write media query for the resolution 360x640 but noticed that the media query which we have written for the resolution 375x667 is conflicting to the resolution 360x640.

For your reference, we have used the below CSS for the resolution 375x667:

 @media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2){

}

and for the resolution 360x640:

@media only screen and (min-device-width: 360px) and (max-device-width: 640px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2){
}

I have tried to understand this issue through various posts but didn't get a satisfying answer.

Could anyone please help me throughout this?


texts: How to move Custom Options after product Description Tab in magento 2

texts:
I want to move product custom option after the description tab section .Can any one suggest me ?
thanks


texts: How do you fully secure (SSL) a magento page

texts:
We just installed an ssl certificate, and I am able to open the page with

https://mag.outdoorequipped.com/

But it says, that the connection is partially encrypted. And as I see, there are a lot of internal links "only" with http:// instead of https://

How do I set this correct in Magento? Or do I need to do a htaccess file for this?


texts: save all textfields by clicking on one update button

texts:
we have multi vendor site. we are giving option for vendor to edit all textfields of multiple products and save all by clicking on one "Update" button....

we are using following code for saving price of one text field.

Price

public function updateFieldPriceAction(){
    Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
    $id= $this->getRequest()->getParam('id');
    $customerid=Mage::getSingleton('customer/session')->getCustomerId();
    $collection_product = Mage::getModel('marketplace/product')->getCollection()->addFieldToFilter('mageproductid',array('eq'=>$id))->addFieldToFilter('userid',array('eq'=>$customerid));
    //Mage::getSingleton('core/session')->setEditProductId($id);

    try{
    $upd_price = $this->getRequest()->getParam('price');
    $product = Mage::getModel('catalog/product')->load($id);
    //$product->setData('price', $upd_price);
    $product->setPrice($upd_price);

    //$stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($id);
    //$stockItem->setData('manage_stock', 1);
    //$stockItem->setData('qty', $this->getRequest()->getParam('qty'));
    $product->save();

    echo $price = $product->getPrice();
    echo $name = $product->getName();

    $response['message'] = 'Your Product Is Been Sucessfully Updated';
    $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));
    //Mage::getSingleton('core/session')->addSuccess(Mage::helper('marketplace')->__('Your Product Is Been Sucessfully Updated'));

    //endif;
    }catch(Exception $e){
    echo "Not Saving"; exit;
    Mage::log($e->getMessage());
    }

  }

we are using following code to save quantity of one text field.

Quantity

public function updateFieldAction(){
        $id= $this->getRequest()->getParam('id');
        $customerid=Mage::getSingleton('customer/session')->getCustomerId();
        $collection_product = Mage::getModel('marketplace/product')->getCollection()->addFieldToFilter('mageproductid',array('eq'=>$id))->addFieldToFilter('userid',array('eq'=>$customerid));
        //Mage::getSingleton('core/session')->setEditProductId($id);
        $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($id);
        $stockItem->setData('manage_stock', 1);
        $stockItem->setData('qty', $this->getRequest()->getParam('qty'));

        $stockItem->save();

        $response['message'] = 'Your Product Is Been Sucessfully Updated';
        $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));
        //Mage::getSingleton('core/session')->addSuccess(Mage::helper('marketplace')->__('Your Product Is Been Sucessfully Updated'));
      }

we are using following code to save all textfields of price and quantity by single update button. Price is working. but quantity is not working.

controller.php

public function massupdatesellerproAction(){
    if($this->getRequest()->isPost()){
        if(!$this->_validateFormKey()){
             $this->_redirect('marketplace/marketplaceaccount/myproductslist/');
        }
        $ids= $this->getRequest()->getParam('product_mass_update');
        $price= $this->getRequest()->getParam('price');
        $qty = $this->getRequest()->getParam('qty');
        foreach ($ids as $key => $value) {
    $product = Mage::getModel('catalog/product')->load($value);
    $product->setPrice($price[$key]);
    $product->setQty($qty[$key]);
    $product->save();
        }
        Mage::getSingleton('core/session')->addSuccess( Mage::helper('marketplace')->__('Products has been sucessfully saved from your account'));
        $this->_redirect('marketplace/marketplaceaccount/myproductslist/');

    }}


texts: Magento Product page shows QUANTITY as 0

texts:
My website shows quaintity as 0, but when I add product to cart its one, Can I change it so that it shows quantity 1

Here is sample:

http://milkywaytshirts.com/bestsellers/super-dad-superhero-t-shirt.html


texts: Magento collection issues, methods not working filters not applied etc

texts:
Trying to create a couple of quick extensions, one to display a list of best sellers and one to display a list of items on promotion.  I want both of these modules to filter by a given cateogry id if one is supplied.  So I found out that magento has a built in module that isn't used in the default theme namely the catalog/product_list_promotion rather than create something from scratch I thought I would try to modify this module and also use it as a base for the best seller module.  So I found some examples of a best seller module and used the code to create best seller module, both the promotion module and the best seller module are working and displaying products.  The problem is I can't apply category filters and I can't limit the number of results, I've tried every combination of adding the filters/limits/page sizes etc and either i get no errors but the original unchanged output or a fatal error to an undefined method.  I have searched for hours for a solution and found some similar questions on SO and other forums, all suggest what I have already tried which hasn't worked, maybe someone can help?

So in Mage/Catalog/Product/Block/List/promotion.php I have:

class Mage_Catalog_Block_Product_List_Promotion extends Mage_Catalog_Block_Product_List
{
    protected function _getProductCollection()
    {
        if (is_null($this->_productCollection)) {
            $collection = Mage::getResourceModel('catalog/product_collection');
            Mage::getModel('catalog/layer')->prepareProductCollection($collection);
            // your custom filter
        $collection->getSelect()->order('rand()');
            $collection->addAttributeToFilter('promotion', 1)->addStoreFilter();
            $this->_productCollection = $collection;
        }
        return $this->_productCollection;
    }
}

I've tried adding $c...->setLimit(X), $c...->limit(X) $c...->getSelect()->limit(X), $c...->page(1, X), $c...->setPageSize(X) both before and after prepareCollection...  In most cases I get no errors but no limit is applied.  the best sellers module is essentially the same so  wont post the code as I assume the issue with this will be the same for the best sellers module.

Any help would be greatly appreciated.


texts: How can I tell if a product was just added to the cart?

texts:
I have turned off the option to redirect to the cart after a product has been added. Instead, it just redirects back to the page it was originally on.

Is there a way to tell if something was just added? I would love to learn that there is a pretty simple if statement for this!


texts: Magento 2 CMS, pages, orders and customers grids

texts:
Magento 2 latest version currently will not load any grid in the admin, there is no errors in the console whatsoever. The requests via Ajax are not even firing.

However I have installed my custom module which holds its own grid which works perfectly fine :( confused!

I've tried disabling/removing my module from the code and still doesn't work. I'm running out of options.

Hopefully someone can shed some light on the issue. I believe this is happening for a lot of people however none of there issues related to the same as mine.


texts: Upload a file on customer registration page Magento 2

texts:
I am trying to upload a file(mostly likely image) from customer registration form.

What have I done till now

Create file type field on customer registration form
Created a module that observe the event for customer register success.

Observer code:

<?php

namespace Custom\Customergroup\Observer\Customer;
// added by me
use Magento\Customer\Api\CustomerRepositoryInterface;

class RegisterSuccess implements \Magento\Framework\Event\ObserverInterface {

/**
     * @var CustomerRepositoryInterface
     */
//added by me
    private $customerRepository;

    public function __construct(
        \Magento\Framework\App\RequestInterface $request,
         CustomerRepositoryInterface $customerRepository
        )
    {
        $this->_request = $request;
        $this->customerRepository = $customerRepository;
    }
    //ends here
    public function execute(
        \Magento\Framework\Event\Observer $observer
    ){

        $id = $observer->getEvent()->getCustomer()->getId();
        $customer = $this->customerRepository->getById($id);
        //get files uploaded
        if (isset($_FILES['fileToUpload']['name']) && $_FILES['fileToUpload']['name'] != "") {
                    die('here');
                }
                else{
                    die('there');
                }

        //  $group_id = $this->_request->getParam('group_id');

        // $customer->setGroupId($group_id);

        $this->customerRepository->save($customer);

    }
}

In Magento 1.x

We could do something like this:

public function handle_file_upload($observer)
        {
                $customer = $observer->getCustomer();
                if (isset($_FILES['prooffile']['name']) && $_FILES['prooffile']['name'] != "") {
                                $uploader = new Varien_File_Uploader("prooffile");
                                $uploader->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png', 'pdf'));
                                $uploader->setAllowRenameFiles(false);
                                $uploader->setFilesDispersion(false);
                                $path = Mage::getBaseDir("media") . DS . "customer" . DS;
                                $logoName = $customer->getId() . "." . pathinfo($_FILES['prooffile']['name'], PATHINFO_EXTENSION);
                                $uploader->save($path, $logoName);
                                $customer->setProoffile($logoName);
                                $customer->save();
                }
        }

I just want to know how to achieve this on Magento 2.

Thanks


texts: How to load all the products regardless of the status of products?

texts:
I am using following code to get all the products assigned to a category.

    $category = 26;
    $productcollection = Mage::getModel('catalog/product')->getCollection();
    $productcollection = $productcollection->addCategoryFilter(Mage::getModel('catalog/category')->load($category),true);
    $productcollection = $productcollection->addAttributeToSelect('*');

But I am getting only the enabled product.All the products in this category are of configurable type.

I want all the products whether the product is enabled or disabled.


texts:
I am having Magento CE 1.9.2.4, and 1.9.3.0, on both of these websites, 'category products' cannot be reindex. I saw a post here and followed then can reindex it. I thought my problem was resolved and start to upload a thousand items. Afterward the same problem came back.

I try to reindex it with shell, but no luck thus far. I need help to fix this issue permanently. Bellow is the error logs:

2016-12-29T11:35:33+00:00 DEBUG (7): Exception message: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`microwavedb`.`catalog_category_product_index`, CONSTRAINT `FK_CAT_CTGR_PRD_IDX_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`category_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DEL), query was: INSERT INTO `catalog_category_product_index` (`category_id`, `product_id`, `position`, `is_parent`, `store_id`, `visibility`) SELECT `catalog_category_product_index_idx`.`category_id`, `catalog_category_product_index_idx`.`product_id`, `catalog_category_product_index_idx`.`position`, `catalog_category_product_index_idx`.`is_parent`, `catalog_category_product_index_idx`.`store_id`, `catalog_category_product_index_idx`.`visibility` FROM `catalog_category_product_index_idx` ON DUPLICATE KEY UPDATE `category_id` = VALUES(`category_id`), `product_id` = VALUES(`product_id`), `position` = VALUES(`position`), `is_parent` = VALUES(`is_parent`), `store_id` = VALUES(`store_id`), `visibility` = VALUES(`visibility`)

Thank you in advance for your time and help.


texts: How to add js file for specific product type edit page?

texts: I create new product type in Magento 2. I want add js file for specific type to product edit page. How i do?


texts: how to update price and quantity in bulk using rest api

texts:
Sir,
    For single product price and quantity update is working,i want to update bulk for price and quantity using rest api.
Can u provide the procedure for bulk update.


texts:
We moved out Magento 2 to a new server. All works fine but indexing of the product prices. All other indexers work fine.
An when we run bin/magento indexer:reindex we get the following error:

  SQLSTATE[28000]: Invalid authorization specification: 1045 Access
  denied for user 'ku0h8_mag_stagin'@'localhost' (using password: YES),
  query was: DELETE price_index  FROM
  catalog_product_index_price_temp AS price_index  INNER JOIN
  catalog_product_entity AS product_entity ON
  product_entity.entity_id = price_index.entity_id  LEFT JOIN
  inventory_stock_1 AS inventory_stock ON inventory_stock.sku =
  product_entity.sku WHERE (inventory_stock.is_salable = 0 OR
  inventory_stock.is_salable IS NULL) AND (price_index.website_id = 1)
  AND (price_index.entity_id IN ('1', '2', '3', '4', '5', '8', '9',
  '29', '30', '31', '34', '35', '36', '37', '38', '39', '40', '43',
  '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54',
  '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65',
  '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76',
  '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87',
  '88', '89', '90', '91', '92', '95', '96', '97', '98', '99', '100',
  '101', '102', '103', '104', '105', '106', '109', '110', '111', '112',
  '113', '114', '115', '116', '117', '118', '119', '120', '121', '122',
  '123', '124', '125', '126', '127', '128', '129', '130', '131', '132',
  '133', '134', '135', '136', '137', '138', '139', '140', '141', '142',
  '143', '144', '145', '146', '147', '148', '149', '150', '151', '152',
  '153'))

localhost is not the host we have set in env.php
The table catalog_product_index_price_temp does not exists (it's catalog_product_index_price_tmp)

I have no idea why Magento uses catalog_product_index_price_temp.

Thanks for any help or hint where to start searching.


texts: Magento 2 API - Get list of products with Catalog Price Rule

texts:
We are using Magento 2.1.7 and building some API endpoints to serve our need.

Following is how we get Products list and send them as json from API call.

<?php
namespace Vendor\Customer\Model;

use Magento\Framework\Api\Filter;

class ProductRepository
{
    protected $_productCollection, $productRepository, $searchCriteriaBuilder;

    public function __construct(
        \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,
        \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder
    )
    {
        $this->productRepository = $productRepository;
        $this->searchCriteriaBuilder = $searchCriteriaBuilder;
    }

    /**
    * @return \Magento\Catalog\Api\Data\ProductSearchResultsInterface
    */
    public function getProductCollection()
    {
        $searchCriteria = $this->searchCriteriaBuilder->create();

        $this->_productCollection = $this->productRepository->getList($searchCriteria);

        return $this->_productCollection;
    }
}

We need to know if we can add some search criteria to getProductCollection() method using Filter to get only those products associated to some active catalog price rule with discounted price.

Or if we have any other method to get Products with Catalog Price Rule and discounted Price, guide me in that direction.


texts: Magento theme doesnt show login page from theme

texts:
I am having a problem with my magento shop. It has it's own login special page, and this was working fine before i moved my site towards a magento server. My login page now looks like this:

Login page my website

but it has to look like this, as the Athlete theme has:

Theme login page like it has to be

i cannot figure out where it is going wrong. Theme is working fine for the rest, only this crashed after moving..

What can it be?


texts: Get product custom attribute data Magento 2?

texts:
I created my product set, group and attributes inside.

$entityTypeId = $eavSetup->getEntityTypeId(Product::ENTITY);

$eavSetup->addAttribute(
    $entityTypeId,
    'si_qty',
    [
        'type' => 'int',
        'backend' => '',
        'frontend' => '',
        'label' => 'Si Qty',
        'input' => 'text',
        'class' => '',
        'source' => '',
        'global' => 0,
        'visible' => true,
        'required' => false,
        'user_defined' => true,
        'default' => null,
        'searchable' => false,
        'filterable' => false,
        'comparable' => false,
        'visible_on_front' => false,
        'used_in_product_listing' => false,
        'unique' => false,
        'apply_to' => 'mySpecialProductType',
        'system' => 1,
        'group' => 'My Group Name',
        'option' => ['values' => []]
    ]
);

Currently I try to get the attribute value from catalog products page and product page.

// \Magento\Catalog\Model\Product $product

var_dump($product->getData('si_qty')); // => NULL
var_dump($product->getResource()->getAttribute('si_qty')->getFrontend()->getValue($product)); // => NULL
var_dump($product->getCustomAttribute('si_qty')); // => NULL
var_dump($product->getCustomAttributes()); // => ...

Array
(
    [0] => Magento\Framework\Api\AttributeValue Object
        (
            [_data:protected] => Array
                (
                    [attribute_code] => image
                    [value] => /b/2/b2214-a.jpg
                )

        )

    [1] => Magento\Framework\Api\AttributeValue Object
        (
            [_data:protected] => Array
                (
                    [attribute_code] => small_image
                    [value] => /b/2/b2214-a.jpg
                )

        )

    [2] => Magento\Framework\Api\AttributeValue Object
        (
            [_data:protected] => Array
                (
                    [attribute_code] => minimal_price
                    [value] => 64.5000
                )

        )

    [3] => Magento\Framework\Api\AttributeValue Object
        (
            [_data:protected] => Array
                (
                    [attribute_code] => required_options
                    [value] => 0
                )

        )

    [4] => Magento\Framework\Api\AttributeValue Object
        (
            [_data:protected] => Array
                (
                    [attribute_code] => has_options
                    [value] => 0
                )

        )

    [5] => Magento\Framework\Api\AttributeValue Object
        (
            [_data:protected] => Array
                (
                    [attribute_code] => url_key
                    [value] => fine-gauge-flare-sweater-dress-grey
                )

        )

)

Attribute congiguration (continue play with it):

Attribute in product page in admin:

How I can get my custom product attribute?

P.S. Magento 2.1.5.


texts:
I'm very close to completing a large magento project and have turned my focus to improving magento's speed. As sort of a preface, I'm more of a front-end developer doing this large project in-house, and figuring things out as I go.

I have development magento on a Media Temple dedicated virtual server with 2GB of ram. I recently had as many as as 600 products and about 25 different attributes on each product (total of about 300 unique attributes) and maybe 50 categories. I deleted all of that in attempt to troubleshoot load speeds around 15s.

However my load times are still long and inconsistent. I reload my home page with Firebug reporting 500ms for a response, and I immediately reload again and it reports over 9s. Is this a server problem or something with Magento itself? How do I go about testing something like that?


texts: Login and Registration page breaks after changing theme

texts:
I am currently working on ver 1.9.2.4 and after installing a new theme, the login and registration page just breaks. I haven't made any changes to the base files of magento. Here's the link http://www.getintenso.com/demo/default/customer/account/login/ that how it should look and I am also attaching the screenshot of my store. Does anyone have any idea what's causing this?

 Thanks!


texts: Is it possible to change other attributes of configurable product other than price?

texts:
I am new to magento, so far I am looking at tutorials on the video, my understanding is that configurable product is set of several simple products.

  If so, can attributes be changed when specific options is selected?

In practice:

Let's say there is T-Shirt configurable product

Blue T-shirt small size has attribute: Pocket count: 3
Red T-Shirt large size has attribute: Pocket count: none

so when blue color option and small size option is selected, it displays pocket count 3

  Is that achievable? and would that 2 kind of products can be
  comparable to each other?

Thanks


texts: Magento 2: Upgrading Magento 2 version from v2.1.5 to v2.1.17

texts:
Does anyone upgrade Magento 2 version from v2.1.5 to 2.1.17 ?

Since Magento Releases any patches based on v2.3.x, v2.2.x and v2.1.x, I guess minor version might have many differences and dependencies.

I would like to here from someone who already upgraded minor version.

Thank you in advance!


texts: Getting error after using order place after event in Magento2

texts:
I used below event for order save after Observer. This is my events.xml

  <event name="checkout_onepage_controller_success_action">
    <observer name="sales_order_save_after" instance="[Vendor]\[Module]\Observer\Ordersave" />
</event>

Here is my Observer code

namespace [Vendor]\[Module]\Observer;
class Ordersave implements ObserverInterface {
    private $logger;
    private $state;
    public function __construct(
    \Magento\Framework\View\Element\Context $context,
    \Psr\Log\LoggerInterface $logger,
    \Magento\Framework\App\State $state
) {
    $this->_layout = $context->getLayout();
    $this->_request = $context->getRequest();
    $this->logger = $logger;
    $this->_state = $state;
  }
    public function execute(EventObserver $observer) {
      $this->_state->setAreaCode(\Magento\Framework\App\Area::AREA_GLOBAL);
    try{
        $order_ids = $observer->getEvent()->getOrderIds()[0];
        ....
        ....
        custom code
     }catch (\Exception $e) {
        $this->logger->info(' --Exception--  '.$e->getMessage());
     }
    }
}

Event is triggering and i can place order with my custom code written inside try block but after order placed i am getting like

   There has been an error processing your request
Error log record number: Some number

Inside that record i am getting below error.

  Area code is not set "1":"  vendor\/magento\/framework\/View\/Page\/Config.php

What is issue in my code please someone suggest me


texts: Moved Magento store from one domain to another (same host) and now admin inputs not saving

texts:
I've just come across a weird, extremely frustrating issue which I've now wasted two hours trying to get to the bottom of...

I've just copied a new Magento store from one domain to another on the same server. There is currently the website on the old domain and it is duplicated on the new domain.

Base URL's updated.
Database credentials updated.
Cache cleared.
Sessions cleared.
Server tmp directory cleared.
The only other thing I had to do was change the redirect to base config in the database from 1 to 0 to get rid of the redirect loop.

Everything works perfectly fine on the old domain. All functionality is as expected with no errors in the logs.

On the new domain however, I cannot make any changes from the Magento admin panel. Nothing saves despite the 'changes made successfully' notification:-

None of the checkboxes are recognised if I try to bulk delete/edit.
None of the dropdown are recognised.
I can click on links and perform actions (i.e reindex an individual index).

There are no errors in the log. There are no errors in the browser console.

I really have no idea how the site works fine on one domain and not on another yet I have no errors anywhere (and logging is working as I forced errors to check this).

Any ideas?


texts: How to get products description and short description in products list page?

texts:
Can you please provide appropriate instruction for.

How can i get product description and short description in products list.phtml page.

Thanks


texts: phone number and email on left side of shopping basket

texts:
please visit this " http://boards.newtrendzonline.com/"

this is galagiftshop theme

I need to to Put "Email us" and  "phone no" on left side of shopping cart basket.

let me know if you have any queries.

please help me to find solution.

thanks in advance.


texts: Do we have any option of adding suppliers and suppliers information in the admin?

texts:
I'm new to magento. I need to add suppliers along with our products and the supplier information should also be editable. Please suggest me how can i do this.
I'm using Magento 1.7

Thanks in advance.


texts: Cash On Delivery payment method not showing in checkout page in magento 2.1.9

texts:
Cash On delivery payment method not showing in the frontend.

I have enabled the offline payment methods in the backend, It shows all offline payment methods in frontend except COD. Please provide me a solution


texts: How to test credit card shopping in magento

texts: I want to enable the credit card feature so that user can pay through cards.Now when i try on SCC( saved credit card ) information works .I create test account on http://www.cardsave.net/Developer-Support and download some test accounts.But when i try same info on Card save  method i got this error error 261 couldn't communicate with payment gateway.


texts: Change "Apply Discount Code" font color at check out

texts:
I'm trying to change the "Apply Discount Code" font color at check out.

Any suggestions would be helpful


texts: Magento 2 with Parallax, good ideia? If yes, whats best way to do it?

texts:
It's almost everything said in the title but, we all love to see a well done parallax website, with all that beautiful images moving around, but when it comes to an ecommerce, I know that some companies like Nike used it, but in something more simple, not a huge company, is it a good idea to implement some parallax in the homepage? or it is something that gonna hurt you more than help? And if it is what's the best way to implement it without breaking something or destroying your performance?
These are some questions that came to my mind, it's more like a discussion than a question but I can't seem to get an answer.
If there is anyone out there that can help with this or had experience with this would love to know your experience.
Thanks!
Best regards,
Rui Silva


texts: Magento, Braintree is loading on One step checkout page

texts:
In Magento site.
I use the Braintree in One step checkout page.  The Braintree keeps loading as shown in the picture.

Here are errors.


texts: Layered navigation - multiple attribute choices in magento not working

texts:
I need multiple choices filter result in Layered Navigation.
I have tried this link
Layered navigation - multiple attribute choices

But I cant change the getUrl() method in app\code\core\Mage\Catalog\Model\Layer\Filter\Item.php

I need to pass multi attributes like this http://192.168.1.63/project/index.php/mobiles.html?product_country=4457&product_country=4459

Anyone please suggest? Can anyone explain in detail, Can anyone give that code, where I need to change?


texts: Magento 2 Admin controller is not working 404 error

texts:
I don't why my admin controller is not working, I have checked it and everything seems to be ok.

This is my code:

etc/adminhtml/routes.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="admin">
        <route id="testpakke" frontName="testpakke">
            <module name="Company_Pakke" before="Magento_Backend" />
        </route>
    </router>
</config>

Controller/Adminhtml/Download/PDF.php

<?php

namespace Company\Pakke\Controller\Adminhtml\Download;
use Magento\Backend\App\Action;

class PDF extends Action
{
    /**
     * @var PageFactory
     */
    protected $resultPageFactory;

    /**
     * @param Context $context
     * @param PageFactory $resultPageFactory
     */

    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    ) {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
    }

    /**
     * Index action
     *
     * @return \Magento\Backend\Model\View\Result\Page
     */
    public function execute()
    {

        return  $resultPage = $this->resultPageFactory->create();
    }

}

when I type http://store/admin_1evvgb/testpakke/download or http://store/admin_1evvgb/testpakke/download/pdf or http://store/admin_1evvgb/testpakke/Adminhtml/download/pdf I get always the 404 error Page not found. Am I typing the path correctly?

Greetings!


texts: Magento 2 How to remove price filter from category if module is enable?

texts:
I have one module is set up and it has configuration about enable/disable the module. I have multiple stores too. I want the functionality to disable or hide price filter from category page if the module is enabled or not.

In my module, I have the function in helper which returns the value of module enabled or not.  It would depend on store view.

As the price attribute has global scope, So we can not directly use this:

Catalog->Attributes ->Manage Attributes -> Price -> Use In Layered Navigation -> "No".

Now I want to disable the price filter from left/right navigation from the category page.

Is anyone have any an idea about it?

in Helper\Data.php I have content as below:

namespace Name\Module\Helper;

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
    const XML_CONFIG_ENABLE = "sectionid/groupid/fieldid";

    protected $scopeConfig;

    public function __construct(
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
    ) {
        $this->scopeConfig = $scopeConfig;
    }

    public function getModuleStatus()
    {
        return  $this->scopeConfig->getValue(self::XML_CONFIG_ENABLE, \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
    }

Thanks.


texts:
I am trying to get product images for invoice email template. I used below code. But I am only getting Magento placeholder image in email template.

    <?php
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $product_id = $_item->getOrderItem()->getProduct();
    $product = $objectManager->get('Magento\Catalog\Model\Product')->load($product_id);

    $_imagehelper = $objectManager->get('Magento\Catalog\Helper\Image');
    $image_url = $_imagehelper->init($product, 'cart_page_product_thumbnail')->getUrl();

    ?>
      <img src="<?php echo $image_url; ?>" alt="<?php echo $product->getName(); ?>" />


texts:
In Magento 2.2.6, How to give 5% discount for a newly registered customer ?

Thanks in advanced!


texts: Error opening System>Configuration>Catalog in backend

texts:
When trying to open System>Configuration>Catalog I get an error which produces the following error report:

  a:5:{i:0;s:87:"Invalid config field backend model: catalog/system_config_backend_catalog_category_flat";i:1;s:1660:"#0 /var/www/html/magento/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(328): Mage::throwException('Invalid config ...')
  #1 /var/www/html/magento/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(229): Mage_Adminhtml_Block_System_Config_Form->initFields(Object(Varien_Data_Form_Element_Fieldset), Object(Mage_Core_Model_Config_Element), Object(Mage_Core_Model_Config_Element))
  #2 /var/www/html/magento/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(164): Mage_Adminhtml_Block_System_Config_Form->_initGroup(Object(Varien_Data_Form), Object(Mage_Core_Model_Config_Element), Object(Mage_Core_Model_Config_Element))
  #3 /var/www/html/magento/app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php(92): Mage_Adminhtml_Block_System_Config_Form->initForm()
  #4 /var/www/html/magento/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(107): Mage_Adminhtml_Block_System_Config_Edit->initForm()
  #5 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_System_ConfigController->editAction()
  #6 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
  #7 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
  #8 /var/www/html/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
  #9 /var/www/html/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
  #10 /var/www/html/magento/index.php(87): Mage::run('', 'store')
  #11 {main}";s:3:"url";s:90:"/index.php/admin/system_config/edit/section/catalog/key/10c99ce673e69a7ece470ddd0411f6dd/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

The only reference I could find to this online was here and it didn't work for me.

This doesn't happen with any of the other sections of the Configuration menu.

P.S. Tried Woolfie's suggestion below (see comment) and this didn't find the problem either.

Can anyone help?


texts: How to add category translation programmatically?

texts:
How to add categories programmatically was described here.

Now, I have two store views (English and German) under one store.

When having added a category in englisch how can I then add the data for the German store view, that is, the translation for the category name, urlkey etc.?

In the frontend user interface this is easy. You just need to usethe store view switcher. How can I do this programmatically?


texts:
How can admin achieve it?
I have attached the image in which 2 things admin wants to achieve.

Category level - for clothing category admin want to show below add to cart " 7 Days Exchange Available "
Suppose for mobile category admin want to show " 5 Days Replacement Available "
Admin wants to set category wise different days.
In the mobile category, admin wants to show only ___ Days Replacement Available.
In Clothing Category admin want to show ____ Days Exchange, ____ Days Return
In Medical Products admin want to show " This item is not returnable "
how can admin achieve it at the category level?
Means for separate category admin want to write separate days and in some category, replacement is available, in some category exchange and returns are available and in some category " this item is not returnable "

Brand - Adiddas
Admin has created Product Attribute As Brand and at the time of product adding brand value is written.

Can anybody tell how can admin achieve it?


texts: Magento CE - Tax Rule based upon several required Product Classes

texts:
I am new to Magento and trying to setup Tax Rules based upon certain product combinations in the basket.

There are three possible tax valuations that I am trying to apply:

STANDARD which is 20% and applied to all "default" users and products.
ZERO which is 0% applied to products with the "Assistive" class and applies only to "Registered" users.
COMPOSITE which is 4% and only applies when "Assistive" class products are chosen with "Hardware" class and "Installation" class products.
1 and 2 are standard tax rules and have been setup. What I am having difficulty working out is how to create a tax rule which requires more than one Product Class for it to apply.

Is this possible with the core Magento or would it require an additional extension?

Many thanks.


texts: Magento 2 Change position of tabs in admin order view page

texts:
I am adding a new tab on orders page. I have made sales_order_view.xml in my module. Its code is as follows:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="left">
        <referenceBlock name="sales_order_tabs">
            <action method="addTab">
                <argument name="name" xsi:type="string">order_label</argument>
                <argument name="block" xsi:type="string">DL\Labelprinting\Block\Adminhtml\Order\View\Tab\Custom</argument>

            </action>
        </referenceBlock>
    </referenceContainer>
</body>

But this tab is appearing as first tab on orders view page. I want to appear it in last


texts: SOAP API fails with "couldn't load from…", "failed to load external entity…"

texts:
When calling upon the Magento SOAP API I get the well known

SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://{domain}/index.php/api/v2_soap/index/?wsdl=1' : failed to load external entity "http://{domain}/index.php/api/v2_soap/index/?wsdl=1"

however, loading the wsdl with file_get_contents works, and even the following simple test (in a seperate file) works fine.

$server = new SoapServer('http://{domain}/index.php/api/v2_soap/index/?wsdl=1', array(
    'encoding'     => 'UTF-8',
    'soap_version' => 2));

Then again, if i take the above and use in inside the Zend Soap Server class (where the server is created), it throws the same error.

Does anybody have any ideas what's going wrong here?


texts: Create and add attribute group with attributes to all attribute sets

texts:
I need to create and add an attribute group with 6 attributes to all attributes sets in an existing install.

I have found a script for creating an attribute group, this works great, but this can not add attributes to this new group.

Any help will be highly appreciated.

This script works great for adding an attribute group, but how can I add 6 attributes to a new group:

<?php
//enable errors to see if something is wrong
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
//include Mage.php
define('MAGENTO_ROOT', getcwd());
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
require_once $mageFilename;
//tell magento that you are running on developer mode, for additional error messages (if any)
Mage::setIsDeveloperMode(true);
//instantiate the application
Mage::app();
//get the type ID of the product - you will need it later
$entityTypeId = Mage::getModel('catalog/product')->getResource()->getTypeId();
//get all attribute sets
$sets = Mage::getModel('eav/entity_attribute_set')
    ->getResourceCollection()
    //filter only sets for products - that's why you needed the product type ID
    ->addFilter('entity_type_id', $entityTypeId);
//loop through all the sets
foreach ($sets as $set){
    //create an attribute group instance
    $modelGroup = Mage::getModel('eav/entity_attribute_group');
    //set the group name
    $modelGroup->setAttributeGroupName('Some group name here') //change group name
        //link to the current set
        ->setAttributeSetId($set->getId())
        //set the order in the set
        ->setSortOrder(100);
    //save the new group
    $modelGroup->save();
}


texts: Magento doesn't show my category listing on the new server

texts:
After moving magento to a other host everything seems to work except on homepage.

Only the top is being loaded untill the call for some category listing.
See the code below. Something doesn't work on this new host.

When I check the error log I see:

PHP Parse error:  syntax error, unexpected 'endforeach' (T_ENDFOREACH) in /home/xxx/domains/xxx.nl/public_html/app/design/frontend/rwd/default/template/catalog/navigation/category_listing.phtml on line 24, referer: http://www.xxx.nl/

http://phpcodechecker.com/ finds no errors. I'm no php coder.
Anyone who knows what could be wrong? It works on the old host.

<?php $_maincategorylisting=$this->getCurrentCategory()?>
<?php $_categories=$this->getCurrentChildCategories()?>

        <? foreach ($_categories as $_category):?>
        <? if($_category->getIsActive()): ?>
        <?php $cur_category=Mage::getModel('catalog/category')->load($_category->getId()); ?>
        <?php $layer = Mage::getSingleton('catalog/layer'); ?>
        <?php $layer->setCurrentCategory($cur_category); ?>
        <? if($_imageUrl=$this->getCurrentCategory()->getImageUrl()):?>

            <a href="<?php echo $this->getCategoryUrl($_category) ?>" title="<?php echo $this->htmlEscape($_category->getName()) ?>">
                <img src="<?php echo $_imageUrl ?>" width="100%" height="auto" alt="<?php echo $this->htmlEscape($_category->getName()) ?>" />

<?php echo $this->htmlEscape($_category->getName()) ?>

        <? if($_description=$this->getCurrentCategory()->getDescription()):?>

            <?php echo $_description ?>

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

<?php $layer->setCurrentCategory($_maincategorylisting); ?>

EDIT

<?php $_maincategorylisting=$this->getCurrentCategory() ?>
<?php $_categories=$this->getCurrentChildCategories() ?>

        <?php foreach ($_categories as $_category): ?>
        <?php if($_category->getIsActive()); ?>
        <?php $cur_category=Mage::getModel('catalog/category')->load($_category->getId()); ?>
        <?php $layer = Mage::getSingleton('catalog/layer'); ?>
        <?php $layer->setCurrentCategory($cur_category); ?>
        <?php if($_imageUrl=$this->getCurrentCategory()->getImageUrl()); ?>

            <a href="<?php echo $this->getCategoryUrl($_category) ?>" title="<?php echo $this->htmlEscape($_category->getName()); ?>">
                <img src="<?php echo $_imageUrl ?>" width="100%" height="auto" alt="<?php echo $this->htmlEscape($_category->getName()); ?>" />

<?php echo $this->htmlEscape($_category->getName()); ?>

        <?php if($_description=$this->getCurrentCategory()->getDescription()); ?>

<?php echo $_description ?>

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

<?php $layer->setCurrentCategory($_maincategorylisting); ?>


texts:
I want to disable orders from a certain cities/postal-codes in Magento 2.

I want website to be accessible just visitor will not be able to order products if they are from certain cities/postal-codes.

  And show Error message like "you can not order from this city."


texts:
I need to change the type of the column "value" in the table catalog_product_entity_varchar from varchar(255) to varchar(512), but I find nothing in the documentation about how to do it, so I copy pasted something together from the code I found.

app\code\Company\Base\Setup\UpgradeSchema.php:
<?php

namespace Company\Base\Setup;

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

class UpgradeSchema implements UpgradeSchemaInterface
{
    public function upgrade(SchemaSetupInterface $setup,
                            ModuleContextInterface $context) {
        $setup->startSetup();

        // Wenn Version kleiner als 1.0.1
        if (version_compare($context->getVersion(), '1.0.1', '<')) {

            // Get module table
            $table = $setup->getTable('catalog_product_entity_varchar');
            $connection = $setup->getConnection();

            // Check if the table already exists
            if ($connection->isTableExists($table) == true) {

                $connection->modifyColumn(
                    "catalog_product_entity_varchar",
                    'value',
                    [
                        'type' => Table::TYPE_TEXT,
                        'length' => '512',
                    ]
                );
            }
        }

        $setup->endSetup();
    }
}

I also increased the version in my module.xml from 1.0.0 to 1.0.1:
app\code\Company\Base\etc\module.xml:
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Company_Base" setup_version="1.0.1"/>
</config>

Then I executed bin/magento setup:upgrade but it changed it to text instead of varchar(512) and it removed the comment and the Standard NULL:
Before:

After:


texts: Multisite tax configuration: Different tax rate for same country in multi website

texts:
What is the best way to configure tax in the following scenario:
I have two websites:
Site A:

  tax rates: 0, 9, 21
  countries NL, BE
  all tax rates are applicable to both countries

Site B:

  tax rates: 0, 9, 21
  countries: NL, BE
  all tax rates applicable to NL only
  For BE no tax is applied.

Products are configured to have tax class 0% BTW or 9% BTW or 21% BTW.
If I select 21% BTW for a product then for site A it works without an issue, but for site B, I cannot make it 21% when NL is selected as the country in checkout and 0% when BE is selected.
How can this be achieved?


texts: Probleme of css and javascript not working on server amazon magento 2

texts: I have put my project on server amazon and i get no css none javascript and i tried every sol in stack but still not working please advice me to fix this issue thanks


texts: Magento 2.2.7 dashboard logos and images are not displaying

texts: In the dashboard images and logos are not displaying????even magento logo also not displaying???can anyone help with it?


texts: mobile view image quality as blurry in product list and details page magento 2.2.4

texts:
Image quality blurry issue in mobile view product list/details page. magento ver is 2.2.4. I found the reason for this issue.  Having 2 MB image file and product uploaded in admin side. Then i can see the image size as 200 kb only. using image adapter is graphics Gmagick . Product actual image size 1000 x 1506 px. PNG / JPEG format. For now i have uploaded high resolution image like retina images.
tried to product uploaded in admin side image size are more than 8 MB and size would be 3527 x 5290 px.After uploaded product images we can see more difference of image size and weight. I used high resolution image

How to avoid/control auto compression after uploaded product image?
Anybody share the solution.


texts: Magento 2: Does a free shipping only for Cart Price rule?

texts:
I've tried applying a free shipping rule to a brand of products if the order is over $50.
However, it doesn't seem to actually apply.
The rule I have is:

-No Coupon
-Conditions:   =if ALL of these cond. are TRUE:
    = Subtotal equal or greater than 50
    = If an item is FOUND in the cart with ALL of these conditions:
        = Manufacturer: is X
        = Quantity in Cart equals or greater than 1

Actions:
= Apply: Percent of product price discount
= Discount amount: 0
= Max Qty: 1000 Apply to Shipping Amount: Yes
= Discard Subsequent rules: no
= Free Shipping: For shipment with matching items:
   = If ALL of these conditions are True:
       = Manufacturer is: X
       = Quantity in cart is equal or greater than 1

Not sure why this isnt working if I add 20 of an item from Manufacturer X and the value is over $50, this isnt getting applied at all.

My shipping setup is as follows:

Two websites, store and store_views:

1) WebsiteUSA, StoreUSA, USA (Default, US currency) [this is for US and International customers]
2) WebsiteCA, StoreCA, CA (CAD currency) [Canada customers only]

Default and USA shipping:

UPS:
Enabled: Yes
Live Acccount: Yes
Free Method: Ground
Free Shipping Amount Threshold: Disabled
Specific Countries: Everywhere excluding Canada
Show Method if Not Applicable: Yes
Debug: Yes

Flat Rate, Free Shipping, Table Rates, USPS, FEDEX, DHL: Enabled: No

Canadian Store Shipping:

Flat Rate: Enable: YES
Title: City Location Only!
Method: In Store Pickup
Type: Per Order
Price: 0.00
Handling: 0
Specific Countries: Canada Only
Show Method if Not Applicable: Yes
Sort Order: 10

Free Shipping: Enable: No (for some odd reason, if I enable this, it appears ALL the time, regardless of settings)

UPS: Enabled: Yes
    Free Method: Ground
    Live Account: Yes
    Free Shipping Amount Threshold: Disabled
    Specific Countries: Canada Only
    Show Method if Not Applicable: Yes
    Debug: Yes

Table Rates, USPS, Fedex, DHL: Enable: No

We have the shipping setup slightly differently only because we get different rates per country.


texts: Magento 2.2.4: Homepage missing from Sitemap.xml

texts:
I'm encountering an issue where the homepage is missing entirely from the sitemap.xml file.  In previous versions, it was included as /home which was identified as a duplicate content issue and corrected by:

https://github.com/magento/magento2/issues/12446
https://github.com/magento/magento2/commit/7e43513c7af1b7dee314037a9d46db67be0fd38a

These commits appear to exclude 3 pages from the sitemap.xml, home, 404, and cookie restriction. However, while trying to solve removing /home from the sitemap, we removed the homepage all together. I don't believe this to be expected behavior, but maybe I'm missing something?

Can anyone provide insight into how to get the homepage as examplesite.com within the sitemap.xml file, and separately maybe explain the intention behind the above commits?


texts: Magento 2: Product Detail Page Image Not Loading

texts: In back end & front end product image is reflecting but on product detail page image are not showing its just loading. I'm done with reindexing, cache clear and resizing the image but no use of it facing the same issue. screenshot here for reference https://prnt.sc/owuqlx. Kindly help me on this.


texts: Original Price And Special Price Issue in Magento 2

texts:
I want like this If original price is higher than the special price than original price should be hide in product details and throw out the check out page.

Can you please let me know where to add this calculation in magento files? If you can show me the location of the file than i can add some code over there.

Thanks In advance.


texts: Two menu items missing from magento admin panel

texts: Don't know when this happened. Suddenly I just noticed that two menus "mobile" and "newsletter" are missing from magento admin panel. Any clues?


texts: How can I tell what *.phtml file does what in the page?

texts:
I am working with an existing template and skin and I need to know what .phtml files correspond to what part of the page. I found header.phtml and that contains everything in the header block, but how can I tell what the other blocks use for phtml files?

Much thanks!


texts: Products stays on category pages where i deleted them

texts:
I try to move a product to one category, but it stay's on the category's that it was before.

But it shows up on "kleding", and it doesn't has to.


texts: Magento 2 - Create csv file for download in admin

texts:
I need to create a file in mangento 2 admin.

I'm using a button to get in a controller route.

My form ui component:

<item name="buttons" xsi:type="array">
            <item name="save" xsi:type="string">Vendor\Module\Block\Adminhtml\Report\Edit\ExportButton</item>
</item>

I used a dummy data provider just for use the submit url:

<dataSource name="bvz_report_specifier_form_data_source">
        <argument name="dataProvider" xsi:type="configurableObject">
            <argument name="class" xsi:type="string">Vendor\Module\Ui\Component\Form\DummyDataProvider</argument>
            <argument name="name" xsi:type="string">bvz_report_specifier_form_data_source</argument>
            <argument name="primaryFieldName" xsi:type="string">entity_id</argument>
            <argument name="requestFieldName" xsi:type="string">entity_id</argument>
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="submit_url" xsi:type="url" path="*/*/export"/>
                </item>
            </argument>
        </argument>
        <argument name="data" xsi:type="array">
            <item name="js_config" xsi:type="array">
                <item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
            </item>
        </argument>
    </dataSource>

In Vendor/Module/Controller/Adminhtml/Index/Export I creat an csv file and save it and put the name of file in URL.

Now I need to download this file when the page refresh.

In the index controller I have this code to make the download:

if($fileName = $this->getRequest()->getParam('file')){

            $url = $mediaUrl = $this ->_storeManager-> getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA );
            $resultRedirect = $this->resultRedirectFactory->create();
            return $resultRedirect->setUrl($url.$fileName);
        }

The download happens but my page goes to infinite load.


texts: Where does the price precision come from?

texts: I have my Magento 2.2.6 webshop set up locally (development mode) and on the server (production mode). On my local installation the cart summary shows a precision of 2 decimals, on my server it shows a precision of 1. Where does this come from? How come they are not the same?


texts:
I've been looking and looking and I can't seem to find the be all end ll to move this welcome message snippet.

I've looked around and found this question and answer to be helpful but not exactly what I was looking for.

I've located these files the above linked answer talks about, however I'm really only looking to move JUST the welcome message. I'd like to have it full width above the header. So ideally I'd like to do something like:  but alas I do not know the hook for the welcome message.

The welcome message is in html/header.phtml and the block is referenced from this XML file, I'm not sure how to reference just the xml part of it? I've attempted to grab from the ko javascript from the header.phtml and make it my own in my own custom backend block and then reference the block in the default.xml file but that doesn't do anything at all. Just removes it completely.

So this is what I thought would work:

I've created a new template in my themes Magento_Theme folder and called it config_headergroup_notification.phtml:

<?php
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/**
 * @var \Magento\Theme\Block\Html\Header $block
 */
$welcomeMessage = $block->getWelcome();
?>
<?php switch ($block->getShowPart()):
    case 'welcome': ?>

 hello???

                <span data-bind="html:'<?=$block->escapeHtml($welcomeMessage) ?>'">

    <?php break; ?>

    <?php case 'other': ?>
        <?php echo $block->getChildHtml(); ?>
    <?php break; ?>

<?php endswitch; ?>

Then added parts of the header.phtml code I thought would bring up my welcome message.

Then in my themes Magento_Theme default.xml file I've added this:

<referenceContainer name="header.panel">
              <block class="Magento\Framework\View\Element\Template" name="config.header.notification" before="-" template="Magento_Theme::config_headergroup_notification.phtml" />
        </referenceContainer>

But that just doesn't work. I know the function works because if I just put some text in the config_headergroup_notification.phtml and of course clear my theme files and cache the text appears in the header.panel section but my welcome message just won't show if I make any other attempted adjustments.

So then I thought I could find a block to reference and just move it as I've done with other ones in my default.xml file. So that's where my hopes are that I just need to find the block name for JUST this welcome message and then move it where I want. Like this first example in my question:

<move element="welcome.message" destination="header.panel" before="-"/>

Is anyone able to provide any insight or advice on this? I'm no Magento programmer but I do have a good idea of these basic xml changes.


texts: I need to display the products marked as new in a dedicated page in my e-shop and use the same products list template I am using in the catalog_category_view page. Does Magento already provide this functionality or should I write something custom?


texts: Magento ver. 1.8.0.0, unable to install rwd/default responsive theme

texts:
I am trying to install the latest rwd/default theme onto my live server magento installed on GoDaddy hosting. Version of the magento installed on GoDaddy is 1.8.0.0 whereas on my localhost the version is 1.9.0.1.

I have tried all the steps as listed on magento commerce website like created directories (customtheme/custompackage/etc), copying the files from rwd/default to customtheme/custompackage, then adding the same in Magento backend System/Configuration/Design.

But my live Magento server is picking the default theme instead of the rwd/default or customtheme.


texts: Magento2 admin panel, open an url in new tab using window.open

texts:
Below codes opens the link in same window, how can I change it to open it in new tab?

if ($canModify) {
            $data = [
                'label' => __('Login As Customer'),
                'class' => 'login login-button',
                'on_click' => 'window.open( \'' . $this->getInvalidateTokenUrl() .
                    '\')',
                'sort_order' => 70,
            ];
        }

edit:

below are not working:

'on_click' => 'window.open( \'' . $this->getInvalidateTokenUrl() .
                    '\',\'_blank\')',

and

'on_click' => 'window.open( \'' . $this->getInvalidateTokenUrl() .
                    '\')',
                'target' => '_blank',


texts:
I would like to add attributes into a particular magento static block. Each product has a specific attribute that is assigned to it and I would like to display that attribute into a specific static block.

I have created the attribute set SIZECHART and added women-top, women-bottom  and assign to products. I have also created static block women-top, women-bottom. I have a separate static block called SiZE that I would like to display the information on product page when someone is viewing the product.
The current code I have is and it not working

<?php
   $_prodID = Mage::registry('current_product')->getId();
   $_product = Mage::getModel('catalog/product')->load($_prodID );
?>
<?php $attributeValue = strtolower($product->getAttributeText('sizechart')); ?>
<?php $staticBlockIdentifier = "static_block_".$attributeValue; ?>
<?php echo $this->getLayout()->createBlock("cms/block")->setBlockId(size)->toHtml();?>


texts: Frustrated - filled in FEDEX details in the Admin (1.9.1) and got a Fatal error: Class 'SoapClient' not found

texts:
I can't believe in this day and age things have to be so difficult. I installed a fresh Magento install - 1.9.1. - I just needed 2 things - a responsive theme and a calendar. I installed a 100% responsive theme, then bought (and installed) a calendar and the calendar is showing really really bad (like you can't even tell what month you are in and so on...)

Anyways, I want to ask all of you smart people here this:

I called Fedex, got all the settings to fill in on the Fedex Shipping option in the Admin panel and then - the front end stopped working! It gives the following Error:

Fatal error: Class 'SoapClient' not found in /home/clothes/public_html/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php on line 134

I tried to seach for this Error on the web but there are such complicated answers.

Can someone please explain in simple terms what I need to do to fix this?

Thank you very much,

Allysin


texts: Duplicated line on invoice/order for configurable product

texts:
Hello.

configurable product generates 2 lines :
one with the actual price and the other one with $0 price.
this happens 1-2 out of 100 orders.

Can anyone help me with this duplicate issue?
Thank you in advance.


texts: After successful run of the magento data migration tool from 1.9.2.1 to 2.3.5-p1 orders do not display line items

texts:
I was able to get the Data Migration Tool to transfer our site's data and settings from v1.9.2.1 to v2.3.5-p1.
There is one small problem that I can't figure out though.
When I view orders on the admin side, the section titled "Items Ordered" is always empty.
But the order line items are in the database.

This returns one row as expected for this order

select * from sales_order WHERE entity_id = 77002;

This returns 5 rows as expected for this order

select * from sales_order_item WHERE order_id = 77002;
I am still in the early stages of learning Magento.
Thank you.

Edit 1:
I ran tail on the /var/www/html/var/log/debug.log   and got the following errors  when refreshing the admin view order page:
[2020-06-18 15:46:22] main.CRITICAL: Type Error occurred when creating object: Magento\Framework\Filter\TruncateFilter\Result, Argument 1 passed to Magento\Framework\Filter\TruncateFilter\Result::__construct() must be of the type string, null given, called in /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121 [] []
[2020-06-18 15:46:22] main.CRITICAL: Type Error occurred when creating object: Magento\Framework\Filter\TruncateFilter\Result [] []


texts: Magento 2: header links missing from checkout pages

texts: In Magento 2, the "header links" element (top.links) is missing on checkout pages.  I'm using a custom theme with Magento/blank as the parent.  I have added custom links to my theme at app/design/frontend/vendor/theme/Magento_Theme/layout/default.xml, and I want those links to also appear on checkout pages (everything after the cart page).


texts: Magento 2 - The right way to get a product attribute value

texts:
I'm wondering if there's a right way to get the value of a product attribute, in a generic way.

EDIT:
Or whatever I can use to get the info from a dropdown or text field using the same mechanism

I know I can do:
$product->getData('attribute_code')

But if the code it's a dropdown select then I'll be getting a value which doesn't represent really what the users selected.
For example in a dropdown to select a t-shirt size options would be (s,l,xl) and internal values (1,2,3)

It's a way to know how to get the attribute type to later identify what I should be looking for or the right way to pick the value.


texts: Could not read config file while deploying static content in Magento 2?


texts: Magento2 Add custom link to customer accounts link based on customer group

texts:
I have a Magento 2.4 based website and I am trying to add a custom link in the My Accounts side bar box when logged in and viewing the dashboard pages. I am trying to make a link show only for users logged in who belong to the Wholesaler customer group (group id 2)
I have cleared cached and ran upgrade complile deploy however the link is not showing?
Here is my files:
app/code/Austinwilliams/Module/view/frontend/layout/customer_account.xml
<?xml version="1.0"?>
   <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_account_navigation">
           <block class="Vendor\Module\Block\Customergroup\Link" name="media-library-link" after="-">
               <arguments>
                 <argument name="label" xsi:type="string">Media Library</argument>
                 <argument name="path" xsi:type="string">media-library</argument>
               </arguments>
           </block>
         </referenceBlock>
    </body>
</page>

app/code/Austinwilliams/Module/Block/Customergroup/Link.php
namespace Vendor\Module\Block\Customergroup;

class Link extends \Magento\Framework\View\Element\Html\Link\Current
{
   protected $_customerSession;

   public function __construct(
    \Magento\Framework\View\Element\Template\Context $context,
    \Magento\Framework\App\DefaultPathInterface $defaultPath,
    \Magento\Customer\Model\Session $customerSession,
    array $data = []
 ) {
     $this->_customerSession = $customerSession;
     parent::__construct($context, $defaultPath, $data);
 }

protected function _toHtml()
{
    $responseHtml = null;
    if($this->_customerSession->isLoggedIn()) {

        $customerGroup = $this->_customerSession->getCustomer()->getGroupId();

        if($customerGroup == '2') {
            $responseHtml = parent::_toHtml();
        }
    }
    return $responseHtml;
 }
}


texts:
I call controller function from phtml via ajax, it calls controller function Now i am trying to call block function in controller it is not working

Controller code

 public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\Controller\Result\JsonFactory $resultPageFactory,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory
    ) {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
        $this->_registry = $registry;
        $this->_resultLayoutFactory = $resultLayoutFactory;
    }

    public function execute()
    {
        if($this->getRequest()->isAjax()){
            $start = $_POST['start'];
            $end = $_POST['end'];

            $enddate = date('Y-m-d 23:55:55', strtotime($end));
            $startdate = date('Y-m-d 00:00:00', strtotime($start));
            $resultLayout = $this->_resultLayoutFactory->create();
            $response = $resultLayout->getLayout()->getBlock('My\Module\Block\dashboard')->getprocesseddata();
            return $response;
        }

}

In block

 public function __construct(
        Template\Context $context,
        CardsManageFactory $cardsManageFactory,
        Data $helperData,
        array $data = [],
        \Magento\Sales\Model\ResourceModel\Order\CollectionFactory $orderCollectionFactory,

        \Magento\Catalog\Model\CategoryFactory $categoryFactory,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Magento\Backend\Model\Session $session,
        \Magento\Framework\Registry $registry
    )
    {

        $this->_orderCollectionFactory = $orderCollectionFactory;
        $this->_categoryFactory = $categoryFactory;

        parent::__construct($context, $data);

        $this->_cardsManageFactory = $cardsManageFactory;
        $this->_helperData         = $helperData;
        $this->scopeConfig = $scopeConfig; // get api_key and secret_key
        $this->session = $session;
        $this->_registry = $registry;
    }

 public function getprocesseddata()
    {
      return 1;
}

while call controller execute from ajax . call is working. but from controller i cant call block


texts:
We're considering to upgrade Magento EE to 1.14, now we have 1.12.
My question is if we have some webservices to upload the products and stuff with soap v2 it will have some changes?
And do you know if is easy or has some complications because I was searching and saw that is an important change from .12 to .14.
Is it necessary to do a complete backup of files and database?
Thanks for any information.


texts: INSERT ON DUPLICATE KEY UPDATE Magento2 Error

texts:
When i tried to save the product from Admin i am getting below error

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'catalog_product_category_cl' doesn't exist, query was: INSERT INTO catalog_product_entity_int (entity_id,attribute_id,value,store_id) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE entity_id = VALUES(entity_id), attribute_id = VALUES(attribute_id), value = VALUES(value), store_id = VALUES(store_id)

Please help me to fix this issue.


texts: Get Magento CMS pages and widget in wordpress home page

texts:
I am excellent in wordpress. I am new to magento. I am interested to learn magento.
I added 3 widgets in content part of cms page. Now i need to display it in wordpress homepage. Can you pls help to find solution?

{widget type="meigeewidgets/featuredcategory" featured_category="category/3" template="meigee/meigeewidgets/slider_small.phtml" products_amount="15" slider_small_speed="1000" slider_small_easing="easeInQuad" widget_small_id="6615"}