texts: How to apply Fixed Special price intead of Percentage Special price in Bundle Product

texts:
I am working on a website which  uses bundle product. The main concept of the product is a below:

Website sells a device with four different colors. There are packages of colour like

2 Regular color + 1 Special colour = $45
1 Regular color + 2 Special colour = $50

There is no particular algorithm for defining price. I am using bundle product with Fixed Price for this.

Now, there is a special price for each product. But i see, you can only apply percentage discount in bundle price and can't set the fixed special price discount. I am not sure why is it so as we already have a fixed price and they aren't going to vary.

Also, on the frontend instead of stricking off the old price and showing special price, it directly shows the special price making it impossible for customer to identify whether he is getting a discount or not.

I found two questions related to it with no answers.Q1 Q2 . It would be of great help if someone can guide me on how to apply fixed price discount ie: fixed special price on the product in Bundle product.


texts: how to solve css validation using Total Validator tool in Magento 2

texts:
To solve the errors I have to modify calendar.css and styles-m.css. What are the proper way of customizing theses css files in my custom theme.

These are the file paths where I want to modify.

static/frontend/DGX/Luma/en_US/mage/calendar.css
static/frontend/DGX/Luma/en_US/css/styles-m.css
static/frontend/DGX/Luma/en_US/css/styles-l.css
static/frontend/DGX/Luma/en_US/css/print.css

Any help would be appreciated.


texts: Product is missing Attibute Text property

texts:
I have the following in my custom module:

$product = $quote_item->getProduct();

If I then do this I see the product id:

var_dump($product->getId());

This though gives me null:

var_dump($product->getAttributeText('manufacturer'));

But this gives me the manaufacturer:

$product = Mage::getModel('catalog/product')->load($quote_item->getProductId());

var_dump($product->getAttributeText('manufacturer'));

I can't use the second option becuase I am adding to some existing code which I do not want to break. Taking the first example how can I access the AttributeText property and why in my case is it empty?


texts: Add Wysiwyg attribute to Product in Magento 2

texts: How to create Magento 2 Product Attribute with Wysiwyg editor Programmatically.


texts: Removed custom extension but Magento throwing error

texts:
I am trying to access the admin area of my magento installation after deleting my custom extension. I have removed all the files for my extension. I have also removed all database entries for it. Including core_config and core_resource. I have removed the etc/modules extension file.

However I still get this error when trying to log in to admin area.

Warning: include(Cti/Enhancedform/Helper/Data.php): failed to open stream: No such file or directory  in /vagrant/httpdocs/lib/Varien/Autoload.php on line 94

Any help is appreciated. I am trying to simulate the extension being installed from scratch.


texts: Fire Observer for any page request within Magento 2?

texts:
Actually in my case i want to run observer which would just work like
  index.php bootstrap initialisation file.

  Here I want here it should be work for each page request within Magento 2.

  Please guide me thanks in Advance.


texts:
given a product page, i need to retrieve the product url for another store.
I'm trying this solution:

 Mage::getUrl('', array(
        '_current' => true,
        '_use_rewrite' => true,
        '_secure' => true,
        '_store' => 3,
        '_store_to_url' => true
    ));

but the result is that just the base url is changed, while the url key is the same. The link of course is broken.
i can't use the url_rewrite model because if there is no record for a product it just returns the base url.
Any idea?

thanks


texts:
How should I go about creating a list of phtml files that I would like to be excluded from the standard magento caching system?

*Some Context:
I have a search bar in the header of a magento site. When a search term is entered another php file is rendered through ajax with a list of relevant results.
When I turn off the block cache it works perfectly but when I don't turn it off the list of results appear as normal but if you click on them they all bring you to the same product.
So unless I'm missing something I assume removing this phtml file from cache will fix my problems.


texts: How to Add customized error message in magento 2 admin form

texts:
<item name="config" xsi:type="array">
    <item name="label" xsi:type="string" translate="true">My Custom Filed</item>
    <item name="dataType" xsi:type="string">text</item>
    <item name="formElement" xsi:type="string">input</item>
    <item name="source" xsi:type="string">model_name</item>
    <item name="dataScope" xsi:type="string">my_custom_field</item>
    <item name="sortOrder" xsi:type="number">1</item>
    <item name="validation" xsi:type="array">
        <item name="required-entry" xsi:type="boolean">true</item>
        <item name="no-whitespace" xsi:type="boolean">true</item>
        <item name="validate-pattern" xsi:type="string">/^[a-z][a-z0-9_.-]$/i</item>
    </item>
</item>

I want to display a customized error message in Magento 2 admin form while I use pattern validation it gives invalid input but I want a customized message like You should enter a decimal value in place of it.
Thanks


texts: How to manage products in category on store view Basis

texts:
I have multiple store views with same root category, also with the same categories for all the store-views. Can we add different products in a category on the basis of store view.
If not, is there any way to do the same ?


texts: Subcategories On Category Page Magento 1.9.2.2

texts:
I'm using this code to show subcategories on the category page. I was working fine in 1.9.2.0 but is broken in 1.9.2.2. Does anyone have the updated code?

<?php
$category = Mage::getSingleton('catalog/layer')->getCurrentCategory();
$categories = $category->getCollection()
        ->addAttributeToSelect(array('name', 'image'))
        ->addAttributeToFilter('is_active', 1)
        ->addIdFilter($category->getChildren())
?>

Choose A Subcategory...

    <?php foreach ($categories as $category): ?>

            <a href="<?php echo $category->getUrl() ?>"><img src="<?php echo $category->getImageUrl() ?>" alt="<?php echo $this->htmlEscape($category->getName()) ?>" />

                <?php echo $category->getName() ?>

    <?php endforeach; ?>


texts: Integrity constraint violation: 1052 Column 'base_grand_total' in where clause is ambiguous

texts:
I've been able to add a few custom attributes to the sales order grid (sku, custom name). I am able to filter correctly. When I add the customer email, I can add and filter it too, but then if I filter by a total (e.g. base grand total) I get the error above. Other solutions suggest using filter_index to remove this ambiguity but this hasn't helped, presumably because it's on a field I'm not adding (grand total) - so this is not due to ambiguous entity_id. How do I make it use the specific total field?

Here are the helpful parts:

Observer

 class Kaska_ExtendedGrid_Model_Observer
{

public function salesOrderGridCollectionLoadBefore($observer)
{

    $collection = $observer->getOrderGridCollection();
    $select = $collection->getSelect();

    $select->join('m_sales_flat_order', '`m_sales_flat_order`.entity_id = `main_table`.entity_id', array('email'  => new Zend_Db_Expr('`m_sales_flat_order`.customer_email')));

    $select->joinLeft(array('payment' => $collection->getTable('sales/order_payment')), 'payment.parent_id=main_table.entity_id', array('payment_method' => 'method'));

    $select->join('m_sales_flat_order_item','`m_sales_flat_order_item`.order_id=`main_table`.entity_id', array('sku' => new Zend_Db_Expr('`m_sales_flat_order_item`.sku'),'name'  => new Zend_Db_Expr('`m_sales_flat_order_item`.name') ));

    $select->join('m_catalog_product_entity_varchar', '`m_catalog_product_entity_varchar`.attribute_id=163 AND `m_catalog_product_entity_varchar`.entity_id = `m_sales_flat_order_item`.`product_id`', array('attr'  => new Zend_Db_Expr('`m_catalog_product_entity_varchar`.value')));

    $select->group('main_table.entity_id');

}

public function filterEmail($collection, $column)
{

    if (!$value = $column->getFilter()->getValue()) {
        return $this;
    }
    $collection->getSelect()->having(
        "`m_sales_flat_order`.customer_email like ?", "%$value%");
    return $this;
}

.... filterSku etc

layout.xml

<sales_order_grid_update_handle>
    <reference name="sales_order.grid">
        <action method="addColumnAfter">
            <columnId>payment_method</columnId>
            <arguments>
                <header>Payment Method</header>
                <index>payment_method</index>
                <filter_index>payment.method</filter_index>
                <type>text</type>
            </arguments>
            <after>shipping_name</after>
        </action>
        <action method="addColumnAfter">
            <columnId>email</columnId>
            <arguments helper="kaska_extendedgrid/getEmailColumnParams" />
            <after>payment_method</after>
        </action>

Helper file

public function getEmailColumnParams(){
    return array(
    'header'    => 'Customer Email',
    'index'     => 'email',
    'type'        => 'text',
    'filter_index'=>'m_sales_flat_order.customer_email',
}

I also tried locally overriding the _prepareColumns of Mage/Adminhtml/Block/Sales/Order/Grid.php

$this->addColumn('base_grand_total', array(
        'header' => Mage::helper('sales')->__('G.T. (Base)'),
        'index' => 'base_grand_total',
        'type'  => 'currency',
        'currency' => 'base_currency_code',
     'filter_index' => 'sales_flat_order.base_grand_total'
    ));

EDIT
After some help from below, the culprit was another extension's overriding of the order grid preparecolumns


texts: Extra .html at end of url's in Magento 2

texts:
We've used the importer from Mage 1 to our new site on Mage 2. All imported products now have an additional .html at the end of the url (mysite.com/myproduct.html.html).

There are over 60,000 of these rewrites in the URL rewrite section of the admin panel. So unfortunately, not something we can tackle one at a time.

Can anyone please suggest a fix for this issue?


texts: How to move the Proceed to Checkout button

texts:
I trying to move the app/design/frontend/default/default/template/checkout/onepage/link.phtml template that has the Proceed to Checkout button into the cart.phtml template. Copy and paste gives errors :) predictably!

How can I do that using the local.xml?

The reason is, I want it in a certain location and not all the methods just that single button.

Thank you

UPDATE

Here's where I'm trying put the button in the cart.phtml

        <?php echo $this->getChildHtml('totals'); ?>
            <?php echo $this->getChildHtml('coupon') ?>
            <?php echo $this->getChildHtml('giftcards') ?>
            <?php if(!$this->hasError()): ?>

            <?php foreach ($this->getMethods('methods') as $method): ?>
                <?php if ($methodHtml = $this->getMethodHtml($method)): ?>

<?php echo $methodHtml; ?>

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

