texts: Split the quote object to multiple quotes with respect to category

texts:
I have successfully split the quote to multiple quotes and the orders are being placed seperatly for every category.
Product price and subtotals are successfully calculated according to the products items in a quote order. But shipping charges are assigned multiply.
Suppose if I order 3 items each of different category. The shipping charges will be $15 ( 5 for 1 product).
When I place the 3 orders ( as 1 1 product of each category) each category has been charged $15 instead $5 .What should I do?


texts: Why there is no form key validation in some customer's controller actions?

texts:
I'm not an expert in Magento but I think there should be a form key validation on these controllers in Magento_Customer, no?

vendor/magento/module-customer/Controller/Account/ForgotPasswordPost.php
vendor/magento/module-customer/Controller/Ajax/Login.php

I did some tests and I was able to login and get the message: "if there is a email associated..." With wrong formkey and without


texts: Redirected to store base URL instead of custom admin URL

texts:
In case of Custom Admin URL (in System -> [Advanced] Admin -> Admin Base URL) is set to something like http://mytreasure.store.com after creation of order or invoicing it Magento redirects back to the base url. I pin-pointed this to the store view change to the one order being assigned to

But whatever this is a bug or misconfiguration I really wonder

Magento is CE 1.7 fully patched


texts: Placeholder image does not display in product detail page in my custom theme magento 2?

texts:
I have added placeholder image for products. It displays in admin side, display cart, list page, minicart perfect, but does not display in product detail page.

Thanks...


texts: I am having this kind of error while doing mass delete

texts:
I am facing this error while doing mass delete action in magento 2.3.5.
{"Invalid method delete","1":"#1}
Please anyone have idea please Share with me.
Thank you In Advance.


texts:
I'm working on a reseller shop...

The customer=reseller should be able to switch the price views from

reseller price to final price and back.

One way would be to change the accountgroup_id temporarily but it MUST NOT be saved permanently.

How can I change the group temporarily or is there a better way?
The temporary group id is stored in the session.

And it must not have any effect to the order - the order price must be the reseller price.


texts: VAT over shipping costs depending on VAT rate of products

texts:
In The Netherlands we're blessed with the inconvenient situation that VAT has to be calculated over shipping costs and the VAT rate to be used is the highest rate of any of the products in the shipment. Currently we have 3 VAT rates:  0%, 6% and 21%.
Examples:
1)a customer buys 3 products that haven all 3 a VAT rate of 6%: over the shipping costs also 6% tax must be charged
2) a customer buys 3 products with 6% VAT and 1 product with 21% VAT: over the shipping costs now 21% tax must be charged.

I was thinking on telling Magento that all shippings costs entered in the admin are without VAT and then check all products in the cart at checkout and see what VAT rates they have. Pick the highest product rate and charge that for the sending costs.

But where do I do that so that it's correct for the sending costs and VAT estimate, the final order overview and the PDF invoice ?  Or should I change it at multiple places?

Any help is appreciated...

P.S. Most dutch webshop solve it by simply always charging 21% over shipping costs. That's of course allowed and the tax office won't mind.....but since we mostly have small orders (under 20 euro) we would prefer to not charge more then necessary.


texts: How to change Product price of a Cart? [SOLVED]

texts:
I created an order using Rest Api and i want to change the Produt Price from a Cart.
I tried this:
But didn't work, this line: $quote = $this->quoteFactory->create()->load($resultQuote->quote_id); returns null. What could be? Any help is appreciated.
 $quote = $this->quoteFactory->create()->load($resultQuote->quote_id);
 $items = $quote->getItemsCollection();

 foreach ($items as $item) {

    $item->setPrice(999);
    $item->setRowTotal(999);
    $item->setCustomPrice(999);
    $item->setOriginalPrice(999);
    $item->setOriginalCustomPrice(999);
    $item->getProduct()->setIsSuperMode(true);
    $item->save();
    $quote->save();
 }

 $quote->setTotalsCollectedFlag(false)->collectTotals();
 $quote->save();


texts: How to get feature product on home page in magento 2 customization?

texts:
How to get all featured product on home page in magento 2 ?

Customization throw how to get all featured products ? Please tell me step by step guide what file to create what to do ?


texts: how to change magento 2 date.js form file

texts:
I want to change :

  magento/module-ui/view/base/web/js/form/element/date.js file

and
set my custom date file , for this purpose I've added this line to my requirejs-config in my module :

'map': {
    '*': {
        'Magento_Ui/js/form/element/date' : 'MyNamespace_MyModule/js/date_form'
    }
},

but when I refresh page I get this error in console :

  Uncaught TypeError: elem.initContainer is not a function
      at UiClass.initElement (collection.js:57)

and magento can't load date input element .

I think the problem is this part at date.js :

elementTmpl: 'ui/form/element/date',

it seems magento can't find this path for load it's html template .

I changed template path to this :

elementTmpl: 'Magento_Ui/form/element/date',

but noting changed .

how can I change this path base on my module ?

note : I don't want change date.html template file and I want to use magento default template file .


texts: Magento 1.9.2 Sort attribute by position

texts:
I have the following code but need to sort by the position value set for each attribute option in the back end.

        $this->_optionCollection = Mage::getResourceModel('attributepages/entity_collection')
            ->addOptionOnlyFilter()
            ->addFieldToFilter('attribute_id', $parentPage->getAttributeId())
            ->addUseForAttributePageFilter()
            ->addStoreFilter($storeId)
            ->setOrder('main_table.title', 'asc');

I have tried the following:

->setOrder('main_table.position', 'asc');
->setOrder('main_table.sort_order', 'asc');
->setOrder('position', 'asc');
->setOrder('sort_order', 'asc');

All Fail. Can anyone assist?

FULL CODE

protected function _getOptionCollection()
{
    if (null === $this->_optionCollection && $this->getCurrentPage()) {
        $storeId = Mage::app()->getStore()->getId();
        $parentPage = $this->getCurrentPage();
        $this->_optionCollection = Mage::getResourceModel('attributepages/entity_collection')
            ->addOptionOnlyFilter()
            ->addFieldToFilter('attribute_id', $parentPage->getAttributeId())
            ->addUseForAttributePageFilter()
            ->addStoreFilter($storeId)
            ->setOrder('main_table.title', 'asc');

        if ($excludedOptions = $parentPage->getExcludedOptionIdsArray()) {
            $this->_optionCollection
                ->addFieldToFilter('option_id', array(
                    'nin' => $excludedOptions
                ));
        }

        if ($limit = $this->getLimit()) {
            $this->_optionCollection->setPageSize($limit);
        }

        // filter options with the same urls: linked to All Store Views and current store
        $urls = $this->_optionCollection->getColumnValues('identifier');
        $duplicateUrls = array();
        foreach (array_count_values($urls) as $url => $count) {
            if ($count > 1) {
                $duplicateUrls[] = $url;
            }
        }
        foreach ($duplicateUrls as $url) {
            $idsToRemove = array();
            $removeFlag = false;
            $options = $this->_optionCollection->getItemsByColumnValue('identifier', $url);
            foreach ($options as $option) {
                if ($option->getStoreId() !== $storeId) {
                    $idsToRemove[] = $option->getId();
                } else {
                    $removeFlag = true;
                }
            }
            if ($removeFlag) {
                foreach ($idsToRemove as $id) {
                    $this->_optionCollection->removeItemByKey($id);
                }
            }
        }

        foreach ($this->_optionCollection as $option) {
            $option->setParentPage($parentPage);
        }
    }
    return $this->_optionCollection;
}


texts: Failed to load 3rd party library in Magento 2

texts:
I have a 3rd party library and i put it inside lib/internal folder like this :

but when i call the function in my custom module helper/data.php , i got an error undefined function, here's the helper/data.php :

use RocketLabs\SellerCenterSdk\Core\Client;
use RocketLabs\SellerCenterSdk\Core\Configuration;
use RocketLabs\SellerCenterSdk\Core\Request\GenericRequest;
use RocketLabs\SellerCenterSdk\Core\Response\SuccessResponseInterface;

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{

    public function test()
    {
                $request = new GenericRequest(Client::POST,'GetCategoryTree',GenericRequest::V1, [], []);
                print_r($request);
                exit;

    }
}


texts: I cant seem to find any information why we need to create a Collection.php file inside ResourceModel and what is the purpose of collection.


texts: How to add a banner to default iphone theme

texts:
i've found this line in app\design\frontend\default\iphone\template\page\1column.phtml

<?php echo $this->getChildHtml('homepage.banner') ?>

it seems adding a banner into the page, but where/how can i make this line of code useful? add  a static block? what is homepage.banner referring?


texts:
vendor/magento/module-contact/Controller/Index/Post.php set in session messages like

$this->messageManager->addSuccess(
    __('Thanks for contacting us with your comments and questions. We\'ll respond to you very soon.')
);
$this->_redirect('contact/index');

How do I access these messages in phtml?


texts: Magento 2 - Facebook pixel tracking on AddToCart event

texts:
Note: Before marking it as duplicate please read description carefully

I am creating a module for Facebook pixel tracking and I am stuck at AddToCart event.

I have seen some 3rd party extensions, but the issue is they are tracking AddToCart after page load and my AddToCart event should based on ajax based.

So my question is, how can I trigger AddToCart facebook pixel code after ajax add to cart?


texts: magento 2: How add time to datepicker in backend

texts:
I'am using magento 2.0.5 and I want to add date field with time which saves date as well as time in database for entity.
I had tried this code to add new field in my module.
$fieldset->addField('enddate', 'date', array(
        'name' => 'enddate',
        'label' => __('End date'),
        'title' => __('End date'),
        'format' => 'yy-mm-dd H:i:s',
        'input_format' => 'yy-mm-dd H:i:s',
        'required' => true,
            )
    );

but this gives me only date to select not time

Please help me.
Thanks.


texts: magento2, create correctly SELECT used collection

texts:
i have this code
$collection = $this->orderCollectionFactory->create()
                ->addFieldToSelect(['increment_id', 'global_currency_code', 'status', 'updated_at', 'total_due', 'billingTable.vat_id'])
                ->addAttributeToFilter('status', ['in' => [
                    Order::STATE_CLOSED,
                    Order::STATE_COMPLETE,
                    Order::STATE_CANCELED,
                ]])
                ->addAttributeToFilter('created_at', ['from' => $result['from'], 'to' => $result['to']]);
            $collection->getSelect()->joinLeft(['billingTable' => 'sales_order_address'], "main_table.entity_id = billingTable.parent_id AND billingTable.address_type = '{$this->addressType}'");

i have this SQL
main_table.billingTable.vat_id' in 'field list', query was: SELECT `main_table`.`entity_id`, `main_table`.`increment_id`, `main_table`.`global_currency_code`, `main_table`.`status`, `main_table`.`updated_at`, `main_table`.`total_due`, `main_table`.`billingTable.vat_id`, `billingTable`.* FROM `sales_order` AS `main_table`\n LEFT JOIN `sales_order_address` AS `billingTable` ON main_table.entity_id = billingTable.parent_id AND billingTable.address_type = 'billing' WHERE (`status` IN('closed', 'complete', 'canceled')) AND (`created_at` >= '2020-05-15 12:00:00' AND `created_at` <= '2020-08-29 12:00:00')

i have problem with this main_table.billingTable.vat_id
i need billingTable.vat_id


texts:
I use Magmi with Magento 1.9 for a few years now. All of a sudden, no matter what I do, press “run” or “save profile”, Magmi sends me to the login page.
Help anyone?

Thanks


texts:
I've a helper and in the __construct() something like:

public function __construct(
        Context $context,
        \Magento\Customer\Model\Session $customerSession
    )
    {
        parent::__construct($context);

        $this->_customerSession = $customerSession;

    }

he problem is when I can the $_customerSession object data it's empty, even though I've logged in.

It seems the session is instantiated at a later point in the process, because if I call the customer\Session object in a page Model or block it works fine. In fact, the whole store works as expected. I can see the logged in welcome message at the top right bar, add products to cart, login.

Thecode above is dispatched in the event

catalog_product_get_final_price

How do I make sure the session is loaded or how do I know when it's loaded?


texts: Replace store address with custom text in invoice pdf

texts: I want to replace my store address on invoice pdf with text "Tax Invoice/Bill of Supply/Cash Memo". I am trying to edit in Abstract.php where there is a method which inserts address on pdf : insertAddress(). But cannot understand what to change in the function.


texts: Add Attribute Bulk Value Using CSV File in Magento 2.3.3?

texts:
I have Magento 2.3.3 Store And I have too many Product Dropdown Attribute And One Attribute have a something 500 1000 value.

So How can I add multiple values using CSV file or other options so, please give me an answer.

Thanks.


texts: Onepage Checkout - Get selected payment method

texts:
I'm trying to get user's current selected payment method, in onepage checkout page. I tried the following

$paymentMethod = Mage::getSingleton('checkout/session')->getQuote()->getPayment()->getMethodInstance()->getCode();

but the payment method returned is not correct. Actually it's a method that's not even activated in my store (check/money order).

Why is this happening and how can I get the correct value?


texts:
I want to generate some fake data for testing on demand.  Either console script or button within admin.  Ideally have the option of generating x number of customers/customer addresses, orders (either as they are, invoiced or invoiced and shipped), products (simples are fine although could extend to other types), categories.  Essentially speed up extension and template development.

I always feel the sample data does more than it should.  I don't need all the other configuration changes.  Less/easier to delete after use.  Does anyone have any suggestions on how to do this?  Or know of an extension?

I looked at this https://github.com/experius/Magento-2-Module-Experius-FakeMyData but I think this is the wrong approach

I was hoping to find an M2 version of this https://github.com/ovanschie/mageFaker


texts: Magento 1.9 - Pass value From Select into Gallery.phtml to uploadAction into GalleryController.php

texts:
I need check the value set into custom select during Upload Image

Manage Product -> Product -> Image -> User Browse image

into Gallery.phtml

example i add this simple select

<select id="type">
   <option value="1">1</option>
   <option value="2">2</option>
   <option value="3">3</option>
   <option value="3">3</option>
</select>

after user Click Upload

During Upload, into uploadAction

Mage_Adminhtml_Catalog_Product_GalleryController

i need check what is the value set into my custom select

what should I do?

Other info:
I've already created a personal admin template, and overridden the class and everything works,
I just have to know how to retrieve the value


texts: How to get Final Price from Magento\SalesRule\Api\RuleRepositoryInterface

texts:
I am trying to get the final amount after from \Magento\SalesRule\Api\RuleRepositoryInterface
<?php
class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
    protected $ruleRepositoryInterface;
    protected $builderHelper;

    public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        \Magento\SalesRule\Model\CouponFactory $couponFactory,
        \Magento\SalesRule\Api\RuleRepositoryInterface $ruleRepositoryInterface
    ) {
        parent::__construct($context);
        $this->couponFactory = $couponFactory;
        $this->ruleRepositoryInterface = $ruleRepositoryInterface;
    }

    $rule = $this->ruleRepositoryInterface->getById($ruleId);
    $data['DiscountAmount'] = $rule->getDiscountAmount();
    $data['from_date'] = $rule->getFromDate();
    $data['to_date'] = $rule->getToDate();


texts: Cart quantity update but row total problem

texts:
I just create a simple module for cart quantity update (code give bellow).
My update link like that I call to ajax.
http://example.com/ajaxcart/ajaxcart/quantitichange/item/55/qty/4
It's quantity update fine but I need to subtotal after quantity update. But their is problem. getRowTotal function return which loaded checkout/cart/
example my current cart

itemId 55 Price:5  Qty:2   RowTotal:10

Then I hit
http://example.com/ajaxcart/ajaxcart/quantitichange/item/55/qty/4
It's should return

{"s":"Stock updated","subtotal":"20.0000"}

But not that It's return

{"s":"Stock updated","subtotal":"10.0000"}

If i refresh checkout/cart/ page and again hit ajax URL then It's return correct. That means Quantity update. But If I need subtotal then I need to refresh cart page manually.

My code

    public function quantitichangeAction(){
    $jsArray = array();
    $itemId = intval($this->getRequest()->getparam('item'));
    $qty = intval($this->getRequest()->getparam('qty'));
    $cart = Mage::getModel('checkout/cart')->getQuote()->getAllVisibleItems();
    $getItem=false;
    foreach($cart as $item){
        if($item->getItemId()==$itemId){
            $product = Mage::getModel('catalog/product')->load($item->getProductId());
            if ($product->getStockItem()->getIsInStock()) {
                $qtyStock = intval(Mage::getModel('cataloginventory/stock_item')->loadByProduct($product)->getQty());
                if($qtyStock>=$qty){
                    $item->setQty($qty);
                    $item->save();
                    $jsArray['s']='Stock updated';
                    $jsArray['subtotal']=$item->getRowTotal();
                }
                else{
                    $jsArray['e']='Product Stock not abailable';
                }
            }
            else{
                $jsArray['e']='Product Stock not abailable';
            }
        }
    }
    $this->getResponse()->setHeader('Content-type', 'application/json');
    $this->getResponse()->setBody(json_encode($jsArray));
}


texts: Could not establish FTP connection, invalid host or port in magento 2.2.5

texts:
i include the use \Magento\Framework\Filesystem\Io\Ftp; at the top nd connct the ftp as

 $connection = $this->ftp->open(
                    array(
                        'host' => '00.000.00.000',
                        'user' => 'admin',
                        'password' => 'test@123',
                        'passive' => true,
                        'Port'=>21

                    )
                );

this code is work fine in my local environment..
But when am trying with the same code in digitalocean (SFTP) THROWS AN ERROR like

  Could not establish FTP connection, invalid host or port.

please help me


texts: Fatal Error Call to a member function dispatch() while call my Block in magento 2

texts:
This is my Block File:

 <?php

 namespace ChennaiBox\Mymail\Block\Mail;

 class MailContent extends \Magento\Framework\View\Element\Template
 {
 protected $_objectManager;

 protected $customerSession;

 public function __construct(
    \Magento\Customer\Model\Session $customerSession,
    \Magento\Framework\ObjectManagerInterface $objectManager
 ) {
    $this->customerSession = $customerSession;
    $this->_objectManager = $objectManager;
  }

 public function mymailData()
 {
try{

     if ($this->customerSession->isLoggedIn()) {
     $cutomerEmail    =(string)$this->customerSession->getCustomer()->getEmail();

     echo $cutomerEmail;

      else{
            $this->_redirect('customer/account/login/');
          }
   }catch (Exception $e) {

        $e->getMessage();

    }
   }

 }

If I call this block I get error

  PHP Fatal error:  Call to a member function dispatch() on null in
  /var/www/html/magento2/vendor/magento/framework/View/Element/AbstractBlock.php
  on line 642, referer:
  http://magentodev.gworks.mobi/magento2/customer/account/index/

from apache error.log file., why, suggect me how to solve this problem.


texts: Magento 2 "Payment capturing error" on checkout page

texts:
I'm using magento 2.0.7 with php 5.6 , and I've installed Inchoo Stripe payment gateway, and also Stripe library. Got it working backend and frontend , but when I go on checkout page , I insert the CC info , an try to pay , I get this error :

Payment capturing error


texts: Show or hide Attribute that is used in layered navigation based on category

texts:
By default, if an attribute is set to Use in Layered Navigation > Filterable (with results), then this attribute will be shown on layered nav's of all categories /attribute-sets that use this attribute.

How do you control an attribute to Use in layered navigation, but only for certain categories or attributes sets where this attribute is used?

Any idea of an extension or mySql query that can manipulate this?


texts: How to save a customer custom_attribute value programmatically in Magento2?

texts:
I have setup the custom attribute according to this post. However I created a plugin of type <type name="Magento\Customer\Api\CustomerRepositoryInterface"> to save my example custom_attribute. My plugin looks like this:

public function aroundSave(CustomerRepository $customerRepository, \Closure $proceed, CustomerInterface $customer)
{
    $customer->setCustomAttribute('example', 'a hardcoded value');
    return $proceed($customer);
}

The problem I get is that it does actually save the custom_attribute, but the customer created cannot be logged in since the password is not saved in the db. It also takes more than usual to create such a customer so I suspect of an infinite loop going on.


texts: Save cart through backend gives @return type error

texts:
I am trying to change some data on a cart through the backend programmatically, i have a grid with a few actions, if i execute the Approve or Reject action it will go to a GET url.

Admin Controller

<?php

declare(strict_types=1);

namespace Blabla\CustomerBalance\Controller\Adminhtml\Cart;

// Uses

class Authorize extends Action implements HttpGetActionInterface
{
    // Code...

    /**
     * @return ResponseInterface
     */
    public function execute(): ResponseInterface
    {
        $companyId      = (int) $this->_request->getParam('company');
        $cartId         = (int) $this->_request->getParam('cart');
        $action         = $this->_request->getParam('status');
        $status         = (int) $this->getAuthorizationStatus($action);
        $authorizerName = $this->adminSession->getName() . ' (Customer Service)';

        try {
            $cart = $this->cartManagement->authorize($cartId, $status, $authorizerName);

            // Code...
        } catch (\Exception $e) {
            // Add message for the customer.
            $this->messageManager->addErrorMessage(
                __('Something went wrong while approving/rejecting the cart. Error: %1', $e->getMessage())
            );

            // Log error message.
            $this->logger->error($e->getMessage());
        }

        return $this->_redirect('company/index/edit', ['id' => $companyId]);
    }
}

Model

<?php

namespace Blabla\CustomerBalance\Model;

// Uses

/**
 * Class CartManagement
 *
 * @package Blabla\CustomerBalance\Model
 */
class CartManagement implements CartManagementInterface
{
    // ...

    /**
     * {@inheritDoc}
     */
    public function authorize(int $cartId, int $status, string $authorizerName, string $reason = '')
    {
        // Get the cart.
        $cart = $this->cartRepository->get($cartId);

        // Some code...

        // Save the cart.
        $this->cartRepository->save($cart);

        return $cart;
    }
}

The cart cant be saved because i get the following error:

  Method's return type must be specified using @return annotation. See Magento\Customer\Model\Data\Customer\Interceptor::setData()

Interceptor

<?php
namespace Magento\Customer\Model\Data\Customer;

/**
 * Interceptor class for @see \Magento\Customer\Model\Data\Customer
 */
class Interceptor extends \Magento\Customer\Model\Data\Customer implements \Magento\Framework\Interception\InterceptorInterface
{
    // Code ...

    /**
     * {@inheritdoc}
     */
    public function setData($key, $value)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'setData');
        if (!$pluginInfo) {
            return parent::setData($key, $value);
        } else {
            return $this->___callPlugins('setData', func_get_args(), $pluginInfo);
        }
    }

    // Code ...
}