            <?php endif; ?>
            <?php echo $this->getChildHtml('checkout_cart_widget') ?>

   <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('cart_additional')->toHTML(); ?>

When I just move the code for the button i.e. link.phtml into cart.phtml template like below I get a Magento error page and report (below).

<?php if ($this->isPossibleOnepageCheckout()):?>

    <button type="button" title="<?php echo $this->__('I\'m Ready to Checkout') ?>" id="button-onepage-checkout" class="button button-onepage-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';">
    <?php echo $this->__('I\'m Ready to Checkout') ?></button>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('cart_button_seals')->toHTML(); ?>

<?php endif?>

        <?php echo $this->getChildHtml('totals'); ?>
            <?php echo $this->getChildHtml('coupon') ?>
            <?php echo $this->getChildHtml('giftcards') ?>
            <?php if(!$this->hasError()): ?>

            <?php foreach ($this->getMethods('methods') as $method): ?>
                <?php if ($methodHtml = $this->getMethodHtml($method)): ?>

<?php echo $methodHtml; ?>

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

            <?php endif; ?>
            <?php echo $this->getChildHtml('checkout_cart_widget') ?>

      <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('cart_additional')->toHTML(); ?>

Get error: a:5:{i:0;s:78:"Invalid method Mage_Checkout_Block_Cart::isPossibleOnepageCheckout(Array


texts: How does Magento determine the route / getting 404 behind proxy

texts:
I have the following constellation:

NGINX in front of two apache vhosts
One Vhost running Magento (port 8181)
Proxy pass of https://example.de.testing.abc.de/en/shop/ -> http://127.0.0.1:8181

No when I open the website https://example.de.testing.abc.de/en/shop/ I get a 404 on Magento.

$_SERVER['REQUEST_URI'] is /en/shop/ (tried with PHPInfo)

The base URL configuration in Magento is as follows:

+------------------------------+---------+----------+------------------------------------------+
| Path                         | Scope   | Scope-ID | Value                                    |
+------------------------------+---------+----------+------------------------------------------+
| web/secure/base_media_url    | default | 0        | NULL (NULL/"unkown" value)               |
| web/secure/base_static_url   | default | 0        | https://example.de.testing.abc.de/static/  |
| web/secure/base_url          | default | 0        | https://shop.example.de.testing.abc.de/    |
| web/secure/base_url          | stores  | 1        | https://example.de.testing.abc.de/en/shop/ |
| web/secure/base_url          | stores  | 2        | https://example.de.testing.abc.de/de/shop/ |
| web/unsecure/base_media_url  | default | 0        | NULL (NULL/"unkown" value)               |
| web/unsecure/base_static_url | default | 0        | NULL (NULL/"unkown" value)               |
| web/unsecure/base_url        | default | 0        | https://shop.example.de.testing.abc.de/    |
| web/unsecure/base_url        | stores  | 1        | https://example.de.testing.abc.de/en/shop/ |
| web/unsecure/base_url        | stores  | 2        | https://example.de.testing.abc.de/de/shop/ |
| web/url/redirect_to_base     | default | 0        | 0                                        |
+------------------------------+---------+----------+------------------------------------------+

First question

Can Magento 2 determine from the base URL configuration which store to run?

I am afraid it doesn't ... so I set also the store code

Further configuration

I am setting in NGINX a header X-MAGE_RUN_CODE=en and check for this header in the Apache Vhost. Then I set the MAGE_RUN_CODE env variable appropriately.

Second Question

It is still not working - I still get a 404. I verified, that MAGE_RUN_CODE is passed to Apache (via phpinfo() again). MAGE_RUN_TYPE is set to store.

I think Magento tries to find a route /en/shop ? How can I avoid that? Do I have to use rewrites in NGINX or is Magento capable of doing so?

update:  Third Question

When I set the proxy to go to the URL / it works - no more 404 page.
But only if FPC is disabled.
If FPC is enabled, I do not get the other language version when changing URLs. Also the language switch appends a __store=en when switching languages. How can I get it working with FPC on?

Seems to be related to https://github.com/magento/magento2/issues/4556


texts: Error when recovering SagePay orphaned transaction

texts:
Lately, I have been experiencing problems when trying to recover some SagePay orphan transactions. This doesn't apply to all as some of the "Recover" with no problem.

When I click on "Orphan Transaction List" which appears at the top information bar in Magento admin panel:

Then find the transaction I need to recover and click on "Recover" in action:

I get The requested Payment Method is not available. error:

Been searching and I figure out what's going on...

Also, not sure if it is relevant, when creating a order in the admin and make the total amount to £0.00, I also get the same error The requested Payment Method is not available even tho the payment method is not required. I have checked the configuration and Zero Subtotal Checkout is enabled.

Could anyone help or at least direct me?

I use Sage Pay Suite PRO v4.1.7 by ebizmarts and Magento ver. 1.9.2.4

SagePay:


texts: Deploying static content not updating css

texts:
As far as I understand it, In order to change the style of an email, I need to override the _email-extended.less file. I go to the path below

app/design/frontend/Smartwave/Porto/web/css/source/_email-extended.less

and make my changes/add classes but it doesnt seem to affect any of my generated static content css files. It simply does nothing. Ive tried deleting the folder where I assume it shows up

pub/static/frontend/Smartwave/porto/en_US/css

but when I look, none of the files have been modified, it still generates the same files it was before it got deleted. The best i can tell is im doing the changes in the wrong location, however i am not sure where to look if not in the directory listed above...


texts: Magento 2.1.6 : How to override Adminhtml Module Sales view totals.phtml

texts:
How to override vendor/magento/module-sales/view/adminhtml/templates/order/totals.phtml file in magento2

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance dc" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceBlock name="sales_order_tabs">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">CompanyName_ExtensionName::totals.phtml</argument>
        </action>
    </referenceBlock>
</page>

And i copied totals.phtml file to app\code\CompanyName\ExtensionName\view\adminhtml\templates\ folder.

I tried to clean cache and upgrade nothing happen So please anyone have any idea what is wrong? or any another way?


texts:
We are using magento2.3
How i can fix this error?

below is system.log error stack:

[2019-03-25 01:00:40] main.ERROR: Environment emulation nesting is not allowed. [] []
[2019-03-25 01:00:40] main.CRITICAL: Invalid template file: 'Magento_Review::helper/summary_short.phtml' in module: 'Magento_Review' block's name: '' [] []

We are not usig any custom module.


texts: Mismatched Magento version while using composer

texts:
I currently have Magento running on Ubuntu Xampp, and attempted to run composer on a theme file, which prompted me to install a load of PHP extensions. I did this (7.2 for all of them, same as system version) which fixed those errors, but then it suddenly came up with

  magento/framework 100.0.9 requires php ~5.5.0|~5.6.0|~7.0.0 -> your
  PHP version (7.2.15) does not satisfy that requirement.

This is in response to composer install in the relevant theme folder.

However, the Magento admin panel clearly states that I'm on version 2.3.1 which does support PHP 7.2.11 (which is earlier than 7.2.15, but surely this shouldn't be a breaking change). I installed Magento through the bitnami addon installer to Xampp, which could be the cause as it somehow installed an older version? (Although again, admin panel states I'm running 2.3.1). Could this be something to do with the version the theme in specific is looking for?

Any advice would be very appreciated.
Thanks!


texts:
I tried to make sort by option by biggest discount, something like sorting $discount_value= $minimal_price / $regular price;

I saw many scripts, but none of them is usefull. I think, many people would like this type od extension or script.

I tried in /app/code/local/Mage/Catalog/Block/List.php  to add $this->_productCollection->joinField...  I think solution is in this file.

Thank you very much for help or php code to paste there.


texts: Creating product images programmatically and exclude them from gallery?

texts:
I am creating products with code and I am also adding images. This is the code:

$mediaArray = array(
    'thumbnail'   => $mainImage,
    'small_image' => $mainImage,
    'image'       => $mainImage,
);

foreach($mediaArray as $imageType => $fileName) {
     $filePath = $fileName;
    if (file_exists($filePath)) {
        try {
            $product->addImageToMediaGallery($filePath, $imageType, false, true);
        } catch (Exception $e) {
            echo $e->getMessage();
        }
    }
}

Now this works, but they are not excluded from the gallery images. How would I do that?

Thanks!


texts: Customer's order can't edit from Magento 2.x Backend

texts:
I have tried to edit the customer order from Magento Admin panel but when I have been going to submit the order that time Magento Admin panel is showing an error that is "Please enter a customer email." but in there have no email field to write.

Is there anyone Magento 2.x expert to help me out from this issues or if anyone faced that kind of issue in your system please give me a solution.

Please check my screenshot below.

Thanks a lot.


texts: Which is the best way to test my Magento system after developed

texts:
I just recently develop Magento system for personal use.

I want to know about how to test my Magento system.

Want to know about some tools or testing flow.


texts: magento 2.1.3 pub/media/styles.css file not existed

texts:
These are the steps I used to deploy content:

rm -rf var/di/* var/generation/* var/cache/* var/page_cache/* var/view_preprocessed/* var/composer_home/cache/*
sudo chmod 777 -R var pub pub/media app/etc
php bin/magento setup:static-content:deploy
php bin/magento cache:clean

But when I load the local site, there is no pub/media/styles.css file. Could anyone help me to fix this?


texts: Possible bug in 1.7 import for saving product qty in function _saveStockItem()

texts:
I had a problem where product import files with only sku and qty fields were importing the wrong qty's for most items. I realized that whatever qty the first item had would be applied to all the rest of the items.

I managed to fix it. I'm not sure if it's actually a bug or may be caused by some extension I am using, but I thought I would report it here and see if anyone has heard of this.

I located the problem in class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Model_Import_Entity_Abstract protected function _saveStockItem().

It appears that the $row variable is created with this line in loop 1:

$row['product_id'] = $this->_newSku[$rowData[self::COL_SKU]]['entity_id'];

But on the next loop, the $row variable is not reset and retains data from the previous item.

Here is the part of the function I am looking at:

while ($bunch = $this->_dataSourceModel->getNextBunch()) {
        $stockData = array();

        // Format bunch to stock data rows
        foreach ($bunch as $rowNum => $rowData) {
            if (!$this->isRowAllowedToImport($rowData, $rowNum)) {
                continue;
            }
            // only SCOPE_DEFAULT can contain stock data
            if (self::SCOPE_DEFAULT != $this->getRowScope($rowData)) {
                continue;
            }
            $row = array(); // ADDED THIS LINE TO FIX POSSIBLE BUG
            $row['product_id'] = $this->_newSku[$rowData[self::COL_SKU]]['entity_id'];
            $row['stock_id'] = 1;

            /** @var $stockItem Mage_CatalogInventory_Model_Stock_Item */
            $stockItem = Mage::getModel('cataloginventory/stock_item');
            $stockItem->loadByProduct($row['product_id']);
            $existStockData = $stockItem->getData();

            }
            $row = array_merge(
                $defaultStockData,
                array_intersect_key($existStockData, $defaultStockData),
                array_intersect_key($rowData, $defaultStockData),
                $row
            );
            $stockItem->setData($row);
            // ETC...
            // ...
            // ...
        }
}