If i change the DocBlocks of the SetData method to:

/**
 * @param string $key
 * @param mixed  $value
 *
 * @return \Magento\Customer\Model\Data\Customer|mixed|null
 */

The code will be executed without problems... i just can't figure out how to fix this, anyone can lead me in to the right direction?


texts: How do I add a custom product attribute next to the price on the front-end?

texts:
I have ~24.000 products, each of them have a custom product attribute called item_size.

How do I make sure the item_size attribute show's up on every page where products are shown? When you search for products or view all products in a certain category for example.

Here's an example:

The product on the left is what I would like it to look like. The product on the right is what it currently looks like. I'm using the default Magento 1.9 theme.

Any ideas?


texts: Which built-in payment methods in Magento (or extensions) offer an iframe option?

texts:
We want to create a new payment method in Magento which uses an iframe to display our payment gateway's credit card form (we are not PCI-compliant). We've found this so far to be very challenging. We have only been able to implement the "redirect" method, wherein the checkout page redirects to a brand new page hosted in our payment gateway's server that displays the credit card form. We would like to have this appear in an iframe in the checkout page instead.

Which built-in payment methods in Magento (or extensions in magentocommerce) offer an iframe option? We guess if we study the code of those payment methods, we could implement our own.

We've tried Ebizmarts Sage Pay (their magentocommerce page indicates they support iframe), but the code is too complex for us for now. We were hoping there are simpler ones out there.

By the way, we're using EE 1.13.


texts: Magento SUPEE 9697 1.9.2.2 fails at Image.php

texts:
I'm attempting to apply patch 9697 (via patch PATCH_SUPEE-9767_CE_1.9.3.0_v1-2017-05-25-09-09-56) to Magento CE 1.9.2.2 however it's failing.  The log states:

Hunk #5 succeeded at 485 (offset 1 line).
patching file app/code/core/Mage/Checkout/etc/system.xml
patching file app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php
Hunk #1 succeeded at 282 (offset -1 lines).
patching file app/code/core/Mage/Core/Controller/Front/Action.php
patching file app/code/core/Mage/Core/Controller/Request/Http.php
can't find file to patch at input line 351
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|index 14c4d98..176c17b 100644
|--- app/code/core/Mage/Core/Model/File/Validator/Image.php
|+++ app/code/core/Mage/Core/Model/File/Validator/Image.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignored

However when I have a look in app/code/core/Mage/Core/Model/File/Validator there is no Image.php file.  I've also downloaded a fresh 1.9.2.2 and there is no Image.php file there either.  Has anyone else had this problem?


texts:
Im getting errors after I done a fresh install to magento 2.1.6 and relinked to old DB.
Now when I select certain items in the menu it will throw this error.
I went to DB and changed the theme ID over but then it goes from Key 6 to Key 4.

What can i do to fix this problem

Any help is greatly appreciated.

a:4:{i:0;s:42:"Unable to load theme by specified key: '6'";i:1;s:9519:"

#0 /home/www/public_html/vendor/magento/module-theme/Model/View/Design.php(148):
Magento\Framework\View\Design\Theme\FlyweightFactory->create('6', 'frontend')


texts: Magento 2. Improve performance of UI Grid

texts:
I have a UI Grid that uses a collection with multiple joins (~7-8)

I know joins are a huge performance drawback. But I would think that pagination fixes the performance issue.
From around ~20k rows in my main table the grid loads really slow.

Questions

Does Magento loads all the items despite pagination?
Is there any way to improve the performance of my grid? (a flat table or an index is not a viable solution in this particular case)

Any pointers are highly appreciated
Thank you.


texts:
I'm working on a module in the admin part but can someone tell me please how I can load just my template from my controller without the admin menu in the left, the title and the footer.

here is one of my secondary controller :

<?php
  namespace Mymodule\AdminPage\Controller\Adminhtml\Secondcontroller;

  class Index extends \Magento\Backend\App\Action
  {
    /**
    * @var \Magento\Framework\View\Result\PageFactory
    */
    protected $resultPageFactory;

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

    public function execute()
    {
        return  $resultPage = $this->resultPageFactory->create();
    }
  }
?>

and there is his the layout :

<?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">
    <head>
        <title>
            Module Mymodule
        </title>
    </head>
    <body>
        <referenceContainer name="content">
            <block class="Magento\Backend\Block\Template" template="Mymodule_AdminPage::secondary.phtml"/>
        </referenceContainer>
    </body>
</page>


texts: Magento API order not returning order 'custom options'

texts:
I'm using the https://myhost/api/rest/orders JSON endpoint to get orders information.

The problem I'm having is the 'custom options' the user chooses when adding a product to the cart isn't showing up in this returned data.

Custom options is a feature that ships by default with Magento 1.7 but can't get the data out.

Looking in the admin console and going to the product page > 'custom options' (as below)

Then going to the actual order page, there's no refernce to the SKU, nor the added price amount.

Makes me wonder why there is an SKU field in the first place. Any help appreciated.


texts: Should you modify the VCL file when activating deflate Gzip on the server?

texts: When I activate Gzip I find that my site is slow, as if Varnish was not doing its job.


texts: Custom Controller path issue magento 1.9

texts:
Whats wrong in my URl below.

<form action="<?php echo $this->getUrl('test/manageRecipe/index') ?>" method="post" id="form-validate" autocomplete="off">

    <button type="submit" class="button" title="<?php echo $this->__('Add New Recipe') ?>">
        <?php echo $this->__('Add New Recipe') ?>
    </button>
</form>

I have a button, on a click of it, it should redirect to my Controller - ManageRecipeController.php

class Vendor_Test_ManageRecipeController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        echo 'Manage';
    }
}

config.xml

<frontend>
    <routers>
        <vendor_recipe>
            <use>standard</use>
            <args>
                <module>vendor_Recipe</module>
                <frontName>vendor_recipe</frontName>
            </args>
        </vendor_recipe>
    </routers>

</frontend>


texts:
Im try to make a Magento Admin area module but have got stuck with a link issue.

So far I have my required option in the menu bar but my problem comes when I click the link, I get a 404 error, I expected a grid. I am following a tutorial from excellencemagentoblog.

I understand that the action node  within the children node of the tree is the link and I have followed my file path to create what I expected would be the correct link, but that failes and I cannot work out why?

My code is

excellence/employee/adminHtml.xml

<config>
<menu><!--action node, URL of admin controller-->
    <employee module="employee">
        <title>Employee</title>
        <sort_order>90</sort_order>
        <children>
            <items module="employee"><!--adds menu item-->
                <title>Manage Employees</title>
                <sort_order>0</sort_order>
                <action>employee/adminhtml_employee</action><!--Link-->
            </items>
        </children>
    </employee>
</menu>
<acl>
    <resources>
        <all>
            <title>Allow Everthing</title>
        </all>
        <admin>
            <children>
                <excellence_employee>
                    <title>Employee Module</title>
                    <sort_order>10</sort_order>
                </excellence_employee>
            </children>
        </admin>
    </resources>
</acl>
<layout>
    <updates>
        <employee>
            <file>employee.xml</file>
        </employee>
    </updates>
</layout>
</config>

Excellence/Employee/controllers/AdminHtml/EmployeeController.php

class Excellence_Employee_Adminhtml_EmployeeController
    extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }
}

I have tried logging out and back in again, but I still get the 404. What have i do wrong?

When I click the link the address is

http://magentodevtest.local/index.php/employee/adminhtml_employee/index/key/45435404fsd453453

I have added an image of my file structure, looking at the address bar, my understanding of how files are accessed says it should work (i obviously misunderstand something)

===EDIT===

I have cache disabled

My config.xml is as follows

<config>
<modules>
    <Excellence_Employee>
        <version>0.1.0</version>
    </Excellence_Employee>
</modules>
<global>
    <blocks>
        <employee>
            <class>Excellence_Employee_Block</class>
        </employee>
    </blocks>
    <models>
        <employee>
            <class>Excellence_Employee_Model</class>
        </employee>
    </models>
    <helpers>
        <employee>
            <class>Excellence_Employee_Helper</class>
        </employee>
    </helpers>
</global>
</config>


texts: Sharing Users and Cart in website with different storeviews

texts:
I have one Magento website, with 6 different stores and 1 storeview per store.

They all have different domainnames, except one, which is a subdomain of one of the stores, like this:

domain1.nl
subdomain.domain1.nl
domain2.nl
domain3.nl
domain4.nl
domain5.nl

At this moment the logged in users can only switch between domain1.nl and subdomain.domain1.nl, without automatically logging out. Also the cart is shared between these two stores. The users or cart are not shared with the other stores (domains).

I have already tried the following:

In System -> Configuration -> Customer Configuration -> Share Customer Accounts, I have set it to GLOBAL
I have tried 3 possible store configurations, which were quoted at different topics regarding the same problem:

If your websites are located in one domain, but in different directories, e.g. "www.example.com/stores/store1" and "www.example.com/stores/store2" you can setup your "Cookie Path" to "/stores/" in System -> Configuration -> Web -> Session Cookie Management.
If your websites are located in different sub-domains e.g. "store1.example.com" and "store2.example.com" you can setup "Cookie Domain" to ".example.com" in System -> Configuration -> Web -> Session Cookie Management.
If you have different domains, in this case you can add session ID to the URL for another store. Use this construction "Mage::getModel('core/url')->addSessionParam()->getUrl('...')" to get the URL with session parameter. This is probably the one I need, but I do not know where and how to implement this. I have added it to my header.phtml file which has a storeswitcher

At the moment my System -> Configuration -> Web -> Session Cookie Management:
cookiepath: /
cookie domain: empty
Use SID in frontend is set to: YES
I have tried Marius's 'Share Carts Between Websites' module:
http://marius-strajeru.blogspot.nl/2013/01/share-cart-between-websites.html

Any help is appreciated

I am using Magento 1.9.2.2


texts: In list.phtml get parentcategory Id or name

texts:
I was wondering how to get the name or Id of a parent category in the list.phtml

I tried

$parentname = $product->getCurrentCategory()->getParentCategory()->getName();

I have this

$_product->getCategoryIds();

Which gets me the category Id of the product but I need to check if the parent category equals a specific category

Any help would be appreciated


texts: Magento 2 - Add to cart not working after products loaded by ajax

texts:
I have loaded products collection using ajax. My controller URL is something like this:

www.example.com/whoboughtthisproduct/index/getproducts

Now products are loading properly, but when user click on add to cart button instead of add product to cart it is redirecting user to  www.example.com/whoboughtthisproduct/index/getproducts

My controller code is this:

protected $resultPageFactory;

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

public function execute()
{
    $viewBlock = $this->resultPageFactory->create();
    $block = $viewBlock->getLayout()
        ->createBlock('Vendor\WhoBoughtThisProduct\Block\ProductList')
        ->setTemplate('Magento_Catalog::product/list.phtml')
        ->toHtml();

    //Setting response
    $this->getResponse()->setBody($block);
}

And the code where I am calling ajax is this:

require([
    'jquery'
], function($){
    jQuery.ajax({
        url: "/whoboughtthisproduct/index/getproducts",
        type: "POST",
        data: "prod=<?php echo $productId; ?>",
        success: function (res) {
            if(res.indexOf("find products matching the selection") > -1){
                //if no products found then do nothing
                return;
            }

            var result = jQuery('.product-items', res).html();
            jQuery(".bought-slider").html(result);
        }
    });
});


texts: Magento Website Specific Featured Product

texts:
I have added a product in both of my stores, but it has been set as featured in only specific store. And now when I try to get the featured products of another store, the featured products of other store also get listed because they belong to that store. Below is my code, any help ?

$_productCollection = Mage::getModel('catalog/category')
                ->load(4)
                ->getProductCollection()
                ->addWebsiteFilter(WEB_ID)
                ->addAttributeToSelect('*')
                ->addAttributeToFilter('status', 1)
                ->addAttributeToFilter('featured', 1)

                ->clear()
                ->setPageSize(3)
                ->load();


texts: How to get parent product data from parent id for configurable products

texts:
I want to get parent product data for configurable products.

I have parent id

How do I get it?


texts: Error when running di compile after upgrade from 2.2.9 to 2.3.2 (TEMANDO)

texts:
I've tried disabling the temando module but i'm still getting the error.

Repositories code generation... 1/7 [====>-----------------------]  14% < 1 sec 74.0 MiB
Fatal error: Declaration of Temando\Shipping\Webservice\Processor\OrderOperation\PickupLocationRatesProcessor::postProcess(Magento\Quote\Model\Quote\Address\RateRequest $rateRequest, Temando\Shipping\Model\OrderInterface $requestType, Temando\Shipping\Webservice\Response\Type\QualificationResponseType $responseType) must be compatible with Temando\Shipping\Webservice\Processor\OrderOperation\RatesProcessorInterface::postProcess(Magento\Quote\Model\Quote\Address\RateRequest $rateRequest, Temando\Shipping\Model\OrderInterface $requestType, Temando\Shipping\Webservice\Response\Type\OrderResponseTypeInterface $responseType) in /srv/public_html/vendor/temando/module-shipping-m2/Webservice/Processor/OrderOperation/PickupLocationRatesProcessor.php on line 27

As you can see it starts to run but then bombs out 14% into the compile.

Any help would be greatly appreciated. Thank you.


texts:
I have created a custom theme and want to apply that theme
but when I go to Store => Settings => Configuration => General there isn't design tab in a General tab

Is there another way to create a store custom theme?

Please help me


texts: Change magento url structure for better Google index

texts:
I have website with url structure like below

http://example.com/appliances.html/?cat=12
http://example.com/appliances.html/?cat=12&mfg=123

Where cat id and manufacturer id are inner categories and manufacturer of root appliances category.

As when Google index it only index upto url
http://example.com/appliances.html
And neglect other parameters after that like inner categories and manufacturer name.
So we have decided to create url structure like

http://example.com/appliances-dishwasher-whirlpool.html
Or
http://example.com/whirlpool/appliances/dishwasher. html
Like user friendly url which not neglect by Google index and alos focus on inner categories of website.

Also we want to change its canonical urls..

Please suggest some proper way to implement this and is there any good extension available.


texts: magento how to make shipping method shown up but not selectable

texts:
i am creating my own shipping method extension.
how to make a shipping method shown up but not selectable (disabled)?
Thanks.


texts: Remove class on div from empty.xml layout

texts: I am running Magento 2.2. I have custom HTML I want to add to a CMS page. After navigating to the page where this HTML resides, the content is automatically displayed inside a div with class page-wrapper. Then inside that div there is a main tag with an ID of maincontent and classes of page-main and padding-bottom-0. All I want to do is show the custom HTML in the content area of the cms page inside the body of what is loaded. I do not want to have the other elements. I don't know where they are coming from and their CSS is manipulating my custom HTML, which is what I am trying to avoid. The design of the cms page is set to the empty default magento design, which I thought would be empty, but apparently it is not. Any help here would be greatly appreciated.


texts:
How many ways to get an image in Magento!

Anyway, I'm trying to get an image. I'm in a foreach loop like this:

<?php foreach ($this->getItems() as $key=>$item): ?>

Product details are getting displayed like this:

<?php echo $this->escapeHtml($item->getProductSku()) ?>

But I can't seem to get the image to show and I've many ways.

How can I get the image to show?


texts: My Magento site on Macbook is not picking up .css and .js because paths are wrong, where can I set these paths?

texts:
I have pulled whole Magento web site from a git repository onto my Macbook. It looks like the css and js files don't have the right path, and site doesn't look good (site is now without any styles). Paths for my css look like this:

http://127.0.0.1/Applications/XAMPP/xamppfiles/htdocs/libraccio/js/solrsearch/autocomplete.css

Where can I set these paths so they are picked up correctly?


texts: Can't retrieve custom option from order items

texts:
I am writing an extension where I need to place an order with the items already in the user's cart (added programmatically). I have been successful with this, however my orders lose custom options added via $_product->addCustomOption().

$addOptns['my_custom_option'] = 3;
foreach ($addOptns as $key => $value) {
    $_product->addCustomOption( $key, $value);
}
$params = array(
    'product' => 123, //product Id
    'qty'   => 100    //quantity of product
);
$this->_cart->addProduct(
    $_product,
    $params
);
$this->_cart->save();
$quote = $this->_cart->getQuote();

...[shipping and payment config]...

$order_id = $this->cartManagementInterface->placeOrder($quote->getId());

When I try to receive my_custom_option from the order that is placed, I get null.

var_dump($item->getCustomOptions()); // NULL

Any guess what is wrong with my approach?

Note: This is not a 'custom option' like those created in the admin UI nor do I expect it to be, I use these custom options for other customized processes and they are not directly user selectable.


texts: Magento2 - can I remove meta keywords from admin for categories and products?

texts:
I would like to remove meta keywords as a database field for categories and products.

This will just make it simpler for the client and make it less likely that the meta title gets wrongly placed in the wrong box.


texts: It is possible to sort Email order confirmation by sku in both customer email notification and Admin email notification

texts:
I am on the m2 site. In order confirmation email I am getting SKU. But I need that SKU sort by ASC. Could someone assist me with this? Thanks in advance.
I have overridden the below file in my theme to get SKU in order confirmation email.
vendor/magento/module-sales/view/frontend/templates/email/items.phtml


texts: Getting 302 status code when I want to add selected product to order in Magento 1

texts:
I'm getting the 302 status code in the firebug:

Request URL:http://myproject.local/index.php/adminpanel/sales_order_create/loadBlock/block/search,items,shipping_method,totals,giftmessage,billing_method?isAjax=true
Request Method:POST
Status Code:302 Found
Remote Address:127.0.0.1:80
Referrer Policy:no-referrer-when-downgrade

I add an item to the order -> select payment method-> select shipping method-> add a new item to the order and when I press the add selected product to order I'm getting 302.

This is the function, which I'm thinking responsible for this:

 public function loadBlockAction()
    {
        $request = $this->getRequest();
        try {
            $this->_initSession()
                ->_processData();
        }
        catch (Mage_Core_Exception $e){
            $this->_reloadQuote();
            $this->_getSession()->addError($e->getMessage());
        }
        catch (Exception $e){
            $this->_reloadQuote();
            $this->_getSession()->addException($e, $e->getMessage());
        }

        $asJson= $request->getParam('json');
        $block = $request->getParam('block');

        $update = $this->getLayout()->getUpdate();
        if ($asJson) {
            $update->addHandle('adminhtml_sales_order_create_load_block_json');
        } else {
            $update->addHandle('adminhtml_sales_order_create_load_block_plain');
        }

        if ($block) {
            $blocks = explode(',', $block);
            if ($asJson && !in_array('message', $blocks)) {
                $blocks[] = 'message';
            }

            foreach ($blocks as $block) {
                $update->addHandle('adminhtml_sales_order_create_load_block_' . $block);
            }
        }
        $this->loadLayoutUpdates()->generateLayoutXml()->generateLayoutBlocks();
        $result = $this->getLayout()->getBlock('content')->toHtml();
        if ($request->getParam('as_js_varname')) {
            Mage::getSingleton('adminhtml/session')->setUpdateResult($result);
            $this->_redirect('*/*/showUpdateResult');
        } else {
            $this->getResponse()->setBody($result);
        }
    }

The ajax loader is getting frozen and If I don't close my browser, it will crash :)  Probably a memory issue, but I can't figure it out. Any help to debug this ?

Thank you


texts: Magento 2.2.4 - Source class "\amazonClient" for "amazonClientLogger" generation does not exist