Below is the same section of code from Magento 1.5. It also does not reset the variable using $row = array(), but for some reason it avoids the problem it's having in 1.7:

while ($bunch = $this->_dataSourceModel->getNextBunch()) {
        $stockData = array();

        foreach ($bunch as $rowNum => $rowData) {
            if (!$this->isRowAllowedToImport($rowData, $rowNum)) {
                continue;
            }
            // only SCOPE_DEFAULT can contain stock data
            if (self::SCOPE_DEFAULT == $this->getRowScope($rowData)) {
                $row = array_merge(
                    $defaultStockData,
                    array_intersect_key($rowData, $defaultStockData)
                );
                $row['product_id'] = $this->_newSku[$rowData[self::COL_SKU]]['entity_id'];
                $row['stock_id'] = 1;
                /** @var $stockItem Mage_CatalogInventory_Model_Stock_Item */
                $stockItem = Mage::getModel('cataloginventory/stock_item', $row);

                if ($helper->isQty($this->_newSku[$rowData[self::COL_SKU]]['type_id'])) {
                    if ($stockItem->verifyNotification()) {
                        $stockItem->setLowStockDate(Mage::app()->getLocale()
                            ->date(null, null, null, false)
                            ->toString(Varien_Date::DATETIME_INTERNAL_FORMAT)
                        );
                    }
                    $stockItem->setStockStatusChangedAutomatically((int) !$stockItem->verifyStock());
                } else {
                    $stockItem->setQty(0);
                }
                $stockData[] = $stockItem->getData();


texts: How to enable free shipping for particular quote even if it is disabled from admin?

texts:
I want to enable/disable free shipping based on my custom quote conditions, it works fine when free shipping is enabled from admin but I want it to work also when free shipping is disabled from admin.
I tried the following solutions but none of them worked for me -
How do I enable free shipping in backend only (for order entry)

How to programatically disable shipping method in magento

https://stackoverflow.com/questions/26403751/how-to-get-enable-freeshipping-for-special-customers-in-magento-according-to-a


texts: Smarter way to continuously update the cart in Magento 2

texts:
I am developing a Magento 2 shop with a (bundle) product configurator and a side bar which should contain the current cart, including shipping cost and discount (for example 5% for orders > 100€).

I already modified the bundle product view to contain the cart sidebar from the checkout (that was fun).

Basically I am at the URL checkout/cart/configure/id/251/product_id/1/. Here 251 is the cart item ID.

Now I am thinking about submitting the product configuration on every Javascript change event of the product configuration.

But I saw, that the item ID always changes. I digged down into \Magento\Checkout\Controller\Cart\UpdateItemOptions::execute and saw, that Magento removes and re-adds the cart items.

While I think my approach would basically work out in some way, it would have the draw back of excessive creation and deletion of cart items while the users is clicking around at the product configurator.

Is there a smarter way to accomplish such kind of a cart-preview during product configuration?


texts: where may I add google-site-verification?

texts: I have a html file, where and how can I add it to make it work?


texts: Installed Magento 1.9.4 via Softaculous; Any patches needed?

texts:
Magento 1.9.4

I just did a fresh install of Magento 1.9.4 via the Softaculous app in the Cpanel.

Are there any patches that I need to install next or can I proceed with installing a theme and extensions that I need?


texts:
I have an issue with a Magento store where my client would like to create more advanced configurations for checkout promotions.

Default magento stacks all promotions in priority and calculates on at a time.
Is it possible to make it so that every promotion has it's own calculation from the start?

So in short:

Apply rules separately instead of priority based
Configure which rules should be applied on incl. and excl. tax prices.

Let me give an example:

Total price (excl) = € 100,-
Tax (21%) = € 21,-
Promotion rule 1 (discount 30% incl tax) = (100 + 21) * 30% = € -36,30
Promotion rule 2 (discount 2% excl tax) = 100 * 2% = € -2,-
Final price = 100 - 36,30 - 2 + 21 = € 82,-


texts: Column 'store_id' in where clause is ambiguous when adding custom order attribute to grid and changing store

texts:
I have created a custom order attribute and I am now able to show it in the sales order grid; my previous question: Adding custom sales order attribute to order grid

If I were to change the drop down of Purchased From (Store) and try to filter the grid by a specific store, I get redirect back to the dashboard view in backend and when I revisit the sales order grid, I start getting this error:

  SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'store_id' in where clause is ambiguous

I believe the issue is with the way I join onto the sales_flat_order table:

protected function _prepareCollection()
{
    $collection = Mage::getResourceModel($this->_getCollectionClass());
    $select = $collection->getSelect();
    $select->joinLeft(array
    (
        'order' => Mage::getModel('core/resource')->getTableName('sales/order')),
        'order.entity_id=main_table.entity_id',
        array('sales_rep' => 'sales_rep')
    );
    $this->setCollection($collection);
    return parent::_prepareCollection();
}

But I am not sure how to solve this. Any ideas?


texts: Table Rate Shipping: Setting a minimum amount spend

texts: I'm setting up Table Rate Shipping for a client but they have one proviso and that's this method should not become available unless the order is at least $300 or more. I don't see a setting to turn this on. So is there a way to incorporate a minimum spend or would I have to go the extension route?


texts: How can I add mod expires to htacess but still update site?

texts:
I am looking at ways of speeding up my Magento site. One way that comes up is to Leverage Browser Caching and Expires Headers. I found to add this to htaccess-

<IfModule mod_expires.c>

# Enable expirations

ExpiresActive On

# Default directive

ExpiresDefault "access plus 1 month"

# My favicon

ExpiresByType image/x-icon "access plus 1 year?

# Images

ExpiresByType image/gif "access plus 1 month"

ExpiresByType image/png "access plus 1 month"

ExpiresByType image/jpg "access plus 1 month"

ExpiresByType image/jpeg "access plus 1 month"

# CSS

ExpiresByType text/css "access 1 month?

# Javascript

ExpiresByType application/javascript "access plus 1 year"

</IfModule>

My question is what about when I make changes? Most of my changes go to custom.css and I think I can set that individually. When I make a change to custom.css is there a way I can force people who have cached it to get the new one?


texts: Where is entity_model => sales/quote? from eav_entity_type table

texts:
I think magento saving all eav entity information From eav_entity_type table. But where is sales/quote entity information?

This eav_entity_type attribute_id is linked with eav_attribute table right?

Where is sales/quote entity information?

Could you please explain me In-detail?

Thanks.


texts: How to integrate Stripe Payment Gateway in localhost?

texts:
I want to install stripe payment gateway in my localhost, for my testing purpose. Is there any way exists to download stripe payment extension for testing purpose.

Thanks in advance.


texts: magento2 redirect from observer to custom controller

texts:
Admin login success observer redirect to my custom controller

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

    //print_r($observer);
     $message = 'entered custom method';
    $this->_logger->info($message);
    $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);

    // Your code

    $resultRedirect->setUrl($this->_redirect($this->_response, 'sample/test/index'));
    return $resultRedirect;


texts: Magento 2: Add form fields to checkout form and attach JavaScript

texts:
I would like to add a button to the checkout form just below the address fields. The purpose of this will be to get a list of possible address from the users postcode through an API. I will also need to add some JavaScript/jQuery to the form which can't be done in the conventional way since the form is generated by Knockout.js and is loaded after the DOM has finished loading.

I'd be grateful if somebody could point me in the right direction and advise what sort of approach I should be taking here. Maybe there is an example that is similar to what I'm trying to accomplish.

Many thanks


texts: Getting blank screen while trying to install Magento version 2.1.7 from Localhost in ubuntu

texts:
i am trying to install Magento version 2.1.7. I have installed appache2, mysql and php, all are running well. I used composer install to install all the dependencies required. After that i went to browser and directed through the localhost/magento2/ directory to get the setup running.

But i get a blank screen !
can anyone suggest me what else can be done ?


texts:
Is it feasible and possible to add Related product section on Checkout Page?If yes,how can we add it so that customer can add product to cart from checkout page itself.

Thank You


texts:
I'm getting following error :

( ! ) Fatal error: Uncaught Error: Class 'Varien_Profiler' not found in project\app\Mage.php on line 664

Error: Class 'Varien_Profiler' not found in project\app\Mage.php on line 664

I'm not getting any idea how to debug this error.


texts: Broken links on Grouped products (=links generated to hidden product not redirected to group)

texts:
UPDATE: I would still love to know of a better way, especially on how to do  "leave a review" on hidden simple products which were bought via a group

It's pretty much all in the question title. This does not make sense. I remember having to do manual development back in 2009 when grouped were new, but, we are now in 2016 surely this has matured?

I have this fairly classic set up:

Grouped Product visible and has all the editorial.
Individual Products (individual sku) as associated in the group
products. Not visible individually

This is on up to date Magento 1.9

They are added to cart as grouped products so that the product in the cart properly links back to the group product when clicked.

But when the order is placed, this all seems to evaporate - the order shows the individual sku products only.

Which means:

order confirmation product links to the simple, non visible product: 404 (I have removed all links for now)
request for review add ons will send links to the simple, non visible product: 404 if clicked
my account "last ordered items" has links to the simple, non visible product: 404 if clicked

This is a standard scenario, I have not extended the checkout (though some add ons might have) and at first glance it seems to be internal to Magento.

How can it create sales-killing broken links like that, when it should be able to know, on generation of the email or pages, that the product is hidden?

Where do the links in my account, and other admin links, come from? I have found a way to override product links but that does not work on the "my account" "recent products" and "leave review" links, which is not helping me as these are the links that work properly.

How can it be fixed?

Update: tested on totally vanilla Magento, and this problem happens. Also on vanilla Magento 2. links in "my account" to reorder products, and any tool trying to generate review link, goes to a 404


texts:
i have a problem after i upgrade to 1.9.1 and 1.9.2.

All the extensions and themes have problems after the update, first my pay plug-in (payU) don’t notify the purchase, all the extensions configurations can’t access by my other admin users and my theme don’t show the products on the homepage.

I thought that upgrading to the 1.9.2 version problems will be fixed but it will worse. Now all the extensions can’t see on “my account” page and the theme can’t show anything, include the main banner.

I’m really amateur on this, but, what happened? Some permissions maybe?


texts: Multiple route errors after installing PATCH_SUPEE-6788_EE

texts:
I've recently installed the latest security patch for Enterprise Edition 1.14.2.0.

Some routes get stuck. EG: "add customer" in the admin leads to a blank page (http://local.edressme.com/edressme/index.php/admin/customer/new/key/775e63f4ca795973b527bca8f11ff7e096e4a190d5e34db875cfe95033d5e999/). So does some modules buttons (and register new customer in the frontend).

I've run https://github.com/rhoerr/supee-6788-toolbox, but no success (at least in the items I've identified.)

I'm not looking for a global solution (It would be nice though). A hint on what's the problem and what's need to be done will be greatly appreciated.

Thanks!


texts: Besides using CSS trick (display:none), is there an alternative to remove country dropdown across all frontend pages simply modifying one configuration file or record in database?


texts: Some Configurable products not showing options on product page

texts:
I've manually added 20 configurable products to my store. All products use the same option for configuration, in my case "frame color." After creating the products, I went to their respective product pages and found that for about a third of the products, the ability to choose the frame color in the drop down box didn't work. Clicking on the Please choose an option drop down, shows no options available. I can find no problems with any of the simple products created. They appear identical in their setup between working configurations and those that don't.

Has anyone seen this before? Is it a known bug? If you've seen it and fixed it, I'd love to know what you did.

I've tried deleting the bad configurable products and their associated simple products and recreating them to no avail.

CE 2.1.4, no extensions installed except a theme.

This config works:

This config does not work:


texts:
some time show popup error on screen..

Getting Error Popup on frontend Magento 2.3.1


texts:
Is there any option/way in Magento EE 1.13 where customer can ship gift registry item to owner's address without seeing the actual address? I am able to add item to cart from gift registry, but I only see my addresses in the checkout and not the gift registry owner's address to gift it.

I have OneStepCheckout enabled, do you think it's because of that or Magento don't allow it at all?

Thanks


texts:
We currently run magento enterprise on a single EC2 AWS instance with an ELB out front and MySQL RDS.  We are looking to move toward a distributed load balanced environment with two magento EC2 instances so we can handle downtime and more volume.  Our ELB is setup to do round robin distribution.

My primary concern is what to do with the admin.  From what I've read it sounds like this should run on a single server to ensure the cron and observers only execute in one location.  Some put it on an alternate server instead (we don't have that luxury).  What are the recommendations for only running the admin on one of the two servers?


texts: Magento 2 Blank Checkout Page after installing payment plugin

texts:
After installing a payments plugin (Poli Payments) in Magento 2, the checkout page is now blank.

I disabled this plugin and found that the checkout page is working again.

I have now enabled the plugin with the checkout page appearing blank.

My site required this plugin.

Does anyone have any suggestions on how to fix this issue?


texts: Magento 2 : How to get Category From CategoryFactory without Using Load() Function in Loop

texts:
I want to load all category from CategoryFactory and I'm using for loop to do that, but it's not good to load category in loop. Is there any another ways to get category from CategoryFactory.
Here is my function:

foreach ($this->categoryCollection->create() as $category) {
            //Load category instance
            $categoryId = $category->getData('entity_id');
            $_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
            $categoryData = $_objectManager->create('Magento\Catalog\Model\Category')->load($categoryId);
    //do somthing here..
}


texts: Magento 2: what are the benefits of using service contracts?

texts:
So as some of you may know, Magento 2 recommended way to deal with models/collections for CRUD actions is to use service contracts.

But still according to the Magento SE Q&A it seems like most people tend to use the model/resource model/collection directly instead.

As an example to load a quote I can do it directly via the factory like this:

$this->quoteFactory->create()->load($quoteId);

Where $this->quoteFactory is an instance of \Magento\Quote\Model\QuoteFactory

But I can also do it via service contract like this:

$this->quoteRepository->get($quoteId);

Where $this->quoteRepository is an instance of \Magento\Quote\Api\CartRepositoryInterface

So my questions is what are the benefits of using service contracts over factories ?


texts:
Under my Catalog Price Rules we have a daily special being applied to 2 categories. The issue we're having is at the top of the page we see:

There are rules that have been changed but were not applied. Please, click Apply Rules in order to see immediate effect in the catalog.

Clicking apply executes for a very long time. I extended the php execution and apache timeouts so there is no 500 returned, however, the apply button just doesn't appear to function at all. I really wish I had more information on this issue, but nothing shows up in the system.log or exception.log.

If anyone has any insight into what might cause this function to hang indefinitely, it would be greatly appreciated.


texts: Cannot create new module in magento2 - php bin/magento setup:upgrade

texts:
I followed exactly this setup:
https://github.com/magento/magento2-samples/tree/master/sample-module-minimal
and added the registration.php file, and run php bin/magento module:enable Company_Basic, but after I run php bin/magento setup:upgrade I get the following error:

[PDOException]
  SQLSTATE[HY000] [2002] No such file or directory

If I change from localhost to 127.0.0.1 in env.php I get:

[Zend_Db_Adapter_Exception]
  SQLSTATE[HY000] [2002] Connection refused

Now the website throws this error:

Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Company_Basic

I'm using mamp. I installed magento2 ok, but now it appears that mysql is connecting. Any ideas? Thanks!

Update: If I run /Applications/MAMP/Library/bin/mysqld --version
I get

/Applications/MAMP/Library/bin/mysqld  Ver 5.6.25 for osx10.6 on x86_64 (MySQL Community Server (GPL))


texts:
I've been migrating products from Magento 1.7 to 2.1 using a series of scripts I've written.

The image migration stage appeared to work correctly - the images were copied into their relevant directories, and show up in the back-end when you edit a product.

However, they don't appear on the front end, which just shows a single placeholder image. I've tried clearing the cache, reindexing, deploying static files, using different themes, all to no avail.

Has anybody else had this problem and found a solution?

Edit: I tried adding a product manually through the admin interface, and it did appear on the product page.


texts: How can I store product custom price with tax in an order?

texts:
I modified the products price in my custom module. How can I store correctly the product price with tax in the order?
I need to store the net amount and tax amount separately for each product in the order.
It is necessary create a tax class for do this ?
In which event it is the better to do this ?


texts:
I want to change price-options on custom options price to per character.

example:
Custom Options price set to $20 and max character is 10. If total character is 5, Custom Options price will be calculate ($20 * 5).


texts: Add category path to breadcrumbs on product view page

texts:
By Default Manual Navigation Products breadcrumb looks like,

Wanted product detail page:

When I reached to product page using by search the breadcrumb  looks like,

Current product detail page:

How can I get Complete Breadcrumb of the desired products even reached
 by search?


texts: Not able to create configurable product with more than 30+ variations

texts: While creating configurable products with more than 30+ variation and click on save. The variable products were created and the configurable product was missing, I cant able to create new configurable product. Does anyone have solution for this?


texts: Admin Panel - Product Edit - Module to remove selected tabs based on user role

texts:
I'm trying to develop a module which will hide selected product edit tabs for a particular user role when they are logged into the administration panel (Catalog> Products< Edit).

I have the code below, and I can tell the module is active but the module is having no affect at the moment and I'm not sure where I am going wrong.

config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <tww_RemoveProductTabs>
            <version>0.1.0</version>
        </tww_RemoveProductTabs>
    </modules>
    <global>
        <models>
            <tww_RemoveProductTabs>
                <class>tww_RemoveProductTabs_Model</class>
            </tww_RemoveProductTabs>
        </models>
        <events>
            <core_block_abstract_prepare_layout_after>
                <observers>
                    <tww_RemoveProductTabs>
                        <class>tww_RemoveProductTabs/observer</class>
                        <method>removeTabs</method>
                        <type>singleton</type>
                    <tww_RemoveProductTabs>
                </observers>
            </core_block_abstract_prepare_layout_after>
        </events>
    </global>
</config>

tww_RemoveProductTabs.xml

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

Observer.php

<?php
class tww_RemoveProductTabs_Model_Observer
{
    public function removeTabs(Varien_Event_Observer $observer)
    {
        // Get the users role id
        $admin_user_session = Mage::getSingleton('admin/session');
        $adminuserId = $admin_user_session->getUser()->getUserId();
        $role_data = Mage::getModel('admin/user')->load($adminuserId)->getRole()->getData();

        // if lower admin user
        if($role_data == 4)
        {
            $tabBlock = $evt->getEvent()->getBlock();

            if ($tabBlock instanceof Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs)
            {
                $tab_ids = $tabBlock->getTabsIds();
                $tabs_to_hide = array('inventory');

                foreach ($tab_ids as $tab)
                {
                    if(in_array($tab, $tabs_to_hide))]
                    {
                        $tabBlock->removeTab($tab);
                    }
                    else
                    {
                        $tabBlock->setActiveTab($tab);
                    }
                }
            }
            // tesing
            $tabBlock->removeTab('related');
        }
    }
}