texts:
I am upgrading Magento 2.2.3 to 2.2.4 and got this error when running the command setup:di:compile after successfully running setup:upgrade.

[RuntimeException]
Source class "\amazonClient" for "amazonClientLogger" generation does not exist.


texts: Speed up Grunt by proper configuration in Magento2

texts:
The short: Whenever I work on my front-end CSS with grunt watch it takes about 13~16 seconds to complete the less task to compile the .less files to css. This is for every save and needless to say it's killing my productivity.

The setup: Magento 2.1.2 is running in developer mode, server-side less compilation on a adequate VPS which shouldn't be the problem.
My theme is a child-theme of the default Blank theme, and this is my grunt-config

EN2017: {
    area: 'frontend',
    name: 'Engels/EN2017',
    locale: 'nl_NL',
    files: [
        'css/styles-m',
        'css/styles-l'
    ],
    dsl: 'less'
},

I have a web/css/source/extend.less with 15 @import of smaller .less files in the web/css/ folder of my theme.

The debug: Here's a log with grunt-timer when I open 1 .less file, edit 1 character and save it, while running grunt-watch

Task 'loading grunt-contrib-watch' took 123ms
Running "watch" task
Waiting...
>> File "pub/static/frontend/Engels/EN2017/nl_NL/css/en_base.less" changed.
Task 'loading grunt-contrib-less' took 122ms
Running "less:EN2017" (less) task
File pub/static/frontend/Engels/EN2017/nl_NL/css/styles-m.css created: 321.99 kB → 552.41 kB
File pub/static/frontend/Engels/EN2017/nl_NL/css/styles-l.css created: 88.14 kB → 150.83 kB

Done.

Execution Time (2016-12-09 11:04:30 UTC+1)
loading tasks  342ms  ▇▇ 3%
less:EN2017      12s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 96%
Total 12.5s

Task 'less:EN2017' took 12045ms
All tasks took 12167ms
Completed in 13.339s at Fri Dec 09 2016 11:04:42 GMT+0100 (CET) -  Waiting...

As you can see this single edit takes more then 13s. Most of these (with a little more actual editing) take between 15s and 17s. This shouldn't be normal, I think.
I've talked it through with our sysadmin, but he couldn't find anything server related. He did find that the styles-m.css file took the longest and he pinned it on the large amount of files that it includes. But this is default Magento stuff, and shouldn't be the problem, right?

So what is? Is there something off about my configuration or is it a server-thing still?


texts: Tell me please how to create my own Magento 2 widget with custom JS. I need something like a "scroll to top" button, but with another function. I'm allready have a worked script, but how i can create a widget with them?


texts: Magento 2: After custom cookie is created all pages default to home page

texts:
I'm trying to add a custom cookie that will save the current cart item total so an external CMS can access and display it.  However, when the cookie is created successfully, any subsequent page loads just default to the store home page.

namespace MyVendor\Cartsession\Observer;

use \Magento\Framework\Event\Observer;
use \Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Stdlib\CookieManagerInterface;
use Magento\Framework\Stdlib\Cookie\CookieMetadataFactory;
use Magento\Framework\Session\SessionManagerInterface;
use \Magento\Checkout\Model\Session as CheckoutSession;

class UpdateCartCount implements ObserverInterface
{
    /** @var CheckoutSession */
    protected $checkoutSession;

/**
 * @param CheckoutSession $checkoutSession
 */
public function __construct(
    CookieManagerInterface $cookieManager,
    CookieMetadataFactory $cookieMetadataFactory,
    SessionManagerInterface $sessionManager,
    CheckoutSession $checkoutSession
    ) {
    $this->checkoutSession = $checkoutSession;
    $this->cookieManager = $cookieManager;
    $this->cookieMetadataFactory = $cookieMetadataFactory;
    $this->sessionManager = $sessionManager;
}

public function execute(Observer $observer) {

    /** @var \Magento\Quote\Model\Quote  */
    $quote = $this->checkoutSession->getQuote();

    $cartData = $quote->getAllVisibleItems();
    $totalQuantity = count($cartData);

    $totals = $quote->getTotals();
    $duration = 3000;

    $metadata = $this->cookieMetadataFactory
        ->createPublicCookieMetadata()
        ->setDuration($duration)
        ->setPath($this->sessionManager->getCookiePath())
        ->setDomain($this->sessionManager->getCookieDomain());

    $this->cookieManager->setPublicCookie(
        'M2Cart',
        $totalQuantity,
        $metadata
    );

}

}


texts:
I have magento 2 running on live project and our clients are seeing some weird issue on Firefox browser and Chrome as well. I was able to reproduce it only once and after refreshing the page everything is working as expected. I will be happy if someone have/had similar issue and have some information how to debug/fix it.

Preconditions

Magento CE 2.1.0
Production mode & Varnish
Firefox latest version & Chrome latest versions

Steps to reproduce

Add product to basket
Navigate to checkout page
Enter billing address and select shipping method
Click Next button to open payment section

Expected result:

Display loader icon, load payment section and cart summary, hide loader icon

Actual results:

Display loader icon, load payment section and cart summary, loader icon doesn't hide and stay.

No JS errors on console or network tab in FF (ajax request to getting payment section). After refresh with #payment in URL everything is working fine. Even if open /checkout without #payment (start from 1st step) it's opening 2nd step smoothly.

I raised issue in github: https://github.com/magento/magento2/issues/7186


texts:
I've some problem with magento 1.9.3.10,
I activated all the errors view but I'm not able to understand why it doesn't place order, it is stucked at step 6 of checkout and at step 2 if I activate some errors views.
That's the site.


texts: Export files to google drive using Magento 2 Programmatically

texts:
I want to export/transfer files to Google drive using Magento 2.
Please help me out.


texts: Magento 2: transparent plane/square through image

texts:
Whenever I upload an image via Magento it places a transparent plane within the image or it covers the entire image.
My guess is that this happens with resizing or caching the image, but I have no clue how to find this.
In the pictures below it becomes quite clear what happens:

Any ideas on where the problem might be?


texts: How to add a custom parameter in javascript template?

texts:
I'm working on the javascript templating system. I successfully created an x-magento-template (see here)

But I still don't understand how magento work with it internaly.

My template looks like that :

<script id="custom-option-select-type-row-template" type="text/x-magento-tmpl">
    <% console.log(data) %>
</script>

And produce this result :

  Object { id: "1", option_type_id: -1, select_id: 1, sku: "", price: "" }

The script as the id of an existing template in Magento\Catalog module.

I didn't find in magento code any :

  mageTemplate("#custom-option-select-type-row-template");

So, how magento can fill the "data" object and find the template to call ?

I want to be able to add my own parameter in this object.


texts:
In magento backend admin panel system->configuration->Main Website->Sales->Shipping Methods->Table Rates we have "export csv" which is downloading a file. like the same I have placed a export button my group. now how can we add action to this export button and download a file. I have placed export button in system.xml with

<export translate="label">
<label>export</label>
  <sort_order>1</sort_order>
  <show_in_default>1</show_in_default>
  <show_in_website>1</show_in_website>
  <show_in_store>1</show_in_store>
  <frontend_type>export</frontend_type>
</export>


texts: How to enable extension programmatically?

texts:
I followed the guide on how to disable it but the reverse does not work:

Mage::getConfig()->setNode($nodePath, 'true', true);

I guess extensions are already loaded at that point?


texts:
I am facing issue in my elastic search and Magento. Please find the error message below.

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Could not convert [sku.index] to boolean"}],"type":"illegal_argument_exception","reason":"Could not convert [sku.index] to boolean","caused_by":{"type":"illegal_argument_exception","reason":"Failed to parse value [not_analyzed] as only [true] or [false] are allowed."}},"status":400}

From the error I can understand that elastic search is accepting a boolean value for SKU, but Magento is passing some other datatype. Please help me resolve this issue. your help is much appreciated


texts: Magmi doesn't seem to update the price index?

texts:
We've used Magmi for some time, and have been experiencing an issue where the price of our uploads changes at product level, i.e. if you navigate to the frontend product page, or admin backend page of the product you have just updated, the price displays correctly. So we're referring to the list price (attribute name price) and the sale price (attribute name special_price). All fine so far.

BUT when you add the item to cart and navigate to the shopping basket, the price displayed in the cart, is still the old price before the Magmi profile ran and changed the price.

To fix this short term, we found that manually updating any attribute of that product from the Magento backend for that product, or on mass from the product grid, fixes the issue, and the correct price is displayed in the cart as well as on the product page.

But this isn't a great solution! We've tried changing the various configuration check box settings in Magmi but nothing seems to work.... e.g. Magmi Optimiser or Magmi Magento Reindexer or On the Fly Indexer....

Any ideas on how to fix or even how to debug? Thanks.


texts: How can I set a page as default page of System Configuration Index page

texts: How can I set a page as default page of System Configuration Page. So it should open when I click on System>Configuration menu  ?


texts: Integrity constraint violation when tring to make a payment: 1062 Duplicate entry xxx for key 'SALES_ORDER_INCREMENT_ID_STORE_ID'

texts:
After the migration of new orders from Magento 1 to Magento 2 I find the following error when trying to make a payment.

Next Zend_Db_Statement_Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1200022450-1' for key 'SALES_ORDER_INCREMENT_ID_STORE_ID', query was: INSERT INTO sales_order (state, status, protect_code, shipping_description, is_virtual, store_id, customer_id, base_discount_amount, base_grand_total, base_shipping_amount, base_shipping_tax_amount, base_subtotal, base_tax_amount, base_to_global_rate, base_to_order_rate, discount_amount, grand_total, shipping_amount, shipping_tax_amount, store_to_base_rate, store_to_order_rate, subtotal, tax_amount, total_qty_ordered, customer_is_guest, customer_note_notify, customer_group_id, quote_id, base_shipping_discount_amount, base_subtotal_incl_tax, base_total_due, shipping_discount_amount, subtotal_incl_tax, total_due, weight, increment_id, applied_rule_ids, base_currency_code, customer_email, customer_firstname, customer_lastname, customer_middlename, discount_description, global_currency_code, order_currency_code, remote_ip, shipping_method, store_currency_code, store_name, total_item_count, discount_tax_compensation_amount, base_discount_tax_compensation_amount, shipping_discount_tax_compensation_amount, base_shipping_discount_tax_compensation_amnt, shipping_incl_tax, base_shipping_incl_tax, gift_message_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) in /


texts: How to add brand filter option in admin product grid?

texts:
Magento 2.x

I need to add brand filter option in the product grid by admin panel.

I have a brand attribute. It is working front end side. But, I need to product search brand wise by admin side.


texts:
I managed to show a specifig attribute ("auszeichnungen"=in englisch "rewards") under the cart button on product view.
For this I created a Custom phtml Block:
<?php
$_product = $block->getProduct();
$label = $_product->getResource()->getAttribute('auszeichnungen')->getStoreLabel();
$value = $_product->getResource()->getAttribute('auszeichnungen')->getFrontend()->getValue($_product);
echo '

'.$label.':

'.$value."

";?>

and added in the catolog_product_view.xml

    <referenceContainer name="content">
        <block class="Magento\Catalog\Block\Product\View" name="product.info.mycustomblock" template="Magento_Catalog::product/view/mycustomblock.phtml"/>
    </referenceContainer>
    <move element="product.info.mycustomblock" destination="product.info.social" after="product.info.stock.sku" />

This works fine. Now I am looking for a PHP Script that changes my MultipleSelect-Attribute (Text) into Images, depending on the selected Attributes. Is this possible?
(I am open for other ways to place Images of Rewards depending on an Attribute)


texts: I wish to add custom section in product detail page in magento 2

texts: How to add custom button in product page,while clicking that button it needs to show custom form in a popup ?


texts: Magento2: Error when change developer mode to production (Magento 2.1.7)

texts:
D:\xampp\htdocs\site> php bin/magento deploy:mode:set production
Enabled maintenance mode
Starting compilation
Compilation was started.
%message% 0/7 [>---------------------------]   0% 1 sec 44.0 MiB%message% 0/7 [>---------------------------]   0% 1 sec 44.0 MiBProxies code generation... 0/7 [>---------------------------]   0% 1 sec 44.0 MiB
Proxies code generation... 1/7 [====>-----------------------]  14% 1 sec 48.0 MiB
Repositories code generation... 1/7 [====>-----------------------]  14% 1 sec 48.0 MiB
Repositories code generation... 2/7 [========>-------------------]  28% 34 secs 142.0 MiB
Service data attributes generation... 2/7 [========>-------------------]  28% 34 secs 142.0 MiB
Service data attributes generation... 3/7 [============>---------------]  42% 34 secs 144.0 MiB
Application code generator... 3/7 [============>---------------]  42% 34 secs 144.0 MiB
Application code generator... 4/7 [================>-----------]  57% 2 mins 160.0 MiB
Interceptors generation... 4/7 [================>-----------]  57% 2 mins 160.0 MiB
Interceptors generation... 5/7 [====================>-------]  71% 3 mins 174.0 MiB
Area configuration aggregation... 5/7 [====================>-------]  71% 3 mins 174.0 MiB
Area configuration aggregation... 6/7 [========================>---]  85% 4 mins 236.0 MiB
Interception cache generation... 6/7 [========================>---]  85% 4 mins 236.0 MiB
Interception cache generation... 7/7 [============================] 100% 5 mins 236.0 MiB

Generated code and dependency injection configuration successfully.

Compilation complete

Starting deployment of static content

Something went wrong while deploying static content. See the error log for details.

  Command returned non-zero exit code: D:\xampp\php\php.exe -f D:\xampp\htdocs\site\bin\magento setup:static-content:deploy en_US
  ru_RU ar_SA


texts: Magento 1.9 Product View Count on product detail page

texts:
I am displaying product view count on detail page using ajax call on page load but it is taking a lot of time. I am sharing my code below.

$jsonArray = array();
    //Views count
    $count = 0;
    $fromDate = '2016-03-16';
    $toDate   = now();
    $viewedProducts = Mage::getResourceModel('reports/product_collection')->addViewsCount($fromDate,$toDate);
    $count = 0;
    foreach($viewedProducts as $product) {
        if($product->getData('entity_id')==$productId)
        {
            $count = $product->getData('views');
        }
    }
    echo $count;

Is there any optimized ways of getting current product view count?

Please Help!


texts: Magento 2 get media url in KO's template file

texts:
I want to get media url like abc.com/store/pub/media/ (site url like abc.com/store .) in My ko template(.html) file.

we can use require.toUrl(''); for static view file. same way i want to get media view file


texts: how to place "Orders and Returns" on navigation menu instead of a footer link

texts:
i would like to know if theres anyway i can place the "order and return" link and place it in the menu on the navigation bar. Here is my site. Thank you  If you notice the order and return link is at the bottom (footer)

http://23inventory.com/default/sales/guest/form/


texts: How to create online payment system by making own payment method?

texts:
I have been trying to implementing a payment system in my store by creating own payment method.

I am trying to implement this through the use of API of payment gateway provided by a local bank. I got a very helpful and educational module named SamplePaymentGateway here.

I installed it on my project. It created the admin configuration section. There is my own payment method option available at frontend checkout page as shown below.

My question is how can I enter the card information for payment process?
Where will I do this?

jonijones suggested me to study the official documentation. I understood almost everything pointed out there. But I could not find any document that gave clear concept of how we could show a form to enter credi card credentials.

I have followed the documentation thoroughly and made a working module but the feature is same as magento's out-of-box offline payment system.
It would be much help if you could guide me to show a form to submit credit card credentials in checkout page.

Till now the payment system seems like offline system.


texts: how to fix database inconsistency for magento 1.7.0.2

texts:
I've run into the reason why I am unable to import a backup of a magento store into my development environment and its quite an obvious one:

There are multiple instances of foreign key constraints being violated by the tables i'm importing.

I've spent some time cataloging which tables are affected, then re-exported the db without that table and imported again to dev. But after 4 different tables having the problem (and not always the same ones each time), I've decided it's probably time to fix the issue, not find workarounds.

So the question is, how do i fix the database up?

I've found the official repair tool on the Magento site, but it stresses that it should be run on a clone of the database less it causes issues. Or that you backup the database before running it. there's the problem. I can't reliably import that backup, so I can't create a clone, or take a backup and restore it in the event of an incident.

I'm stuck with which way to progress and after 2 weeks of evenings on this, I'm too close to it to see an obvious way to go. Can anyone offer me a direction?


texts: Using custom attribute price instead of main price?

texts:
Could you give me a hand in using the custom attribute price rather than the getFinalPrice.

So I have a custom attribute set up called clearance_price which uses "Price"

However, the product has a price set up on the normal "Prices" part of the product and has a custom price set in a custom attribute called "Clearance Information" - this then has clearance_price in.

We're basically using the same product in different sections of the website, once on it's usual category page and once in the clearance page, however clearance are refurbs and sold at a discounted price.

I have the custom attribute price displaying correctly on the page but when I add it to the cart it naturally, brings in the price from the prices tab.

How do I change this to add it to the cart using the custom price?

        <?php

            echo "
&pound;";
            echo number_format($_product->getClearance_price(), 2, '.', '');
            echo " ex vat
";

            $percentage = 20;

            $incvatprice = $_product->getClearance_price() * (1 + (20/100));

            echo "
&pound;";
            echo number_format($incvatprice, 2, '.', '');
            echo " inc vat
";

            echo "this";
            echo $_product->getFinalPrice();

        ?>

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

            <?php if (!$this->hasOptions()):?>

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

Qty:

                                <input type="text" pattern="\d*" name="qty" id="qty" maxlength="12" value="1" title="Qty" class="input-text qty align-center col-xs-1">

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

                    <?php endif; ?>


texts: How to add massaction in product grid in magento2?

texts:
I need to add mass action based on Settings.

If in Configuration settings, it is set to "Yes/Enable" than only that particular mass-action should be added to product grid.

I know I can directly add mass-action using ui_component product_listing.xml.
?
But case is how to check Configuration settings and add or remove based on that?


texts: how to use estimate-shipping-methods api

texts:
How i can use this API URL Without adding product to cart?

     "rest/default/V1/carts/mine/estimate-shipping-methods"

I check on checkout and find should pass address id for collect MG shipping method.
But it is when true  we add the product to cart ... So now i wanna find how i can use above API URL without add product to cart.


texts: Get product list in custom admin grid form magento 2

texts:
I have a custom admin grid form, I want to select product like this when add or edit form

How can i do that?
Any help? Thank in advance.


texts: How do you minify merged css and js on Magento 1.9?

texts:
Magento standard can merge js and css.
There is no standard functionality to minify this file afterwards.

How can we do this?


texts: Magento 2: localStorage['mage-cache-storage'] usage

texts:
I've been looking at an easy and fast way (not expensive) to get the current cart data on each page view.

It seems that most information about the cart is available in LocalStorage. You can see what's there by running this:

JSON.parse(localStorage['mage-cache-storage']);

Does anyone know when this is available? And if it is safe to use and assume it will be there?


texts: Website not found -> 404 on each page including admin

texts:
I have just cloned a Magento website to my local environment and the website showing 404, regardless what page I visit even the admin panel is 404.

I am using Magento 1.9.3.8 and running it on MAMP 5.0.1

I have tried to visit the website with localhost/mywebsite/index.php, without it but still the same problem.

However, it finds the files when I visit localhost/mywebsite/LICENSE.TXT

The .htaccess file is included in the root directory

I have changed the web/unsecure/baseurl and web/secure/base_url and also the app/etc/local.xml with correct paths and db values.

Hope I was clear enough.

Thanks for any advice.


texts:
I have a number of products that share a lot of the same content. It is becoming increasingly difficult to keep all of the product pages updated when new products are released or changed.

I would like to take the common content elements and place them into a content block and place the block onto each product. The problem with this is that some of the shared content needs to be slightly different for each product. Basically, the comparison table needs to highlight the product the the user is currently viewing.

The only way I can see to do this is to place the block into a module and create a block with an argument for the selected product. I was hoping to avoid having to do that because it seems like a lot of work to achieve so little.


texts: Magento 2 Product Export Problems "Please correct the data sent value"

texts:
Magento 2 Version 2.1.1 -  I am intermittently getting the error "Please correct the data sent value." when trying to export product.

Test results:

  Full Export no filter = Fail Filter by Country of Origin "A" = Pass
  (976 Product Lines) Filter by Country of Origin  "B" = Fail (Approx
  8000 Product lines) Filter by Attribute (from above fail) = Pass (2
  Product Lines) Filter by Categories = "Fail" (Various Product lines
  from 4 to 500)

Some products are configurable most are simple.

I previously had problems with my imports due to spaces in file names for Images which caused breaks in the import process and consequently random upload issues on affected product on the Store Front. (Pages failed to load).

Since then i have successfully imported my entire 10K item store with no issues, but i now cannot export reliably.

PHP settings are well beyond what's required. Any help greatly appreciated.


texts: Magento 2 - How to generate coupon code?

texts: In Magento 2, How to generate coupon codes ? Please show me step by step, Thanks!