Any ideas would be greatly appreciated. Thanks.


texts:
I am developing one website which has many products and customers. So many customers are posting reviews.

I have to auto approve this review, but not getting how to achieve this.

Please give me some hints or suggestion.


texts:
I get QA review as below:
example/module-mymodule/UiC/DataProvider.php
is too similar to the Magento 2 file
magento/module-cms/magento-module-cms-103.0.0-beta32/Ui/Component/DataProvider.php

Since this file edits public function, you can avoid duplicating code using Magento 2's plugin structure: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html or use class preferences.

Can anyone explain, what it try to say?
The file which they refer is below
<?php

namespace Example\MyModule\Ui\Component;

use Magento\Framework\Api\Filter;
use Magento\Framework\Api\FilterBuilder;
use Magento\Framework\Api\Search\SearchCriteriaBuilder;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\AuthorizationInterface;
use Magento\Framework\View\Element\UiComponent\DataProvider\Reporting;

/**
 * Component DataProvider
 * @api
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 * @since 100.0.2
 */
class DataProvider extends \Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider
{
    /**
     * @var AuthorizationInterface
     */
    private $authorization;

    /**
     * @var AddFilterInterface[]
     */
    private $additionalFilterPool;

    /**
     * @param string $name
     * @param string $primaryFieldName
     * @param string $requestFieldName
     * @param Reporting $reporting
     * @param SearchCriteriaBuilder $searchCriteriaBuilder
     * @param RequestInterface $request
     * @param FilterBuilder $filterBuilder
     * @param array $meta
     * @param array $data
     * @param array $additionalFilterPool
     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
     */
    public function __construct(
        $name,
        $primaryFieldName,
        $requestFieldName,
        Reporting $reporting,
        SearchCriteriaBuilder $searchCriteriaBuilder,
        RequestInterface $request,
        FilterBuilder $filterBuilder,
        array $meta = [],
        array $data = [],
        array $additionalFilterPool = []
    ) {
        parent::__construct(
            $name,
            $primaryFieldName,
            $requestFieldName,
            $reporting,
            $searchCriteriaBuilder,
            $request,
            $filterBuilder,
            $meta,
            $data
        );

        $this->meta = array_replace_recursive($meta, $this->prepareMetadata());
        $this->additionalFilterPool = $additionalFilterPool;
    }