texts: How to change search query in quick search from 'like%' => '%like%'

texts:
I have word to search 'luma'
I type 'lum'in search then I have result. But i type 'uma', I have no result. I think query of search is "LIKE 'value%'". So i want change it to "LIKE '%value%'".
How can i do it. Thanks


texts: Magento 2.1.1 - Display order subtotal in header

texts:
I have added the following to minicart.phtml for my theme and it doesn't work.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$cart = $objectManager->get('\Magento\Checkout\Model\Cart');

$subTotal = $cart->getQuote()->getSubtotal();
$grandTotal = $cart->getQuote()->getGrandTotal();


texts:
I have two pages in my store one in spanish and other in english.

I have the shortcode put, but when i changed between pages the URLs changes like this:
 http://tienda.mabaonline.com/en/?___from_store=es

I want this http://tienda.mabaonline.com/en
How I can change it?


texts: How to skip adding daily conversion rate for select products?

texts:
So we have two websites each with their own store views in our store. Both websites share the same catalog. All products are imported and priced in US currency, and then our Canadian website applies the daily exchange rate to products.

The problem is that we have select products where a specific canadian selling price must be adhered too regardless of exchange rate/etc.

Is there a way to have the daily exchange rate NOT applied to a product if a specific attribute has a value?

Or does anybody know of an extension that can do this?


texts: I have created one field using product form field for my price i want save my field value at product creation time from backend magento2

texts:
I have created Custom form field for product creation and edit time, i want save my price.i have created one new tab for product form .i want save my custom price same as price option.  my input field is display on product creation form.

inside my observer i have added code

namespace Custom\Myprice\Observer;

use \Magento\Framework\Event\ObserverInterface;
use \Magento\Framework\Event\Observer as EventObserver;
use  Custom\Myprice\Ui\DataProvider\Product\Form\Modifier\CustomFieldset;

**class implements ObserverInterface
{
    protected $request;
    protected $resource;
    public function __construct(
    \Magento\Framework\App\RequestInterface $request, \Magento\Framework\App\ResourceConnection $resource
    ) {
            $this->request = $request;
            $this->resource = $resource;
      }
        public function execute(\Magento\Framework\Event\Observer $observer)
        {
            $data = $this->request->getPostValue();
            if (isset($data['product']['myprice']))
            {
                $exampleTextField =   $product->getData(CustomFieldset::FIELD_NAME_TEXT);
                what should i do for save price in field
            }
        }
}**

I have create my-price custom product attribute from back-end  same as form name fields for save price in database table "catalog_product_entity_decimal"

is it necessary to create custom product attribute for save value in database table "catalog_product_entity_decimal"
My observer is called and post value inside observer but not able to save in table

how to save my custom field value in database table "catalog_product_entity_decimal"  give me solution.


texts: Couldn't save my product listing after editing, error: "product does not exist", found out its due to related products OOS. But why?

texts:
Couldn't save my product listing after editing, shown an error message

  "product does not exist"

found out the cause is due to related products being OOS. But why is it affecting the main product listing?

Would like to find out if this is a Magento logic or a bug that needs to be fixed.

Thanks in advance and any help welcomed!


texts: Can't reach to controller for custom module (Magento 1.9.2.4)

texts:
I have created one module in magento 1.9.2.4 and I want to check front end controller is working or not,but get an error 404 Not Found page.

Config.xml (C:\xampp\htdocs\shop\app\code\local\Sevenbits\Demo\etc\config.xml)

<?xml version="1.0"?>
<config>
    <!-- about modules -->
    <modules>
        <Sevenbits_Demo>
            <version>1.0.0</version>
        </Sevenbits_Demo>
    </modules>

    <!-- Setup  class  path for all things -->
    <global>
        <models>
        <demo>
            <class>Sevenbits_Demo_Model</class>
        </demo>
        </models>

        <blocks>
        <demo>
            <class>Sevenbits_Demo_Block</class>
        </demo>
        </blocks>

        <helpers>
        <demo>
            <class>Sevenbits_Demo_Helper</class>
        </demo>
        </helpers>
    </global>

    <!-- For Frontend Controller-->

    <frontend>
        <routers>
            <demo>
                <use>standard</use>
                <args>
                    <frontName>demo</frontName>
                    <module>Sevenbits_Demo</module>
                </args>
            </demo>
        <routers>
    </frontend>

</config>

IndexController.php (C:\xampp\htdocs\shop\app\code\local\Sevenbits\Demo\controllers\IndexControllers.php)

<?php

class Sevenbit_Demo_IndexControllers extends Mage_Core_Controller_Front_Action
{

    public function indexAction()
    {

            echo "Hello World";
    }

}

Sevebits_Demo.xml (C:\xampp\htdocs\shop\app\etc\modules\Sevenbits_Demo.xml)

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

You can find full source code here :
https://drive.google.com/file/d/0B8PWEkckbXCUNkpQZ2N6eEM3a1E/view?usp=sharing


texts: How to solve SQLSTATE[42000]: Syntax error or access violation: 1142 INSERT error?

texts:
My website oxyglowcosmetics.com was running fine But now it shows

  SQLSTATE[42000]: Syntax error or access violation: 1142 INSERT command
  denied to user 'oxyglow'@'182.50.130.126' for table 'lts_log_visitor'
  ERROR

BOTH ON FRONTEND AND BACKEND.


texts: Remove Parent Category from child category URL

texts:
How can I edit this:

public function getUrlPath($category)
{
    if (in_array($category->getParentId(), [Category::ROOT_CATEGORY_ID, Category::TREE_ROOT_ID])) {
        return '';
    }
    $path = $category->getUrlPath();
    if ($path !== null && !$category->dataHasChangedFor('url_key') && !$category->dataHasChangedFor('parent_id')) {
        return $path;
    }
    $path = $category->getUrlKey();
    if ($path === false) {
        return $category->getUrlPath();
    }
    if ($this->isNeedToGenerateUrlPathForParent($category)) {
        $parentPath = $this->getUrlPath(
            $this->categoryRepository->get($category->getParentId(), $category->getStoreId())
        );
        $path = $parentPath === '' ? $path : $parentPath . '/' . $path;
    }
    return $path;
}

such that, the parent category is removed from the child categories' url.

For example:

www.mage.com/c1/c2/c3.html

becomes

www.mage.com/c3.html


texts: Magento 2.2.6 Pagination not working in Category pages

texts:
We have upgraded Magento 2.2.3 to 2.2.6.

After upgrade page filter is not working. It is loading all the products in category page.

The drop down still says 9,18,27.

But it is displaying all products on the page.

Has anyone faced the same issue? Please help me.


texts: To Make 3rd Tab in Product View Page as Active Tab

texts:
I have 3 tab sections in my product page as below.

|  Description  |  Additional Info  |  Customer Review  |

Right now Description tab is default active tab but i want to set 3rd Customer Review tab as default active tab.

So how can I do this? Any help is appreciated.


texts: Magento : How to make customer Login in POPUP OR Drop down menu ?

texts:
Copy Files From customer
\app\design\frontend\base\default\layout\customer.xml
to
\app\design\frontend[THEME_PACKAGE]\default\layout\customer.xml
then  in that xml find :
<customer_logged_out> this section
then
make like this
 <customer_logged_out>
       <reference name="right">
            <block type="customer/form_login" name="customer_form_mini_login" before="-" template="customer/form/mini.login.phtml"/>
        </reference>
        <reference name="top.links">
            <action method="addLink" translate="label title" module="customer">Log In<url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>
        </reference>

        <remove name="reorder"></remove>
    </customer_logged_out>

then copy the file
app\design\frontend\base\default\template\customer\form
copy form folder to our theme folder
app\design\frontend[THEME_PACKAGE]\default\template\customer\form
then
**FOR mini.login.phtml  USE THIS CODE LIKE THIS **
      <form action="<?php echo $this->getPostActionUrl() ?>" method="post">
                   <?php echo $this->getBlockHtml('formkey'); ?>
                    <?php echo $this->getChildHtml('customer.form.login.extra')?>

 <?php echo $this->__('LOGIN oder ANMELDEN') ?>

                                    Email Adresse
                                    <input type="text" name="login[username]" id="mini-login" class="input-text form-control" />

                                    Passwort
                                    <input type="password" name="login[password]" id="mini-password" class="input-text form-control" />

                                  <button type="submit" class="btn btn-default text-uppercase">anmelden</button>

Passwort vergessen?

Neuer Kunde? Jetzt registrieren!

                                </form>

call in phtml via this
<?php echo $this->getChildHtml('header_customer_form_mini_login') ?>


texts: Product status not changing when qty goes below minimum qty

texts:
I am using magento-1.6.1.0

When qty of poduct goes below minimum qty still it show product "In stock".

I have set everything prodperly on system > config > tab.

still facing the same issue.

Thanks in advance.


texts: How to move add to cart at the last for each product in product list page magento 2?


texts:
Is it possible to upload product videos to Magento2.1.x that are hosted on own private server?
We're open to any solution possible.
Thanks.


texts: how to manage the order back-end when using an ERP?

texts:
I plan to export orders from Magento into our ERP using the www.xtento.com modules.

Our ERP will take the order, and then manage the invoicing, packlists, shipping, etc. Magento will send the first order confirmation email - and the rest will then come from the ERP. It's going to be mostly one way.

How do you then handle the disconnect between Magento <> ERP? Customers will not see the correct status etc on their Magento account page. I'm thinking there will be invocing number diconnects etc that I'm not sure how to handle right now.

Any ideas, experience in that area?

Thanks!


texts: How to disable "Cron Job" logging into system.log file in Magento 2

texts:
My logs are being flooded with cron jobs updates. How can I disable this?

[2019-02-27 06:28:02] main.INFO: Cron Job outdated_authentication_failures_cleanup is run [] []
[2019-02-27 06:28:02] main.INFO: Cron Job outdated_authentication_failures_cleanup is successfully finished. Statistics: {"sum":0.00048398971557617,"count":1,"realmem":0,"emalloc":1128,"realmem_start":138412032,"emalloc_start":136589928} [] []
[2019-02-27 06:28:03] main.INFO: Cron Job magento_newrelicreporting_cron is run [] []
[2019-02-27 06:28:03] main.INFO: Cron Job magento_newrelicreporting_cron is successfully finished. Statistics: {"sum":0.0003509521484375,"count":1,"realmem":0,"emalloc":752,"realmem_start":140509184,"emalloc_start":137617904} [] []
[2019-02-27 06:28:03] main.INFO: Cron Job indexer_reindex_all_invalid is run [] []
[2019-02-27 06:28:03] main.INFO: Cron Job indexer_reindex_all_invalid is successfully finished. Statistics: {"sum":0.0062119960784912,"count":1,"realmem":0,"emalloc":551552,"realmem_start":134217728,"emalloc_start":121324440} [] []
[2019-02-27 06:28:03] main.INFO: Cron Job indexer_update_all_views is run [] []

And so on ....

I found this in official docs: https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-cron.html

However, it doesn't say how to disable the logs...

I want to disable the logs for cron only. How can I achieve this? Is there a admin config or I have to do it manually?


texts: Magento 2.2.5 customer login not working

texts: Working on a new Magento2.2.5 install and when I test logging into the site as a customer the magento signin page just reloads with no error message shown. However in the admin panel I see my test customer listed. I don't see anything in the system.log file so I am not sure where to begin with troubleshooting? Suggestions?


texts: How to set admin user permission for root category?

texts:
I have three webstores.
Also I hired one manager for one webstore. So, I have three managers and three root categories in admin panel.

Let's name manager1, manager2, manager3 and webstore1, webstore2, webstore3.

I would like to hide root category from manager if he should't manage it.

Manager1 should see only own root category webstore1.
Manager2 should see only own root category webstore2.
Manager3 should see only own root category webstore3.

Is it possible to do without coding?


texts:
How to save quote items in Magento 2? I have quote id. I'm able to store quote table data but I want to store products name, sku which is going in quote_item table.

I am able to set Data in quote table . $quote->setItemsqty($this->qty);

But i want to set Sku ,Name etc on quote_item table

Below is my Function on that function i am able to create quote

public function save(\Magento\Quote\Api\Data\CartInterface $quote)
{

    if ($quote->getId()) {

       $currentQuote = $this->get($quote->getId(), [$quote->getStoreId()]);

     foreach ($currentQuote->getData() as $key => $value) {

          if (!$quote->hasData($key)) {
                $quote->setData($key, $value);
            }
        }

    $quote->setItemscount(count($this->sku));
    $quote->setItemsqty($this->qty);

    }

    $this->getSaveHandler()->save($quote);

    $quoteItem = $this->quoteItemFactory->create();
    $quoteItem->setProduct($product);

    $quoteObj->addItem($quoteItem);
    $quoteObj->collectTotals()->save();

    $this->customlog->info($quoteItem->getData());

    unset($this->quotesById[$quote->getId()]);
    unset($this->quotesByCustomerId[$quote->getCustomerId()]);
}

How to do it? Any idea?


texts: How to add custom filed type in admin form in magento 2? time range picker

texts: I want to create the custom time range picker type in Magento 2 admin form like below image


texts:
I have a website developed Magento 2.2.4 and I want to export this website all data i.e customer,product,review etc and import this data into the Magento 2.2.6 site.

How can i do this ?

Thanks is Advance.


texts: Magento 2.3.5 : How to remove specific product from recently viewed product list

texts:
I have display recently viewed product slider on product page using Magento default widget. But, I want to remove product from recent viewed product collection.
How to remove that?
Any help would be appreciated.
Thanks.


texts: How show the quote_item.additional_data in the mini cart

texts:
I set some information in the field additional data the table item_quote,   I can't show this information in the mini cart, any help with this.

vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html

I think this information it is shown here


texts:
I have a problem how to configure a product (its attribute) with variable lengths.
Its similar like a ladder. Some are fix, some can be extended and some can be extended only in fix lengths.

Ladder A, length = 350 cm
Ladder B, length = 200 - 380 cm
Ladder C, length = 480, 580, 680 cm

I want to offer the user the right product for his preferred length. Eg.

Search A needs 350 cm = Ladder A and B
Search B needs 281 cm = Ladder B

My Problem: Ladder A and C is easy to set up. But how could I make it for Ladder B? When I create 180 values like 200, 201, 202 and so on, I will probably crash my performance.


texts: Magento2: How to Change the price format?

texts:
I need to change the price format from "10,00" to "10,-". I have tried to find info, but all that I saw is: How to change "," to "." like this

How to change currency format in Magento 2?

(and btw it's not working for product page). And no info on how to add few symbols after price. I know how to do it by jS but it's the last what I want to do.


texts: How to Configure Flat Rate Shipping Method in Magento 2

texts:
i need help with magento 2.

i am developing a module in magento 2.2.2.
http://docs.magento.com/m2/ee/user_guide/shipping/shipping-flat-rate.html
in my module i need modify values of shipping-flat-rate.
eg: title, price.
how get and update values of shipping-flat-rate since my module?.

thank you.


texts: Best way to setup segmented buying by weight and quantity?

texts:
I am looking for some help on how to allow customers to purchase by weight and quantity and offer a discount the more they buy. For example say we have two products, Almonds SKU1 and Almonds SKU2. What is the best way to implement the following:

Almonds SKU1

1kg for $20

4 x 1kg for $76

8 x 1kg for $144

etc..

Almonds SKU2

25kg for $375

etc..


texts: Magento - Taxes deducted from the final price

texts:
I set in my shop that all prices must be inclusive of taxes.
I set all our "Tax rate" for the various nations.
In the case where the customer purchases with taxes (for example Tax rate 22,000) is quite correct because for example:

  Product Price: 100 €
  tax: 22 €
  Total: 100 €

In the case where a customer does not have "Tax rate" or that I have set to 0.000 in the calculation of the product it is calculated thus:

  Product Price: 78 €
  Total: 78 €

In this case for me it is wrong because the customer would have to pay:

  Product Price: 100 €
  Total: 100 €

How can I fix?


texts: Magento 2 : Override template file (sales order email - gift card product)

texts:
I have found that this file is used with _getGiftcardOptions() vendor/magento/module-gift-card/Block/Sales/Order/Item/Renderer.php that provides data to labels for gift card item in the Sales order confirmation email.
I am not much if there is any PHTML file that is also used with this process. As I am trying to update this gift card item data (i.e to add other product attributes as well in the email template) I need to override that template file.
Any thoughts on which template file is responsible for gift card products in email?


texts:
after I change from default to  developer mode my homepage is look like this

what is my mistake ?  please help me


texts:
I'm trying to get all configurable attributes of a configurable product.

$product_attributes = $_product->getTypeInstance(true)->getConfigurableAttributesAsArray($_product)

So far it worked properly, but suddenly it showed an error message

Call to a member function getId() on a non-object in app/code/core/Mage /Catalog/Model/Product/Type/Configurable.php and I have no idea of what's going on.

I tried to debug and in Configurable.php line 276, $this->getConfigurableAttributes($product) returns 3 attributes but the first one doesn't belong to the product

And line 283, $attribute->getProductAttribute() returns null, therefore, $attribute->getProductAttribute()->getId() caused the problem, crashed the app.

If anyone suffered this issue, please tell me what's going on. Any help will always be appreciated.


texts: How to get child product _id in magento2?

texts:
I can get attribute _color.

Now, How to get the selected child product_id in wishlist.js file in Magento2.

If anyone knows please help me.


texts:
I was using Magmi for the past two years. I just processed the Magento update from 1.9.1 to 1.9.3.

Since I did the update, Magmi ignores the multiple select columns and the invalid columns (i.e. the column name doesn't refer to an attribute).

Is there something I missed during the update?

Thanks in advance.


texts: Magento2 suggestion on which version to be used

texts:
The latest version of magento is 2.4.0 & it is compatible with PWA studio version 7.0.0. But going with Magento2 latest version issue will be extension that we purchase might not be compatible with latest version of Magento.
On the other hand if we go with 2.3.4 then we need to use downgraded version of studio 6.0.0

Can some one suggest which version I should go with?


texts: Magento 2: Why No LoginController on `customer/account/login`

texts:
If I understand my Magento 2 routing -- the URL customer/account/login has a front name of customer.  This means it's "claimed" by the Magento_Customer module.

#File: app/code/Magento/Customer/etc/frontend/routes.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
    <router id="standard">
        <route id="customer" frontName="customer">
            <module name="Magento_Customer" />
        </route>
    </router>
</config>

Which in turn, means the account/login portion of the URL will translate into the following controller file.

app/code/Magento/Customer/Controller/Account/Login.php

However -- this doesn't appear to be what's happening in practice.  If I drop in some var_dump exit debugging

#File: app/code/Magento/Customer/Controller/Account/Login.php
public function execute()
{
    var_dump(__METHOD__);
    exit;
    //...
}

The page execution doesn't halt.  Also, if I drop in a

print_r(get_included_files());

at the end of index.php, there's no Login.php listed.  This is true for both a cached page hit, and a complete cache rebuild.

Why doesn't customer/account/login router through app/code/Magento/Customer/Controller/Account/Login.php
Where does it route through?
If my questions don't make sense, what core piece of information am I missing?


texts:
My Baobaz_Arithmetic.xml file  app/etc/modules/Baobaz_Arithmetic.xml  is below:

   <?xml version="1.0" encoding="UTF-8"?>
   <config>
       <modules>
           <Baobaz_Arithmetic>
               <active>true</active>
               <codePool>local</codePool>
           </Baobaz_Arithmetic>
      </modules>
  </config>

Config file :: code/local/Baobaz/Arithmetic/etc/config.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <config>
        <modules>
            <Baobaz_Arithmetic>
                <version>0.1.0</version>
            </Baobaz_Arithmetic>
        </modules>
        <frontend>
            <routers>
                <arithmetic> <!-- Any Name is fine as long as there is no conflict -->
                    <use>standard</use>
                    <args>
                        <module>Baobaz_Arithmetic</module>  <!-- Name of the module -->
                        <frontName>arithmetic</frontName>
                    </args>
                </arithmetic>
            </routers>
        </frontend>
    </config>

My Controller is here:   code/local/Baobaz/Arithmetic/controller/IndexController.php

   class Baobaz_Arithmetic_IndexController extends Mage_Core_Controller_Front_Action {

        public function indexAction() {

            echo 'Hello Index!';

        }

    }

Error :: 404 page not found.
I can see it on configuration >> advance; and it is enabled.
Could anybody please help??


texts: Product translated URL for iframe purposes

texts:
I am working on a 1.9.x version of Magento, I've just translated the products of my catalog for a PT-BR language and I was needing the products URLs in order to insert them on a iframe of a specific website in portuguese. Even though rewriting the url (to distinguish the italian version from the portuguese one), when I copy and paste the url of the portuguese product and insert on the code of the iframe of the website mentioned before, the iframe shows a 404 error.

Is there something I could be doing to exhibit this product in portuguese on the iframe? Because by now I can only show the italian (default) version and only when the user adds the product to the shopping cart it reveals the language window so he/she can select the PT and then the product could be visualized in portuguese. But not in the step before.