    /**
     * @deprecated 101.0.7
     * @return AuthorizationInterface|mixed
     */
    private function getAuthorizationInstance()
    {
        if ($this->authorization === null) {
            $this->authorization = ObjectManager::getInstance()->get(AuthorizationInterface::class);
        }
        return $this->authorization;
    }

    /**
     * Prepares Meta
     *
     * @return array
     */
    public function prepareMetadata()
    {
        $metadata = [];

        /**
        * Instead of Creating Seperate ACl access, CMS authorization is used 'Magento_Cms::save'
        */
        if (!$this->getAuthorizationInstance()->isAllowed('Magento_Cms::save')) {
            $metadata = [
                'mymodule_post_columns' => [
                    'arguments' => [
                        'data' => [
                            'config' => [
                                'editorConfig' => [
                                    'enabled' => false
                                ]
                            ]
                        ]
                    ]
                ]
            ];
        }

        return $metadata;
    }

    /**
     * @inheritdoc
     */
    public function addFilter(Filter $filter)
    {
        if (!empty($this->additionalFilterPool[$filter->getField()])) {
            $this->additionalFilterPool[$filter->getField()]->addFilter($this->searchCriteriaBuilder, $filter);
        } else {
            parent::addFilter($filter);
        }
    }
}


texts: Overwriting the uploaded files with same name in ui-component forms

texts:
I have a UI-component form for admin which has a field to upload image/file. The file uploading is working all right, after saving the form the name of the image is saved in the database.
The issue comes when I upload an image with such a name which is used by another previous record, then the file gets updated for both the records.

I want to know, how Magento makes these names unique?


texts: How can i get all product options on the home page?

texts:
I've done quite a lot of searching on this but cannot find what seems the best (standard clean) method for adding a product's details to the homepage. By this I mean a way to add all of the info that is available on the view.phtml product page (e.g. add to cart button, product options, description, etc) to the home page.

I've discounted overriding the index controller (within a module), e.g. -

public function indexAction($coreRoute = null) {
  $this->getResponse()->setRedirect('/catalog/product/view/id/42');
   return;
}

As this can only provide for one product option (when I have 3). But as a compromise solution and to improve my understanding I have tried to create an add to cart button programatically using this - http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/catalog/adding_a_product_to_the_cart_via_querystring - with this code:

<form action="<?php echo Mage::getUrl('checkout/cart/add', array('product'=>1,'qty'=>1,'options'=>array('-5071'=>3))) ?>" method="post">
<input type="hidden" name="product" value="1" />

<fieldset class="add-to-cart-box">
<input type="submit" title="<?php echo $this->__('Add to Cart') ?>" class="addtocart" />
</fieldset>
</form>

But this either redirects me to the product page with the error: "Please specify the product's required option(s)" or sends me to an empty shopping cart. I am not sure if this is because this method only works with simple products (when I am using a virtual product) or I have the syntax on the "options" array wrong. The option input tag is:

<input id="options_-5071_2" class="radio validate-one-required-by-name product-custom-option" type="radio" price="0" checked="" value="3" name="options[-5071]" onclick="opConfig.reloadPrice()">

So to clarify:

a) get product options on the home page (e.g. add to cart button, product options, description, etc);

b) an option of programatically adding a (virtual) product to cart (with stipulated product option). Many thanks.


texts: Can I and should I call Block methods from its' View Model?

texts:
I have a template and should write some logic.
I have made a view model and I'm calling it from a template.
Should I call block methods from the view model?
And if so, how can I do it?


texts: Danish letter ø is shown as � in related products

texts:
I'm having a really weird problem with the letter 'ø' in my related products view. For some products, not all just some, this letter is shown as � instead. I have found the entries in the database where everything seems fine, the related.phtml file is UTF-8 the string is echoed like this:

echo $this->htmlEscape($_item->getName());

Any ideas?

EDIT: Echoing the names without htmlEscape doesn't make any difference either.


texts: How to Create Cart Price Rule Conditon in backend Configrations(system.xml)?

texts: How to Create Cart Price Rule Conditon in backend Configrations system.xml


texts: Catalog Search Database Issues - Cleaning Out Useless Data

texts:
We recently encountered an issue on our Magento site a believe we encountered some type of security or SPAM attack on the search feature of our site, which was overpopulating our mage_catalogsearch database with useless data.

Below is the data for the following tables in phpMyAdmin:

phpMyAdmin (database teamss5_mage1)

mage_catalogsearch_query       1,782,506        InnoDB utf8_general_ci       215.5 MiB
mage_catalogsearch_result       700,538           InnoDB utf8_general_ci         47.6 MiB

You can see that these rows are storing a considerable amount of data. We are trying to keep our database size down as low as possible to allow for optimal site performance.

When logging into the Magento admin, we are also noticing that when navigating to "Catalog > Search Terms" there are 89,126 pages and a total of 1,782,506 records found. Which seems to be an incredibly unusual large amount of data.

Does anyone have any idea what could have caused this and how we can clean out these pages and records so we can keep our Magento site optimized. Is it possible to truncate or delete these records without affecting our website and causing it to crash? And if so how?

Please let us know what can be done to resolve this issue, any assistance is greatly appreciated!

You can also see the below image link screenshots to better understand the issue:

http://www.elevatemediastudio.com/support/ssc/catalog-search-terms-page.jpg

http://www.elevatemediastudio.com/support/ssc/admin-search-terms-menu.jpg

http://www.elevatemediastudio.com/support/ssc/php-admin-view.jpg


texts:
I'm trying to import a CSV file with new products that contain local images but I am receiving the following error:

Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s):
General system exception happened
URL-key for specific store already exists.

I've read a lot but nothing seems to work. Note that every time I did a failed import I truncated the product tables in database. This is what I've tried/already did:

The images are in the pub/media/import folder as the documentation tells us to
I've changed the chmod of these images to 777 just in case
The csv file is UTF-8
The image doesn't contain the path in the CSV, just the file name (e.g. 12356.jpg)
Checked my categories to make sure they match the existing categories in my store
Tried adding other image fields as well instead of just 'base_image' as I did at first to make sure I wasn't missing required fields
Turned the CSV file into one line to check if this would work (which it didn't)

What am I doing wrong?


texts: Showing custom block/message on shipping method section in Magento 2

texts:
I have some business logic after entering shipping address or select shipping address, for these, I override the _formRateRequest and setRequest methods from core class \Magento\Fedex\Model\Carrier in my custom module, and my business logic is working. After successfully validated I need to show the custom block or custom message in shipping method section after shipping address entered or select.

But here I confusing how to start and where to start?

Any suggestions? on this.


texts: How to issue "programmatic" solutions in Magento?

texts:
Using Community Edition 1.7.0.2

I found a solution for modifying a customer's password outside of issuing password reset emails.

   $write = Mage::getSingleton('core/resource')->getConnection('core_write');
   $passphrase = "topsecretpassword";
   $salt = "SC";
   $password = md5($salt . $passphrase) . ":SC";

   $write->query("update customer_entity_varchar set value='$password' where entity_id=$customer_id and attribute_id in (select attribute_id from eav_attribute where attribute_code='password_hash' and entity_type=1)");

But I'm not sure where to store this script or how to execute it. I've seen other programmatic solutions similar to this but do not recall the method they used to implement them. Thank you.


texts: How to configure multiple table rate and multiple type shipping in Magento 2?

texts:
I am using Magento 2.0.2 and I'd like to configure multiple table rates with multiple types of shipping. Please see my shipping options below

If you have any suggestion or any free extension that will be really helpfull.
Thank you!


texts: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry - Magento 2

texts:
I'm trying to setup my crons for Magento 2.2.2, but nothing seems to be updating.

I have created cron in cPanel, like below, each once per minute:

/usr/local/bin/php /home/userishere/public_html/bin/magento cron:run | awk '{ print strftime("\%Y-\%m-\%d \%H:\%M:\%S"), $0; fflush(); }' 2>&1 >> ~/magento_cron.log

/usr/local/bin/php /home/userishere/public_html/update/cron.php | awk '{ print strftime("\%Y-\%m-\%d \%H:\%M:\%S"), $0; fflush(); }' 2>&1 >> ~/magento_cron.log

/usr/local/bin/php /home/userishere/public_html/bin/magento setup:cron:run | awk '{ print strftime("\%Y-\%m-\%d \%H:\%M:\%S"), $0; fflush(); }' 2>&1 >> ~/magento_cron.log

I check the scheduale in PhpMyAdmin to see this:

Error:

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4639-168-1-283-4639' for key 'PRIMARY', query was: INSERT INTO
  `catalog_product_index_eav_temp` (`entity_id`,`attribute_id`,`store_id`,`value`,`source_id`) VALUES (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?),

Any ideas where I'm going wrong? If you need more info please let me know.


texts: Magento2:importing csv category include in menu enable

texts:
when i import product's csv. All products and category created successfully also all categories include in menu. I want when i import csv , all thing will be done , but not include in menu categories.
How can i stop categories to include in menu while importing the product's csv.


texts: How to run direct SQL query on magento and bind WHERE IN params?

texts:
I have an array like this:

$stockUpdates = [
    'DVD-UBOX-UK'  => 37,
    'DVD-UCARD-UK' => 39
];

For these skus, I need to know their product ID's, so ran the following script to run a direct sql query on magento core_read connection with parameter binding like this:

  // Load db resource
  $resource   = Mage::getSingleton('core/resource');
  $readConn   = $resource->getConnection('core_read');
  $cpe_table  = $resource->getTableName('catalog_product_entity');

  // Parse sku product ids
  $result = $readConn->query(
        "SELECT entity_id, sku FROM $cpe_table WHERE sku IN (:skuList)",
        array('skuList' => array_keys($stockUpdates)));
  while ($row = $result->fetch()) {
        var_dump($row); // debug test
  }

When the script executes, it looks like this (not what I was expecting):

All I am trying to do is get a list of entity_id, sku for an array of sku list I have. What am I doing wrong here?


texts: Magento Configurable Product: Add custom options in cart like separate item

texts:
I set up a configurable product in Magento, I add in associated products colors and button and in custom options I add 3 options.

In frontend my product look like in this image:

All I want is when I select one of the 3 options (Sim Cards) for example when I select Vodafone and press add to cart, the custom option not have the price, I want to be added in cart like a separate product.

My cart now is

So I want to have this Vodafone Custom Option Separate with their own order and their price. My cart need to be like this

I need this vodafone option to have their own price and order because Is a sim card and their payment must to be montly.


texts:
Where can I create a Maintenance Page and activate it in Magento Admin?
I'm using magento enterprise edition 1.14 version

Thanks!


texts:
my magento2 is reading mariadb server and database is connected to that, I am trying o use mysql instead but I had no luck, it does not recognize the database at all although I have added the following:

    'db' => [
    'connection' => [
        'indexer' => [
            'host' => 'localhost',
            'dbname' => 'm2',
            'username' => 'user',
            'password' => 'xxx',
            'model' => 'mysql4',
            'engine' => 'innodb',
            'active' => '1',
            'persistent' => NULL
        ],
        'default' => [
            'host' => 'localhost',
            'dbname' => 'm2',
            'username' => 'user',
            'password' => 'xxx',
            'model' => 'mysql4',
            'engine' => 'innodb',
            'active' => '1'
        ]
    ],
    'table_prefix' => ''

I also tried using a new user name and password for only mysql to make it understand to read from there but still it is connecting to mariadb instead.

How can I switch it to mysql? my mysql version is 5.7.28 and my magento version is 2.3.1

In Abstract.php line 128:

SQLSTATE[HY000] [1049] Unknown database 'm2'

how can I switch so it understands to read from mysql server instead of mariadb?

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\Setup\De
claration\Schema\Db\SchemaBuilder::processReferenceKeys() must be of the type ar
ray, null given, called in C:\wamp64\www\scosche-industries\vendor\magento\frame
work\Setup\Declaration\Schema\Db\SchemaBuilder.php on line 127 and defined in C:
\wamp64\www\scosche-industries\vendor\magento\framework\Setup\Declaration\Schema
\Db\SchemaBuilder.php:137
Stack trace:
#0 C:\wamp64\www\scosche-industries\vendor\magento\framework\Setup\Declaration\S
chema\Db\SchemaBuilder.php(127): Magento\Framework\Setup\Declaration\Schema\Db\S
chemaBuilder->processReferenceKeys(NULL, Object(Magento\Framework\Setup\Declarat
ion\Schema\Dto\Schema))
#1 C:\wamp64\www\scosche-industries\vendor\magento\framework\Setup\Declaration\S
chema\SchemaConfig.php(66): Magento\Framework\Setup\Declaration\Schema\Db\Schema
Builder->build(Object(Magento\Framework\Setup\Declaration\Schema\Dto\Schema))
#2 C:\wamp64\www\scosche-industries\vendor\magento\framework\Setup\Declaration\S
chema\UpToDateDe in C:\wamp64\www\scosche-industries\vendor\magento\framework\Se
tup\Declaration\Schema\Db\SchemaBuilder.php on line 137


texts:
Magento2 How could I impliment a module which disables any product with a zero price?
Or if a module exists already to address this, please let me know.


texts:
i have a custom css for specific page which is category product page, i want to include this css only when i load this page, as i know the page is located in theme/default/template/catalog/category/page.phtml, is there any way to do this ?

basically i have to include it like this in my phtml:

<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl('style/reset.css'); ?>" />


texts: How Do I Merge Two Separate Magento Databases

texts:
Problem

I am trying to combine two Magento version 1 stores from separate domains. My goal is to combine the two existing sites into one so that it can be hosted on a new domain and after all the data is in one database run the migration tool to get to Magento version 2.

Environment

I have exported both stores live databases and imported one of them into a Docker instance (alexcheng/magento) so that I practice merging the data offline so that when I figure it out I can take the sites down for the actual merge and minimize down time.

Considered Options

MySQL Dump Database A and Merge Into Database B

When I try to take a mySQL dump of site A and import it to site B I am getting integrity check errors because they have conflicting primary/foreign keys. I believe that I can update the primary keys on database A by an offset before merging with Database B to overcome this issue. I believe that I need to cascade the changes so it updates all the foreign keys related to that primary key but I am unsure how to do this with many tables in the database.

Export Customers and Products from Magento Administrator Panel

I have read about exporting the Customers and Products to a CSV file from the Magento Administrator Panel. I believe that I can export site A to a CSV backup and then import to site B. I am worried that this will not retain order history.

Questions

Which solution would be more effective to merge all the data from both sites? Is there a better way that I am just overlooking? What resources would be best for me to research to achieve my end goal?

Thank you for taking the time to read this and help! This is my first post to any StackExchange site so if I haven't presented my problem properly please let me know and I will do my best to correct it.


texts: Retrieving title of static block without getModel()

texts:
I have a setup where I am running a multi store system but I need different frontpages for every store. So I got my phtml-template sitting around and getting dynamically filled.

Now I added three more blocks (left, middle, right) on the frontpage and want to use the static block title as a heading for those blocks. (Maybe using the block title isn´t smart at all, I don´t know, guide me. :-))

When I am using the following code, I have output from different stores in place of my title:

      <?php echo Mage::getModel('cms/block')->load('startseite_links')->getTitle() ?>

      <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('startseite_links')->toHtml() ?>

I wondered if there is another (simple) way to output the block title to use it as a heading. Whenever I search for outputting the block title I just stumble upon the getModel()-approach.

Any other ways to go? Or better drop block titles as headings?


texts:
I'm using this code to export customers to CSV.

I would like to add an extra column that is the CUSTOMER GROUP.
Currently, I added "group_id" and it works but only shows the ID (a number). I would like to show the text.

  For this you can create your php script, create one php file on root
  directory of your website and use following code.for ex: if file name
  is exportCustomer.php and your url is like http://magentowebsite.com
  then after placing this file in root you need to visit url like
  http://magentowebsite.com/exportCustomer.php then you will get a csv
  in your root directory with name as customers.csv

<?php
require_once('app/Mage.php');
umask(0);
if (!Mage::isInstalled()) {
    echo "Application is not installed yet, please complete install wizard first.";
    exit;
}
// Only for urls // Don't remove this
$_SERVER['SCRIPT_NAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_NAME']);
$_SERVER['SCRIPT_FILENAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_FILENAME']);
Mage::app('admin')->setUseSessionInUrl(false);
Mage::setIsDeveloperMode(true); ini_set('display_errors', 1); error_reporting(E_ALL);
try {
    Mage::getConfig()->init();
    Mage::app();
} catch (Exception $e) {
    Mage::printException($e);
}
ini_set('memory_limit','500M');
$customerCount = 0;
try{
    //configure the collection filters.
    $collection = Mage::getResourceModel('customer/customer_collection')
    ->addAttributeToSelect('firstname')
    ->addAttributeToSelect('lastname')
    ->addAttributeToSelect('email')
    ->addAttributeToSelect('store_id');
    //Add a page size to the result set.
    $collection->setPageSize(50);
    //discover how many page the result will be.
    $pages = $collection->getLastPageNumber();
    $currentPage = 1;
    //This is the file to append the output to.
    $fp = fopen('customers.csv', 'w');
    $addedKeys = false;
    do{
         //Tell the collection which page to load.
         $collection->setCurPage($currentPage);
         $collection->load();
         foreach ($collection as $customer){
            //write the collection array as a CSV.
            $customerArray = $customer->toArray();
            $customerREquiredArray['First name'] = $customerArray['firstname'];
            $customerREquiredArray['Last name'] = $customerArray['lastname'];
            $customerREquiredArray['Email'] = $customerArray['email'];
            $customerREquiredArray['Store ID'] = $customerArray['store_id'];
            if($addedKeys == false){
                $keys = array_keys($customerREquiredArray);
                fputcsv($fp, $keys);
                $addedKeys = true;
            }
            //var_dump($customerArray); echo "\n\n";
            fputcsv($fp, $customerREquiredArray);
            //fwrite($fp,print_r($customerArray,true) . chr(10) );
            $customerCount++;
         }
         $currentPage++;
         //make the collection unload the data in memory so it will pick up the next page when load() is called.
         $collection->clear();
         //break; //DEBUG
         echo "Finished page $currentPage of $pages \n";
    } while ($currentPage <= $pages);
    fclose($fp);
} catch (Exception $e) {
    //$response['error'] = $e->getMessage();
    Mage::printException($e);
}
echo "Saved $customerCount customers to csv file \n";


texts: How to Put Product Manually and send mail when user subscribe newsletter in magento2

texts:
In magento2 when a customer subscribes newsletter at that time "successfully subscribe message" sent to customers.
This is Default functionality of Magento2

Here I want to send the specific product in subscription mail when the customer subscribes newsletter.


texts: how to get order collection in custom module ? like My Orders collection in customers dashboard (frontend). this collection how to get?


texts: Google Adword Injection Issue on Magento

texts:
I am having a problem with my Magento store. Every morning I have to delete an ad script from my config > design > footer scripts

I'm not placing this script there and somehow it comes back every morning.

Any Ideas how I can stop them? The google ad info on the script isn't even mine.


texts:
we need to breakdown UK in shipping methods as a specific county as we offer free UK delivery except off mainland but Magento recognises everything including N. Ireland and Scottish Highlands which we have to charge a premium for.
Whats the best practise please?
Many thanks,
Chris


texts: How to get product collection outside of Magento2

texts:
In Magento 1 I can use

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

Where is the new "/app/Mage.php" in Magento 2?
What file I have to include in my external PHP file?


texts: Shop crashes SQLSTATE[HY000] in error reports

texts:
I am having a lot of crashes on my server lately. Restarting the server does bring it back up. But offcourse I would like a permanent solution. My var/logs is being "flooded" with errors like thes two:

SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock
SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'waiting for initial communication packet', system error: 95

The shop is running on a VPS. Which did the trick for a couple off years without errors. It is not a high traffic shop and it has a couple off hundred products.

The logs are close to empty at this moment and also all caches and database tables which can be cleaned have been cleaned.

Is this a matter  off getting a heavier server or is there another problem which I have not been able to track down at this moment?

FYI: In the recent past the shop has been hacked. Maybe there is a connection? The shop is running on Magento 1.9.1 with all security patches.


texts: Tables permission_block and permission_variable not created after SUPEE-6788

texts: After applying the Magento patch SUPEE-6788, I find that the tables permission_block and permission_variable are not created in the database. How should I start investigate this problem? (The Magento version is 1.9.0.1)


texts:
I'm having issues with a site that has recently moved to a new host. The hosting company say it's not their issue but I'm a bit stuck for ideas.

i'm not quite sure how to post a full set of logs here but any help is appreciated!

Invalid method Mage_Catalog_Block_Product_View::_isSecure(Array
(
)
)

Trace:
#0 /var/www/vhosts/<DOMAIN>/httpdocs/app/design/frontend/base/default/template/catalog/product/view.phtml(42): Varien_Object->__call('_isSecure', Array)


texts: REST products web service filter by Price Attribute

texts:
Magento 1.9 provides a web service for products but the response parameters that are different for customer/guest and admin.

The problem is that there is a price field in Admin response that gives the exact price of the product while there is no direct price field response in Customer/guest due to which the price filter on the guest response is not working. The fields provided for customer/guest is regular_price_with_tax, regular_price_without_tax, final_price_with_tax and final_price_without_tax and filter cannot be applied on basis of these.

www.magentohost.com/api/rest/products?order=regular_price_with_tax&dir=dsc

does not change the output and

www.magentohost.com/api/rest/products?order=price&dir=dsc

throws an error. Filter for name is working fine and gives required output.

Is there any way by which the price filter can work for guest and customer?


texts: Magento Multi store configuration not Working

texts:
I am using Magento to host three different stores, on LAMP stack.

I have created 3 different websites and store views in Magento backend ( All having different DN ). There is a functionality to switch among stores, ie if user is on store 1 and clicks on store 2 he/she/it should redirected to respective page on store 2.

Currently, whenever user clicks on different store link, it is taking back to same store.

I tried setting up different host entries for each domain name, associating a variable in server vhost and loading store based on url requested ( through php $_Server[referer] but with none I have been successful. Please guide me if you have faced similar problem in past and know if I am missing something. Any constructive comment is welcomed.


texts: Convert Color and Size attribute dropdown values to Button links

texts:
I have created configurable products based upon Size and Color attribute. When I access the product detail page, I see there are two dropdowns, one for Color and other for Size. Now I want to change that from Dropdown to Button Links.

How should I implement this?


texts: how add new address form data is inserted to database on form submit in onestepcheckout magento 1.9

texts:
In onestepcheckout page if a user has saved addresses then the saved addresses are shown in a select box with an additional option of "Add new address". Screenshot

I am using Idev->Onestepcheckout extension. "Enable AJAX save billing" option is made yes from admin panel.

Now my problem is when I click on saved addresses and check chrome's network tab then I can see a action being hit i.e. save_billing.
This action has the code for submitting the selected address to database.

Now If I select add new address option then I get a form where I can fill new address. This form is now submitted at the last after all the options are selected such as payment_method and shipping_method.
But I could not locate the code how this form's data is submitted to database.
My form action is "https://example.com/onestepcheckout/" .
I checked index action of index controller in onestepcheckout module but I could not find any code there which is responsible for saving the above data to database. Anyone could help me in finding how the form data is saved.


texts: Magento 2 getFullActionName() not working when FPC is enabled

texts:
I have an observer subscribed to controller_front_send_response_before event. in the observer i'm trying to call the page type by getFullActionName() method. But when the magento FPC is enabled, its returning empty. when i'm disabling the FPC, it is working fine as expected.
here is my code
events.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="controller_front_send_response_before">
        <observer name="vendor_module" instance="Vendor\Module\Model\Observer" shared="false" />
    </event>
</config>

Model/Observer.php
<?php

namespace Vendor\Module\Model;

use Magento\Framework\App\Http\Context;
use Magento\Framework\App\Request\Http as HttpRequest;

class Observer implements \Magento\Framework\Event\ObserverInterface
{
    protected $_helper;

    public function __construct(
        \Vendor\Module\Helper\Data $helper
    )
    {
        $this->_helper = $helper;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $response = $observer->getEvent()->getData('response');
        $request = $observer->getEvent()->getData('request');
        $fullActionName = $request->getFullActionName();
        $response->setBody($fullActionName);
    }
}

Do you have any suggestion how should I achieve the desired result by keeping FPC is enabled?


texts:
I am new in magento extension development .

How i access street value in edit.phtml of 'id=street_1' textfeild in Edit block .

Please give me suggestion in detail.

Thanks.


texts: I have created a module with CRON job but no CRON set on my server how we can set CRON in Magento 2 using SSH.


texts: How to check if Product Attribute is equal to

texts:
Brief

On a Product Page, I want to check if a Product Attribute is equal to a specific value. And then output the appropriate text.

Where I'm at so far

<?php
// Helper for Checking Product Attribute
$_product = $block->getProduct();
// Get Product Attributes
$shape = $_product->getShape();
?>

<?php if ($shape == 'Round'): ?>

        I am Round

<?php elseif ($shape == 'Square'): ?>

        I am Square

<?php else: ?>

        Else

<?php endif; ?>

Issue

Despite checking a product that is either Square or Round, the output only displays Else. Therefore, my code isn't checking the attribute correctly.


texts:
I've created a Magento 2 module and I set up a class that extends Magento\Framework\DataObject that I'm using to pass data between my helper (e.g. Package\Module\Helper\Data) and model (e.g. Package\Module\Model\Total\Checkout\Total).

It's just nicer syntax then passing an array back and forth, allows me to keep my code DRY, and adds some free functionality (like toJson()).

For now I've placed it in the Model directory (e.g. Package\Module\Model\Data\MyData).

My question is: Where is the best place to put a class that doesn't seem to belong in any of the traditional module folders? Its location should make it's role apparent to the next developer who works on this code before they even look at its contents. Is there an existing construct?


texts:
I have a conflict between 2 js files. I have 2 modules Ced_Storepickup & Bss_Onestepcheckout & both modules are using

js/model/shipping-save-processor/default.js

file.

What is the proper way to set both files functionality?


texts: Grand total is not changing using observer on checkout page in Magento 1.8

texts:
I am using event observer on checkout page for modifying grandTotal on checkout page
config.xml

<?xml version="1.0"?>
<config>
<modules>
    <Ranosys_SpecialPrice>
        <version>0.1.3</version>
    </Ranosys_SpecialPrice>
</modules>

<global>
    <events>
        <payment_method_is_active>
            <observers>
                <observer>
                    <type>singleton</type>
                    <class>Ranosys_SpecialPrice_Model_Observer</class>
                    <method>paymentmethod</method>
                </observer>
            </observers>
        </payment_method_is_active>
    </events>
</global>

Observer.php

<?php

class Ranosys_SpecialPrice_Model_Observer {

public function paymentmethod(Varien_Event_Observer $observer)
{
    $method = $observer->getEvent()->getMethodInstance();
    $quote = $observer->getEvent()->getQuote();
    if($method->getCode()=='cashondelivery')
    {
        $quote->setGrandTotal(round($quote->getGrandTotal()));
        $quote->save();
        Mage::log(var_export($quote->debug(), TRUE), null, 'order.log');
    }
    return $this;
}
}

When I check order.log it is showing round of value of grand total but it is not showing on checkout page. How can I show changed grand total on checkout page.


texts: Enterprise Edition doesn't showing Manage Existing Extensions in Magento Connect?

texts:
I have Magento Enterprise Edition. In my magento Connect manager panel doesn't showing Manage existing extensions, even though I hit the Check for Update  button. But doesn't showing existing extensions.

But I have magento community edition also in this showing Manage existing extensions. If I hit the Check for Update  button.showing existing extensions and new version information.

But Magento Enterprise Edistion doesn't showing why?

can any one tell me how to upgrade 1.12 to 1.13?

Thanks in advance.


texts: Magento 1.9: Merge CSS breaking frontend UI

texts:
Recently I tried enabling CSS merge inside System->Configuration->Developer

But this is breaking complete UI in front end. ** It seems like CSS os having issues & I have to make CSS error free**.

Can anyone list out what points have to check in CSS to avoid such issues.


texts: How to detect the page handle in my observer?

texts: I want to avoid the execution of my observer in case the page handle contains checkout or catalog, how could I do it?


texts: How to Directly show price from Customization option in Magento 2?

texts:
While creating customization product we usually add the extra charge required than the base charge.
Lets say Mobile Case= 100, Extra Printing Charge= 20. So we write 20 in the Customization option.

My requirement is that I will write 120 directly in the customization option. Means it will show the amount written in the Option, not adding it with the base.

How is it possible?


texts: Is it possible to disable plugins defined in di.xml programatically?

texts:
Given a plugin defined in di.xml such as the following:

<type name="\Magento\Catalog\Model\Product">
    <plugin name="se_catalog_product_plugin_ample"
            type="Example\Module\Model\Plugin\Catalog\Product"
            sortOrder="10"
            disabled="false" />
</type>

How can I disable this defined plugin programatically (so not via di.xml but in code)? So when Magento comes round to processing the se_catalog_product_plugin_ample plugin, it is disabled, as if the node above had disabled="true".

I need to be able to alter this plugin programatically due to the requirement of reacting to store config differing in seperate store views in use in the environment. This config can't be reacted upon in di.xml (as far as I know).

Not sure if this is even possible. I know it would be possible to add logic inside the plugin to just $proceed() based on whatever condition needed, but this is one module wanting to disable another that I don't want to have tightly coupled. i.e. the module Example_Foo wants to disable a plugin in Example_Module.


texts: Magento 2 - Cart price rules promotion rule based on specific category products added specified

texts:
I am new to Magento 2 and working with cart price rules but unable to get the required results.

1- I would like to apply 5% discount if more than 30 and less than 60 units added from specified category and 10% discount if more than 60 and less than 500 units of products added from specified category.

i.e.
 there are five products P1, P2, P3, P4, P5 in Catagory id 3
if customer adds
9 units of P1
6 units of P2
5 units of P3
5 units of P4
5 units of P5
He will get 5% discount only on above
or if he added above units quantity more 60 > 500 he will get 10% discount.

But when i added 10 units of other products with 20 units of specified category. it enable discount because of total units in count in cart is 30.

Discount should not be applied to any other products added in cart and its number of units should not be counted to apply discount.

System should count if 30 units of P1-P5 from category id 3 are added discount will be applied to the total amount of above 30 units. instead of total cart amount and total number of units

Advise how can it be possible.


texts:
I'm totally new to Magento, having used systems like Expression Engine, Craft CMS and Shopify in the past. My client is currently on Magento CE 1.7 and we are working on a redesign for the site, including switching themes.

My question is this: I now have a local dev copy of the site running on my machine but am not sure the best order to proceed. Should I update the current site to the latest version of CE and then push it to staging (a subdomain on the production server) to test and then if all good, push to production. THEN, when this is done, start working on the redesign locally. This way, when it comes to merging the latest data from the production database with the dev database, they are on the same version.

Or, should I just upgrade and redesign my local site and leave production sitting pretty on 1.7, and then get the customer and order data from the production database when I'm ready to launch the new site? Still pushing to staging for testing first, obviously! This would be easier, I just don't know enough about Magento to know how much is changed around customers and their orders in the database when it is upgraded. I have googled around and haven't found a definitive answer to this yet.

I've seen some stubs about exporting customers and orders (the only two things I'd need from the production DB) from Magento either through the admin or just pulling tables in the DB. It's just not clear whether it is dependent on the two databases running the same version of Magento.


texts: discount amount applied but not appaired in cart

texts:
     discount not showig here

The discount is applied successfully but not appeared in the cart.


texts: How to set session in magento observer and get it in controller?

texts:
I have an Api call in observer function.

From there, I got a order details.I need to sent that order id  into the corresponding controller.
How I get this order id value into my controller?

Can i set it as a session value from observer to controller?


texts: How upgrade magento 2 via composer to alternative version PHP

texts:
Alternate version php 7.0.24 - my site.
Native version PHP 5.2.6 - my server.

Composer doesn't want to update magento (it defined version PHP 5.2.6).

How to specify for the script an alternative version PHP?


texts: How to create a custom Api in magento 2 to add multiple products in cart using single APi call?

texts:
The default Api in magento 2 to add items to cart V1/carts/mine/items allows us to add only one product to cart at a time. Now I need to create a Api to add items in bulk in cart. How I can do this?

Please help. Thanks in advance.

The Input required is somewhat like this:

Input - [{sku, qty, quote_id},{sku, qty, quote_id}......]


texts: how to link sales_flat_order with customers table through customer_id

texts:
I exported the sales_flat_order table and uploaded it to phpmyadmin where I wanted to create a FK with customers table as sales_flat_order does have a customer_id column, although some values show as null but the less. The linking to FK failed with the typical error "cannot add or delete foreign key etc". So I wanted to see what the customer_id values looked like and on doing this:

select customer_id from sales_flat_order

as it shows a lot of NULLS it fails in linking to customers table, but I need that link in order to be able to relate customers to their orders. Unless there is other way.


texts: Variable for store locale in email templates? Magento 1.9

texts:
Is there a way I can differentiate between different store locales in an email template created in transactional emails section of admin?

I need to point to a different store logo on an international store and including the locale in the image url seems like the most straight-forward way to achieve this.


texts: How to add customer type filed in magento 2 at frontend registration?

texts:
While creating the customer from admin, it asks for customer type.

I want to add same drop down option at front end for user creation form (Registration form). Can you please explain how to do it? It is not adding new customer attribute. Enabling default attribute in front end.


texts: I'm getting "" is a required value on Magento checkout page

texts:
On Magento V1.9 on the checkout page (onepage). When filling out the billing page and clicking submit. I get this error:

  "" is a required value

  "" is a required value

I am lead to believe that these are blank inputs/values. I have checked the html code for any such blank values. I have tried to run a query in the database for example:

SELECT
    *
FROM
    eav_attribute
WHERE
    frontend_label LIKE '%""%' AND
    entity_type_id IN (
        SELECT
            entity_type_id
        FROM
            eav_entity_type
        WHERE
            entity_type_code = 'customer_address'
     )

I have spent 5 days trying to diagnose this issue. Your expert advice would be truly appreciated.

Regards


texts: Magento 2 - Minicart not updated after login from authentication popup

texts:
As guest, i add  product 1 to cart. Then i go to cart page and login to my account using authentication popup.

Lets assume that my account have a product 2 in cart. So after login we should see product 1 and product 2 in minicart, meanwhile that appear here is just product 1.

Then when i trying to remove product 1 item from minicart, show message 'We can't find the quote item.' and minicart turn out to be as it should be (displaying both products).

So, is there any solution to my problem? Feedback is very appreciated.


texts: Configurable product not displaying options on dropdown on product page

texts: I created a new configurable product, with color configuration, I have two colors, but when i go to the product page, i can view de configurable product, but on the dropdown i can't select any option because it says just "Select an option" on listing page i can filter by my attribute without problem and i can view the items individually if i select Visibility to Catalog, Search, also i got a error messages on my console only on configurable products frontend page.


texts: magento htaccess allow access specific folder

texts:
I want to access a folder in root directory in Magento like example.com/foldername but i got a blank page.

So my question:

how i can allow access specific folder in root directory in Magento using htaccess ?


texts: how to get order numbers greater than an order id?

texts:
how to add a filter so that I can get order numbers greater than a number? I can show them in descending order but I want to show just the latest orders from an order number until the end

$collection = Mage::getResourceModel('sales/order_collection') ->addAttributeToSort('created_at', 'DESC')


texts:
I have created custom "Contact Us" form. Put Magento default Captcha as well.

On server side i'm using

 if (!$this->_formKeyValidator->validate($this->getRequest())) {
     return $this->resultRedirectFactory->create()->setPath('*/*/');
 }

Provided frontend jQuery necessary validation. For saving data on server side i'm using $model->save() method.

Did i need to provide extra security on post filds like Name, Email, Description or Magento will handle this? Do i need to use addslashes or any core PHP function to secure my application? So user can't hake my site?


texts: How to apply visibility filter to category view's product collection in magento 2?

texts:
How do I apply setVisibility() to 'Not Visible Individually' in Category view's collection?

Basically, I want to load products with visibility 'Not Visible Individually' only for a specific category. The product with visibility 'Not Visible Individually' is assigned to multiple categories, but when viewing those categories this product should be visible only for a specific category and not for the rest of the categories.

So, what I want is to know how to apply this visibility filter in category view's product collection, whether its by plugin, observer or override.


texts: How can I hide some customer attributes when creating a new sales order on the backend?

texts:
I cannot figure out if there is a setting in Magento admin where I can remove certain customer or customer address attributes from showing up on the new sales order screen. Can you please help?
As an example, when I create a new sales order, I do not need to see the customer's birthday, LAT, LONG, fax number, etc. when I create the order. How can I hide these?
Thank you


texts: Hide Empty attributes and Show Attributes group name

texts:
What is the best way to hide an empty attribute in the front end,  and Display attributes group names if that group has an attribute showing in the front end.

EX:

Group Name

    Attribute: Sample text

    Attribute: Sample text


texts:
I understand that the _data of a simple model (e.g., cataloginventory/stock_item) is an array of field value pairs, which corresponding to the fields of database tables. I was curious to know the content of _data for EAV models, so I checked the _data of catalog/product using the debug() function.

The finding is that it contains the field values pairs of catalog_product_entity, and also some attribute of this entity. They are make sense to me. The point I can't understand is that is also contain a pair:

...
[stock_item (Mage_CatalogInventory_Model_Stock_Item)] => Array
            (
                [item_id] => 1
                [product_id] => 1
                [stock_id]
                ......
            )
...

, which is an instance of cataloginventory/stock_item. This is neither an attribute of catalog/product entity, nor a field in catalog_product_entity, why it is included?

Is there a convention of _data for EAV models?


texts:
Since quantity field is not mandatory and I want that when ever product is added/updated quantity should be there

So there is two way of fix this, either I will make it mandatory or I set default value of quantity.

Can anyone help me do it?

Thanks