texts:
Building my edu module but can't manage to create a "Save" button or use existing one. I can pick record from grid and open in edit form but now I would like to change some details and save it. Would anyone describe in few steps how should I do it please ?

Already checked many tutorials but nothing is obvious and still don't know how to ... :(


texts: Which attributes go into the catalog_product_flat* tables?

texts:
In app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php (Magento 1.5)
or in app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php in later versions I believe:

The public function getAttributesCodes() retrieves the attribute codes that will go into the flat table. Here is the WHERE condition:

$whereCond  = array(
                $this->_getReadAdapter()->quoteInto('main_table.backend_type=?', 'static'),
                $this->_getReadAdapter()->quoteInto('additional_table.used_in_product_listing=?', 1),
                $this->_getReadAdapter()->quoteInto('additional_table.used_for_sort_by=?', 1),
                $this->_getReadAdapter()->quoteInto('main_table.attribute_code IN(?)', $this->_systemAttributes)
            );
            if ($this->getFlatHelper()->isAddFilterableAttributes()) {
                $whereCond[] = $this->_getReadAdapter()->quoteInto('additional_table.is_filterable>?', 0);
            }

Clearly, certain attribute types are always added to the table. Static, used_in_product_listing=1, used_for_sort_by=1, and the attributes listed in $this->_systemAttributes (status, required_options, tax_class_id, weight).

The `if statement is where I'm stuck. Are filterable attributes added or not? How to determine if they are or not?

I found this file: app/code/core/Mage/Catalog/Helper/Product/Flat.php

It has a class constant: const XML_NODE_ADD_FILTERABLE_ATTRIBUTES = 'global/catalog/product/flat/add_filterable_attributes';

It's used in this function:

public function isAddFilterableAttributes()
    {
        return intval(Mage::getConfig()->getNode(self::XML_NODE_ADD_FILTERABLE_ATTRIBUTES));
    }

What does it all mean? How do I know if filterable attributes will be added? What determines it? What changes it?


texts: Magento 2 : Add New Grid Mass Action based on condition

texts:
I am working on one custom extension and need to add new mass action in Sales Order grid.
But I need to add this mass action based on one condition.

I am working in Magento 2.1.1

How can I do this?

Any one have example then provide me.


texts: Loading Spin and Disable button in magento

texts:
I have this function which is called after the button was clicked, I would like to disable the button until the alert comes up and to show a Loading Spin while it is not finished processing the feed. This is my function code:

jQuery.noConflict();

function generateFeed(feedId) {
    jQuery.ajax({
        url: "<?php echo Mage::helper('adminhtml')->getUrl('adminhtml/index/generate/') ?>",
        method: 'GET',
        data: {FeedId : feedId}
    }).success(function() {
        alert ('Generation Successful!');
    }).error(function() {
        alert ('Generation Failed!');
    });

}

And the button is this:

$block->addButton('Generate', array(
'label'     => Mage::helper('adminhtml')->__('Generate Feed'),
'onclick'   => "generateFeed(" . $blockID . ")",
'class'     => 'go',
'index' => 'generate',
'name' => 'generate'
), -1);


texts: sort by new in magento 1.7.0.2 ce as default for category page

texts:
We can't manage to sort by new as default in the category product list.

This does only work when we set the order option in the category back-end, but due to our large category three we can't do this manually for every category and subcategory.

Is there anyway to specify a the default sort order on categories?


texts:
How to speed up Magento2's Admin/Backend?

I have tried http://suyati.com/speed-up-magento-admin-backend/ with no luck.


texts:
Does anybody have a link where I can find a list of all Magento 2.1 (or Magento 2) repositories and their methods?

I tried to find this in Magento Devdocs and can't seem to find anything. Maybe I am looking under the wrong search terms.


texts: Fastest way to update product information in magento 2

texts:
Which approach is better and fast to update bulk product update in magento 2.3+ ? e.g i want to update 1000+ products at a time using cron job or command line

please suggest


texts: Extending container getting error on templates

texts:
after extending product main info container I do not see any add to cart form in product view. Checking the logs I see

main.CRITICAL: Invalid template file: 'product/view/addtocart.phtml' in module: 'MY_Custom' block's name: 'product.info.addtocart' []

the way as I extended in my theme

<referenceContainer name="content">
        <container name="product.container" as="productContainer" htmlTag="div" htmlClass="product-container" before="-">
            <block class="MY\Custom\Block\Info" name="custom.info" template="MY_Custom::info.phtml">
                <arguments>
                    <argument translate="true" name="title" xsi:type="string">Special Product</argument>
                </arguments>
            </block>
        </container>
    </referenceContainer>
    <move element="product.info.addtocart" destination="product.info.main" />
    <move element="product.info.main" destination="product.container" />
    <move element="custom.info" destination="product.info.main" />
    <move element="product.info.media" destination="product.container" after="product.info.main" />

Actually I would like to keep all other references I do not want to override


texts: How do I make this query use my model class which extends Magento's core model class?

texts:
class Ebuynow_Mdlogistics_Model_Order extends Mage_Sales_Model_Order
{
    public function getNewUnshippedOrders()
    {
        $orders = Mage::getModel('ebuynow_mdlogistics/order')->getCollection()
            ->addFieldToFilter('entity_id', $order_ids)
            ->addFieldToFilter('ship_status', self::SHIP_STATUS_UNPROCESSED)
            ->load();

        return $orders;
    }
}

Test code

foreach ($orders as $order) {
    var_dump(get_class($order));
}

Output

string(22) "Mage_Sales_Model_Order"

Desired output

string(22) "Ebuynow_Mdlogistics_Model_Order"

How do I make sure the row objects returned by the query are cast to the child class and not the core class?


texts:
Hello friends,

I am new to Magento and I'm trying to install Magento-2.1.5 on Ubuntu-16.04. While installing I'm getting an error in php extention check,
error is :

  PHP Extensions Check 3 missing PHP extensions. Hide detail

  The best way to resolve this is to install the correct missing
  extensions. The exact fix depends on our server, your host, and other
  system variables.  Our PHP extension help can get you started.

For this error I'm added :

extension=php_bz2.dll

extension=php_curl.dll

extension=php_intl.dll

extension=php_mysqli.dll

extension=php_openssl.dll

extension=php_pdo_mysql.dll

This code is in php.ini and added that file into root folder of my application,
but error not resolve. Please any kind of help is appreciated, thanks in advance.


texts:
so I am running a magento 2.2.4 in development and one in production, the dev is ok and I can do all, the production is an exact copy of it on apache 2.4 and Ubuntu 16.04, every time I use any kind of cli command (grunt, setup, whatever ) to regenerate the static file I got a blank page and to put all in place again I have to run chown -R www-data:www-data /.

I am sure the cli user belongs to the www.data group


texts: Magento 2 Authorize-Net-Direct-Post-Patch installation

texts:
I need to update this patch on magento 2.1.7 - I am confused with file structure.
CE-2.0.0 to CE-2.3.0/vendor/magento/module-authorizenet/

where should I upload these files and what is my CLI command i would need to execute this? any help would be appreciated


texts: Set Custom Price to Quote item magento2 from controller

texts:
I am adding the product to the cart with below code.

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

   protected $formKey;
   protected $cart;
   protected $product;
   protected $checkoutSession;
    public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\Data\Form\FormKey $formKey,
    \Magento\Checkout\Model\Cart $cart,
    \Magento\Catalog\Model\ProductFactory $product,
    \Magento\Checkout\Model\Session $checkoutSession,
    array $data = []
) {
    $this->formKey = $formKey;
    $this->cart = $cart;
    $this->product = $product;
    $this->checkoutSession = $checkoutSession;
    parent::__construct($context);
}
  public function execute()
  {
        $productId = 1;
        $customPrice = 150;
        $params = array(
            'form_key' => $this->formKey->getFormKey(),
            'product_id' => $ProductId, //product Id
            'qty'   => 1 //quantity of product
        );

            $_product = $this->product->create()->load($productId);
            $this->cart->addProduct($_product, $params);
            $this->cart->save();

            $quote = $this->cart->getQuote();
            $quoteId = $quote->getId();
            $productItem = $this->getProductQuote($_product);
            $productItem->setCustomPrice($customPrice);
            $productItem->setOriginalCustomPrice($customPrice);
            // Enable super mode on the product.
            $productItem->getProduct()->setIsSuperMode(true);
 }

 public function getProductQuote($product){
    $quote = $this->checkoutSession->getQuote();
    $cartItems = $quote->getItemByProduct($product);
    return $cartItems;
   }

}

I am adding custom price to the quote item with above code. Its not updating the custom price.

Can anyone look into this and update me please. Thanks


texts: Paypal Website Payments Standard (Includes Express Checkout) Magento 1.9.1.1 Auto Invoice After payment and change status to complete

texts:
I am selling downloadable product in my website . There is payment method only Paypal Website Payments Standard (Includes Express Checkout) included . When customer checkout the order the order status is in processing . I want it Pending until i approve from admin. But it is in processing . When customer redirect to paypal and complete their payment . The status automatically change into complete and invoice auto created . i want to stop paypal to create invoice and order status in pending . i want it to change manually or creating invoic.

Anybody can help will? Suggestion also appreciable.

Thanks in advance guys .


texts: Custom field value not saving during checkout registration

texts:
I have tried to save a custom field value during checkout registration in customer registration its worked fine i have referred many question in stack exchange based on this problem and nothing work for me . here i'm try to save mobile numbers of customer during their registration (no issue occurred during normal user registration)

Here is my config.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Mobilenum_Cusmobile>
      <version>0.0.1</version>
    </Mobilenum_Cusmobile>
  </modules>
  <global>
       <fieldsets>
        <checkout_onepage_quote>
            <customer_mobile_reg>
                <to_customer>mobile_reg</to_customer>
            </customer_mobile_reg>
        </checkout_onepage_quote>
    </fieldsets>
        <helpers>
      <cusmobile>
        <class>Mobilenum_Cusmobile_Helper</class>
      </cusmobile>
    </helpers>
    <models>
      <cusmobile>
        <class>Mobilenum_Cusmobile_Model</class>
        <resourceModel>cusmobile_mysql4</resourceModel>
      </cusmobile>
    </models>
    <resources>
      <customerattribute1486024557_setup>
        <setup>
          <module>Mobilenum_Cusmobile</module>
          <class>Mage_Customer_Model_Entity_Setup</class>
        </setup>
        <connection>
          <use>core_setup</use>
        </connection>
      </customerattribute1486024557_setup>
      <customerattribute1486024557_write>
        <connection>
          <use>core_write</use>
        </connection>
      </customerattribute1486024557_write>
      <customerattribute1486024557_read>
        <connection>
          <use>core_read</use>
        </connection>
      </customerattribute1486024557_read>
    </resources>
  </global>
</config>

and the mysql query to run

<?php
$installer = $this;
$installer->startSetup();

$installer->addAttribute("customer", "mobile_reg",  array(
    "type"     => "varchar",
    "backend"  => "",
    "label"    => "Mobile Number",
    "input"    => "text",
    "source"   => "",
    "visible"  => true,
    "required" => true,
    "default" => "",
    "frontend" => "",
    "unique"     => false,
    "note"       => ""

    ));

        $attribute   = Mage::getSingleton("eav/config")->getAttribute("customer", "mobile_reg");

$used_in_forms=array();

$used_in_forms[]="adminhtml_customer";
$used_in_forms[]="checkout_register";
$used_in_forms[]="customer_account_create";
$used_in_forms[]="customer_account_edit";
$used_in_forms[]="adminhtml_checkout";
        $attribute->setData("used_in_forms", $used_in_forms)
        ->setData("is_used_for_customer_segment", true)
        ->setData("is_system", 0)
        ->setData("is_user_defined", 1)
        ->setData("is_visible", 1)
        ->setData("sort_order", 100)
        ;
        $attribute->save();
$tablequote = $this->getTable('sales/quote');
$installer->run("
ALTER TABLE $tablequote ADD `customer_mobile_reg` varchar(1000) NOT NULL
");

$installer->endSetup();

here is my billing.phtml

                *<?php echo $this->__('Mobile Number') ?>

            <input type="text" name="billing[mobile_reg]" value="<?php echo $this->escapeHtml($this->getAddress()->getmobile_reg()) ?>" title="<?php echo $this->quoteEscape($this->__('Mobile Number')) ?>" class="input-text" id="billing:mobile_reg" />


texts:
I want to reduce 1% of the total ordered amount when someone cancels an order.

So even though an order is canceled, the customer still has to pay 1% of the total amount he ordered.

How do I achieve this? Do we have an extension for this as an alternate way?


texts: what is the main difference between websites and store in magento2.


texts: Migrate Magento 1 to Mgento 2 with easy way?

texts:
Can any one tell me what is the best way to migrate Magento1 to Magento2 full data.

It will very thankful in advance for help  .


texts: Magento2 : Keep discount always be visible even when it's 0

texts: Is there anyway even if there 0 discount but it should always be visible?


texts: Magento Enterprise URL re-writes from 1.12->1.13.1 are adding unnecessary characters to the end of the urls for products

texts:
We are just in the process of upgrading Magento EE from 1.12 to 1.13.1 and we've hit a little snag on the url rewrites that are automatically generated from the migration script.

We run 3 different store views and most of the products are replicated through each, for example:

www.storename.com/mens/product.html
www.storename.com.au/mens/product.html
www.storename.co.uk/mens/product.html

However after running the url migration script all these URLS have switched on the front-end and now display like:

www.storename.com/mens/product-1.html
www.storename.com.au/mens/product-2.html
www.storename.co.uk/mens/product-3.html

I'm sure this has something to do with the system identifying these as duplicates and therefore adding -1,-2,-3 to each of the corresponding URLS.

What would be the best way to fix this? We cannot continue the upgrade because this will cause a SEO nightmare as all the URLS like /product.html will 301 to /product-1.html and so forth.


texts: $_product doesn't contain all needed data (minimal_price)

texts:
Basically, my problem is that I need to get the minimal_price of an configurable product in category view. Previously, this worked by using

$_product = $this->getProduct();

$_product->getMinimalPrice();

However, it doesn't work anymore. I noticed, that when it still worked dumping $_product would contain 'minimal_price'. Now, this is not the case anymore. Does anyone know what the reason could be?


texts: Sort product collection by select attribute's option value sort_order - how?

texts:
I am trying to sort a product collection by an attribute that is of the 'select' type with lots of option values, all of which have sort order positions set. My attribute is called 'style'.

When I set my product collection to sort by the attribute I do get it sorted by that attribute, albeit alphabetically, not as per the position values.

    $collection = $this->_addProductAttributesAndPrices($collection)
        ->addStoreFilter()
        ->addAttributeToSort('style', 'asc')
        ->setPageSize($this->getProductsCount())
        ->setCurPage(1)
    ;

This sorts the products alphabetically by style name (not style sort order values).

I have tried really hard to try to work out how to fix this.

As an added complication I am using 'flat tables' in the frontend.

Any ideas?


texts: How magento determine the css theme folder in custom module

texts:
I have a custom module, which will add skin css

    <reference name="head">
        <action method="addItem">
            <type>skin_css</type>
            <name>css/banner.css</name>
        </action>
    </reference>

finally it includes the css for me in base theme

http://localhost/m1/skin/frontend/base/default/css/banner.css

How can I make it load the css in current theme?


texts:
We are having problems with httpd memory usage with Magento.
The httpd fills up to more than 40GB in minutes and then the httpd has to be restarted.

I have this configuration. What do you think, can I solve this by changing the configuration?

<IfModule mpm_prefork_module>
  StartServers          5
  MinSpareServers       5
  MaxSpareServers      10
  ServerLimit         450
  MaxRequestWorkers   450
  MaxConnectionsPerChild   10000
</IfModule>


texts: Magento invoice link to pdf in transactional email

texts:
I remember myself asking this question before and closing it again. Maybe it could not be done.....

We are investingating this option because it helps us in not sending a 1-2MB attachment to our customers.

But only after today when investigating  mywebstore.com/sales/guest/form I found something that could be helpful to access an order, without logging in ...

{{store url=""}}/sales/guest/print/order_id/{{var order.id}}/

Investigating now.

If any other mehtods exist I am interested.


texts: getMediaGallery() how to see which image is thumbnail, small_image, image?

texts:
I want to get the image path and position of all images of each product. Therefore I load all media data:

$p = Mage::getModel('catalog/product')->load($productId);
//get all images
$mediaGallery = $p->getMediaGallery();

But if I dump the data I don't see any information which image is thumbnail, small or base?

Array
(
[images] => Array
    (
        [0] => Array
            (
                [value_id] => 1
                [file] => /b/o/log_mouse1.jpg
                [label] => Computer Mouse
                [position] => 1
                [disabled] => 0
                [label_default] => Mouse Logitech Laser
                [position_default] => 1
                [disabled_default] => 0
            )

        [1] => Array
            (
                [value_id] => 9
                [file] => /b/o/imagpro2012.jpg
                [label] => iMac Pro 2013
                [position] => 2
                [disabled] => 0
                [label_default] => iMac Pro
                [position_default] => 2
                [disabled_default] => 0
            )

        [2] => Array
            (
                [value_id] => 5
                [file] => /b/o/glasses1.jpg
                [label] => Glasses
                [position] => 3
                [disabled] => 0
                [label_default] => Glasses_def1
                [position_default] => 3
                [disabled_default] => 0
            )

Did I choose the wrong approach? How can I load image path and position of all 3 images (thumbnail, small image, image)?
Thank you so much in advance!


texts: Can I have a configurable for gift cards?

texts:
I noticed this morning that there is a "gift card" product type. I've had a quick play with it and it looks like the product view template is ideal for this type of product, as it includes customisable prices and sender/recipient information fields etc.

Assuming I have ten different "designs" of gift cards, is there a way that I can group these "gift card" products under a configurable product with a "design" configurable attribute?

At the moment I can see how to create a single "gift card" product and have it display as I wish in the frontend, but I'd like to be able to use a configurable for this so the user can also choose a "design" from a list of ten.

Note: configurable attribute "design" is created, unique attribute set exists for these products, and the configuration is currently working fine with a configurable, many virtual products and some custom templates, but I'm looking to do more of this out-of-the-box if possible.


texts: How to display best seller products category wise?

texts:
I'm using MageBees bestseller products extension. And want to customize it in order to get best selling products category wise.

Like For Category A,

Best Seller Products

For Category B,

Best Seller Products.

For Category C,

Best Seller Products.
And like wise.

What condition I should apply to get category wise bestseller products?


texts: Why use preference, when you can use plugins and when you can use observer in Magento2?

texts:
Magento2 has Three ways of extending Feature in native Magento classes and methods

Preference

Plugins

Observer

Which one Use on in which Event ?


texts: How to enable login for custom cms page in magento-1.9

texts:
I am working on https://www.depoto.com/bulkorders/
website, if any customer clicks on Bulk order page, need to ask for login for non-loggedin users. I created this Bulk order page in cms.

My customer.xml file is as below:

<default>
        <!-- Mage_Customer -->
        <reference name="top.links">
            <action method="addLink" translate="label title" module="cms"><label>Bulk orders</label><URL><![CDATA[https://www.depoto.com/bulkorders/]]></URL><title>Bulk orders</title><prepare/><urlParams/><position>10</position></action>
        </reference>
</default>


texts: How to get Geo IP of customer in magento2?

texts:
I want to get the customer geo IP in magento2. I used some third party calls but If I enable proxy means that thing is not working. How can I get the original customer IP in magento2 anybody has idea means please tell me.

I referred this one but in proxy, it's not working,
magento 2 : Track country with ip address


texts:
I tried,

app/code/Test/WishlistPlugin/etc/di.xml

<?xml version="1.0"?>

 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="\Magento\Wishlist\Model\Wishlist">
    <plugin name="WishlistPluginModelWishlist" type="Test\WishlistPlugin\Model\Wishlist" sortOrder="10"/>
</type>
</config>

app/code/Test/WishlistPlugin/Model/Wishlist.php

namespace Test\WishlistPlugin\Model;

class Wishlist
{
   public function beforeAddCatalogProduct(\Magento\Wishlist\Model\Wishlist $product, $qty = 0, $forciblySetQty = false)
  {
    return $qty;
  }
}

But function is not called in app/code/Test/WishlistPlugin/Model/Wishlist.php


texts: Adding contents to default customer sign up / create account page - Magento 2

texts: I would like to add a banner image and some contents to default create customer account page at www.domain.com/customer/account/create/, how do i do it? Or Can I add a CMS Page or static block to it?


texts:
Some of the tables in the Magento 2.1 DB have "MEMORY" as their engine. This is a problem for the DB cluster we are using (Percona-XtraDB-Cluster with pxc_strict_mode = ENFORCING).

Can I change the engines to InnoDB or will that create errors somewhere?


texts:
Currently when editing a product in a specific store view, I am getting the product like this:

$product = Mage::getModel('catalog/product')->setStoreId($storeId)->load($magento_product_id);

Instead, I would like to edit a product's default values. Am I correct when assuming that's done just by removing the storeid like this?

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


texts: Magento 2.X: Execute a portion of js file only when customer is logged in

texts:
html += this + '
i
' +
                        '
' + table +
                        '
' +

I have this code within .js file but I want to run this div only when customer is logged in. This div executes in frontend while viewing products PLease suggest some ways.


texts: How can I add custom css file in luma theme magento 2

texts:
I have used Magento 2 with luma Theme.
I have custom design for theme. I want to add one custom.css file in site.


texts: Custom admin module with listing and file uploading

texts:
config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <My_Pant>
            <version>1.0.0</version>
        </My_Pant>
    </modules>
    <global>
        <helpers>
            <my_pant>
                <class>My_Pant_Helper</class>
            </my_pant>
        </helpers>
    </global>
    <admin>
        <routers>
            <my_pant>
                <use>admin</use>
                <args>
                    <module>My_Pant</module>
                    <frontName>pant</frontName>
                </args>
            </my_pant>
        </routers>
    </admin>

    <adminhtml>

      <menu>
        <my_menu translate="title" module="my_pant">
            <title>pankaj</title>
            <sort_order>9999</sort_order>
            <action>pant/index/index</action>

        </my_menu>
    </menu>
    </adminhtml>
</config>

IndexControllers

<?php
class My_Pant_IndexController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {
        $this->loadLayout();

        $block = $this->getLayout()->createBlock('core/text')->setText('
hello  bye
');
        $this->_addContent($block);

        $this->_setActiveMenu('my_menu')->renderLayout();
    }

}

This is successfully run: output-> hello bye.

But I need to create custom admin module with listing and file upload.


texts: Magento 2 Custom Customer Attribute not Showing on Frontend [Solved]

texts:
I'm able to add custom customer attribute called "passport".

It's working fine on Admin Side. So no issues.

For the frontend however it's not displaying on Registration page.

Below code already added InstallData.php

  'used_in_forms' => ['adminhtml_customer', 'checkout_register',
  'customer_account_create',
  'customer_account_edit','adminhtml_checkout'],

So, for frontend, i have created Block - Widget  for that Passport Field & Overriding Customer Registration Page. It's already pointing to New File.

  \magento2\app\code\Custom\CustomerAttribute\Block\Widget\Passport.php

public function _construct() {
    parent::_construct();

$this->setTemplate('Custom_CustomerAttribute::widget/passport.phtml');
 }

  \magento2\app\code\Custom\CustomerAttribute\view\frontend\templates\form\register.phtml

<?php
$_passport = $block->getLayout()->createBlock('Custom\CustomerAttribute\Block\Widget\Passport');
if ($_passport->isEnabled()):
    echo $_passport->setPassport($block->getFormData()->getPassport())->toHtml();
endif;
?>

While running above code it's not calling <project path>\magento2\app\code\Custom\CustomerAttribute\view\frontend\templates\widget\passport.phtml file.


texts: Cronjob started rollback and files were deleted. Why?

texts:
I faced a strange behaviour. First, I setup cron jobs as described in http://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-cron.html. Then I changed file permissions to dev mode (writeable). When cron jobs have started, files were being deleted. As soon as I noticed this, I changed file permissions back to recommended for production mode and files stopped disappering.

Cron Daemon email (Subject: Cron  /usr/bin/php /home/[my-domain]/public_html/update/cron.php):

  ..........

  PHP Warning:
  unlink(/home/[my-domain]/public_html/[my-domain]/.git/hooks/post-update.sample):
  Permission denied in
  /home/[my-domain]/public_html/update/app/code/Magento/Update/Rollback.php
  on line 157

  PHP Warning:
  rmdir(/home/[my-domain]/public_html/[my-domain]/.git/hooks):
  Permission denied in
  /home/[my-domain]/public_html/update/app/code/Magento/Update/Rollback.php
  on line 155

  ...........

/var/log/update.log:

  [2017-03-23 17:00:03] update-cron.INFO: Job "rollback
  {"backup_file_name":"/home/[my-domain]/public_html/var/backups/1480414203_filesystem_code.tgz"}"
  has been started [] []

  [2017-03-23 17:00:03] update-cron.INFO:
  Restoring archive from
  "/home/[my-domain]/public_html/var/backups/1480414203_filesystem_code.tgz"
  ... [] []

  [2017-03-23 17:00:49] update-cron.INFO: An error occurred
  while executing job "rollback
  {"backup_file_name":"/home/[my-domain]/public_html/var/backups/1480414203_filesystem_code.tgz"}":
  Extraction from phar
  "/home/[my-domain]/public_html/var/backups/1480414203_filesystem_code.tar"
  failed: Cannot extract
  "app/code/CustomerParadigm/OrderComments/view/frontend/requirejs-config.js",
  could not open for writing
  "/home/[my-domain]/public_html/app/code/CustomerParadigm/OrderComments/view/frontend/requirejs-config.js"
  [] []

  [2017-03-23 17:00:49] update-cron.INFO: Job "rollback
  {"backup_file_name":"/home/[my-domain]/public_html/var/backups/1480414203_filesystem_media.tgz"}"
  has been started [] []

  [2017-03-23 17:00:49] update-cron.INFO:
  Restoring archive from
  "/home/[my-domain]/public_html/var/backups/1480414203_filesystem_media.tgz"
  ... [] []

  [2017-03-23 17:01:00] update-cron.INFO: Job "rollback
  {"backup_file_name":"/home/[my-domain]/public_html/var/backups/1480414203_filesystem_media.tgz"}"
  has successfully completed [] []

Crontab (disabled for now):

# @hourly /usr/bin/php /home/[my-domain]/public_html/update/cron.php%/home/[my-domain]/public_html/var/log/update.cron.log #Magento cron (2)

# @hourly /usr/bin/php /home/[my-domain]/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule"%/home/[my-domain]/public_html/var/log/magento.cron.log #Magento cron (1)

# @hourly /usr/bin/php /home/[my-domain]/public_html/bin/magento setup:cron:run%/home/[my-domain]/public_html/var/log/setup.cron.log #Magento cron (3)

Why have files start being deleted? How to prevent from it in future?


texts: What is the meaning of triple curly braces {{{ }}} in phtml template files? When and how do we use them?

texts:
There is a phtml template file in one of the third party Magento 2 extension which has triple curly braces {{{ }}} in it.
When is this notation used, What does it represent?


texts: Magento 2: Get shipping address on my order page

texts:
I want to display shipping data on order page.
This call $block->getFormattedAddress($_order->getShippingAddress()) returns null.
But, this call $block->getFormattedAddress($_order->getBillingAddress()) returns the correct data.


texts: How to insert create customer account form layout to a block as a widget

texts:
I want to insert customer_account_create.xml content which containing the create customer account form into one of my block that I created from

backend > content > blocks > add new block

Is there a way to do this?


texts:
After updating to Magento 1.9.1.0 there are no order confirmations sent when a customer pays throug PayPal. Every other payment works fine, also PayPal was working fine before I updated.

I receive the payment and a payment notification from PayPal. Orders are registered but the status stays on "Pending Payment" even though payment was made. Before it changed to "Processing"

I have found no solution around the web, that helped. The IPN is configured and after payment the customer gets redirected to the shop.

Edit: There seems to be a problem with the IPN: PayPal redirects to https://SHOPNAME/paypal/ipn. I think it should actually be http://SHOPNAME/paypal/ipn. In the PayPal-Settings the version with http is displayed.


texts: EE 1.13 url migration scripts after wait or not?


texts: Fishpig Wordpress Magento fallback featured image / post thumbnail image

texts:
I use Fishpig extension to show my blog posts in Magento.

In Wordpress with below code i show a custom fallback-image if there is NOT a featured image set (in Wordpress admin).

<?php
        if ( has_post_thumbnail() )
        {
        the_post_thumbnail();
        }
        else
        { ?>
        <img src="<?php bloginfo('template_directory'); ?>/images/compressport-r2.jpg" alt="<?php the_title(); ?>" />
    <?php
        } ?>

But on the Magento frontend its not showing this image? Its only showing the image while its really set as Featured image (in Wordpress admin).

What do i have to change in the Magento Wordpress template code to make this work?

--- Update 1 ---

It works with below adjustment, but can i wright it shorter?:

                        <?php if ($this->canDisplayImage() && $post->getFeaturedImage()): ?>

                            <img src="<?php echo $post->getFeaturedImage()->getFullSizeImage() ?>" alt="<?php echo $this->escapeHtml($post->getPostTitle()) ?>"/>

<?php echo $this->htmlEscape($post->getPostTitle()) ?>

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

<?php echo $post->getPostDate() ?>

                            <?php endif; ?>

                        <?php else: ?>

<?php echo $this->htmlEscape($post->getPostTitle()) ?>

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

<?php echo $post->getPostDate() ?>

                            <?php endif; ?>

                    <?php endif; ?>


texts: Custom payment method with redirect action then how to get order details in controller?

texts:
I'm trying to create a custom payment method with direct action as well as in magento 1

here is the code i'm trying to do the redirect after clicked "place order button"

 /*jshint jquery:true*/
define(
    [
        'jquery',
        'Magento_Checkout/js/model/quote',
        'Magento_Checkout/js/model/url-builder',
        'mage/storage',
        'Magento_Checkout/js/model/error-processor',
        'Magento_Customer/js/model/customer',
        'Magento_Checkout/js/model/full-screen-loader'
    ],
    function ($, quote, urlBuilder, storage, errorProcessor, customer, fullScreenLoader) {
        'use strict';
        return function (messageContainer) {

            $.mage.redirect("/test/redirect"); //url is your url
        };
    }
);

but my question is how to get the order details in /test/redirect controller?


texts:
I'd like to hide a special attribute and show it somewhere else on the page. I found out that the attributes are handled in:
app/design/frontend/default/mytheme/template/catalog/product/view/attributes.phtml.

Ok, there I can hide the stuff.

<?php foreach ($_additional as $_data): ?>
    <?php if(strtolower($this->escapeHtml($this->__($_data['label']))) == "MYATTRIBUTE"): ?>

    <?php else: ?>

              <?php echo $this->escapeHtml($this->__($_data['label'])) ?>
              <?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>

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

And now I have to show this attribute somewhere else on the page, just below the fieldset with the id="product-options-wrapper". Could you please tell me the file where I can find the stuff?

Here's an image:

Thanks in advance.


texts:
I have a custom collection for my extension and am trying to implement search functionality. This would be pretty easy if I was using regular MySQL expressions but can't seem to get it working with Magento's available collection methods.

Here is the code I have:

/** @var Pvtl_Consult_Model_Resource_Consultations_Collection $customers_collection */
$customers_collection = Mage::getModel('pvtl_consult/consultations')->getCollection();

$customers_collection
    ->join('pvtl_consult/consultants', 'consult_consultant = consultant_id')
    ->addFieldToFilter('consult_lastname', array(
        array('like' => $search),
        array('like' => '%' . $search),
        array('like' => $search . '%'),
        array('like' => '%' . $search . '%')
    )
)
    ->addFieldToFilter('consultant_store', $store_id);

$customers_collection->getSelect()->order(
    "CASE WHEN 'consult_lastname' = '$search' THEN 1
        WHEN 'consult_lastname' = '%$search' THEN 2
        WHEN 'consult_lastname' = '$search%' THEN 3
        WHEN 'consult_lastname' = '%$search%' THEN 4
        ELSE 5 END"
);

After debugging the select statement created from above, I notice it is failing due to Magento inserting backticks around the CASE expression.

Is there a way to prevent this? Or, even better, is there a more optimised way to order by case in Magento?


texts:
Using this URL https://blog.e-zest.com/magento-2-pipeline-deployment-with-minimum-downtime I have followed all steps for dev and build server, then now when I am running php bin/magento app:config:import in production server which is trying to access config dump that is created in dev server on step number 7, I am getting "error: Import failed: Connection "default" is not defined"

Does anyone has a direction or a solution


texts: Saving product deletes tier price and group price

texts:
I've got a problem when programatically saving a product.

While loading the product with help of the product collection or the model (by attribute), setting some value and then saving it, I'm losing the tier and group prices.

$productList = Mage::getModel ( 'catalog/product' )->getCollection ()
  ->addFieldToFilter('color', $color)
  ->load();
foreach($productList as  $product) {
    $product->setColor($newColor);
    $product->save();
}

One can do a workaround by doing one of these:

1.Reload each product:

$productList = Mage::getModel ( 'catalog/product' )->getCollection ()
  ->addFieldToFilter('color', $color)
  ->load();
foreach($productList as  $product) {
    $product = Mage::helper('catalog/product')->getProduct($product->getId());
    $product->setColor($newColor);
    $product->save();
}

2.Load tier and group price (source):

$productList = Mage::getModel ( 'catalog/product' )->getCollection ()
  ->addFieldToFilter('color', $color)
  ->load();
foreach($productList as  $product) {
    $product->getTierPrice();
    $product->getGroupPrice();
    $product->setColor($newColor);
    $product->save();
}

minimal variant of reloading (for example) the tier price attribute (extracted from Mage_Catalog_Model_Product_Type_Price::getTierPrice():

$attribute = $product->getResource()->getAttribute('tier_price');
if($attribute){
    $attribute->getBackend()->afterLoad($product);
}

3.Add dummy values (source):

$productList = Mage::getModel ( 'catalog/product' )->getCollection ()
  ->addFieldToFilter('color', $color)
  ->load();
foreach($productList as  $product) {
    $product->setTierPrice ( array (
        'website_id' => 0,
        'cust_group' => 2,
        'price_qty' => 3,
        'price' => 10
    ) );
    $product->setGroupPrice ( array (
        'website_id' => 0,
        'cust_group' => 2,
        'price' => 10
    ) );
    $product->setColor($newColor);
    $product->save();
}

All these workarounds have one problem: more database calls.
When often running scripts that update a lot of products, it is bad to have even more database calls only for not to lose the tier and group prices.

One can add the tier prices while building up the collection:

$productList = Mage::getModel ( 'catalog/product' )->getCollection ()
  ->addFieldToFilter('color', $color)
  ->addTierPriceData()
  ->load();
foreach($productList as  $product) {
    $product->setColor($newColor);
    $product->save();
}

But by doing so, on save one will get a constraint violation error. It seems in this case Magento tries to save the exact same tier prices again.

Does anyone know a solution which loads the tier and group prices in the same query that is used by the product collection and does not trigger constraint violations on save?

I have also posted this question in the StackOverflow part of StackExchange:
https://stackoverflow.com/questions/27900130/saving-product-deletes-tier-price-and-group-price


texts: How to remove Logo and Menu from CMS Page

texts:
I am building a page in Magento 2.1.9 from which I would like to remove the logo and menu. Can this be accomplished through Layout Update XML?

Below is a sample (blank) page. Thanks in advance!

http://www.redballoontoystore.com/test-remove-logo


texts: 404 not found magento 2 static and media files not loading

texts: resources not loading after changing base url. i have tried changing base_url for media files.


texts: Magento 2.3 how to show the configurable product options as drop downs on category page

texts:
I have followed the link Magento2 + Need to display Configurable Drop Down option on category page
but the dropdown are display none and are empty with no options .
If any one has done this type of customization on magento 2 please suggest me the solution for this.
Thanks for your help in advance


texts: How to add stock column per each item on sales order search grid at Magento2 admin page

texts:
I think it would be necessary to place an order in admin page.
I want to show the stock level at order creation (in backend) during product selection stage in the search grid (Sales_Order_Create_Search_Grid).

How can I go about doing this?

This is a solution for Magento1.
https://stackoverflow.com/questions/17069097/magento-show-stock-levels-in-sales-order-create-search-grid

How can i handle with it on Magento2?

Thank you


texts: Magento 2: Get all shopping cart items, subtotal, grand total, billing & shipping address

texts:
I want to  Get all shopping cart items, subtotal, grand total, billing & shipping address in one step checkout  Magento 2 in storefront (Home Page) .
according to the this link :

  https://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_new_step.html#add-your-step-to-the-checkout-page-layout

I added new step in checkout page according to this link :

  http://blog.chapagain.com.np/magento-2-get-all-shopping-cart-items-subtotal-grand-total-billing-shipping-address/

In part of (Using Dependency Injection (DI)) , on that site I do not know where is the directory of .phtml file and also .php file.


texts: Magento2 : Redirect store view on the basis of currency switch

texts:
We have 2 store views (en and us) on our website. we have around 5 currencies in that. we need to do the following functionality on our website.
When customers switch the currency to $ (US Dollar) then it should also open the US store view automatically.
It's not related to GEO Location but related to currency switch.
Can you please help us with that. Any help would be appreciated.
Thanks in advance..!


texts: I am getting 0 prodcut price whwn I add in my Cart fro admin panel

texts: Whenever i am trying to add product in cart from admin panel its getting 0. I don't know why because it was working fine earlier.


texts:
I would like to override a CSS file who is here :

/pub/media/porto/web/css/header/type6.css

But when I try to put it in my child theme nothing happen :

/app/design/frontend/Smartwave/porto_child/...

So, my question is : Is it possible to override css files located in pub/media ? And if yes, how can I do it ?

Thank you all for your attention.


texts: Coupons not working with Recurring Products in Magento

texts:
When I apply a coupon at cart having a recurring product, it applies the Coupon but calculates wrong and displays wrong amount.
But it is working fine with normal products(other than recurring Products). Can anyone ever worked with Coupons and Recurring Products?


texts:
Nope, Mage_Sales_Model_Order $order->getRemoteIp() doesn't work. It always gives me null.

By when I check sales_flat_order table I can see remote_ip field. I just only need to check if the order was placed manually by admin or by the customer since I need to mark 'admin-placed' orders on the order grid in Backend.

I saw that someone suggests to check store_id field. But it never is 0. It's always equal to my real store ID.

Any more suggestions? Thanks.


texts:
When i switch to Arabic view, price of the product is displayed as described : JOD 999.00 is being displayed as 9.99.00 دينار أردني
I check this page but it's not working with me:
How to change currency format in Magento 2?
Can you help me with this problem please.
Regards,


texts: Magento-vars.php - Why needed and how it works

texts: I'm a newbie to Magento and I want to understand what is the use of magento-vars.php and when this file will come into action in the lifecycle.


texts: How to assign category on multiple products?

texts:
I can assign multiple products into a category when I am creating a category,  but how can I assign a category to multiple products at once?

I have tried to check multiple products in Manage Products and then Update attribues but I cannot edit category from there. I have also tried Manage Categories too.


texts: How to Get Attribute Code By Attribute Label

texts:
Anybody knows how to get Attribute Code of configurable product by its frontend label?

I've tried this

Mage::getModel('eav/entity_attribute')->getCollection()->addFieldToFilter('frontend_label', 'Foo');

But have no idea how to get the attribute code.


texts:
I would like to restrict order based on an Admin user. So for example the admin user would have an attribute that is assigned to a certain region (Group of Zipcodes). When the user logs in they could only see the orders for their region.

I am pretty clear on everything except the event to show the grid. I would like to accomplish this without overriding the core code.


texts: M2.1.x REST API - Invalid type for value array. Expected type: string

texts:
Having some conflicts with a REST API I created. Trying to pass an array of strings; for example, "skus", but I get this error:

Invalid type for value: array. Expected type: string.

{vendor}/{module}/etc/webapi.xml

<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">

    <route url="/V1/to/api/rules/group/guest" method="POST">
        <service class="{Vendor}\{Module}\Api\ProductCheckInterface" method="checkProductsAsGuest" />

        <!--this will change later-->
        <resources>
            <resource ref="anonymous" />
        </resources>
    </route>
</routes>

{Vendor}/{Module}/Api/ProductCheckInterface

<?php

namespace {Vendor}\{Module}\Api;

interface ProductCheckInterface
{
    /**
     * Check a group of products with rules as a guest
     *
     * @param string[] $skus
     * @return \{Vendor}\{Module}\Api\Data\ProductsActionInterface
     */
    public function checkProductsAsGuest($skus);
}

{Vendor}/{Module}/Model/ProductCheck

<?php

namespace {Vendor}\{Module}\Model;

class ProductCheck implements \{Vendor}\{Module}\Api\ProductCheckInterface
{
    /**
     * {@inheritdoc}
     */
    public function checkProductsAsGuest($skus)
    {
        // code
    }
}

I've went around the web, but nothing helped.

Passing Array in REST Api Magento2 (Post Method)
https://devdocs.magento.com/guides/v2.1/extension-dev-guide/service-contracts/service-to-web-service.html
https://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/


texts: How to re use the Condition Filter Field in Magento Admin side?

texts:
How to re use condition filter field in magento with custom filters. By Condition filter I meant the control which is used to select products to which the catalog price rules are applied.

If you could point out to some docs, It would be great.


texts: Magento 2.2.1 "Notice: Undefined index: src in /vendor/magento/framework/View/Page/Config/Generator/Head.php on line 125"

texts:
I've got a problem with Magento 2.2.1 after updating from 2.0.1. The backend still works at /admin but accessing any page on the frontend produces this error:

Notice: Undefined index: src in /home/snackxpr/public_html/vendor/magento/framework/View/Page/Config/Generator/Head.php on line 125

I've tried the following with no luck:

Change to developer mode
Change to production mode
Clear Magento cache from admin
Clear cache, page_cache, and generation folders' contents
Verify permissions on all Magento files
Deploy static content

I'm not sure what I've done wrong, but can't seem to get the site to work on the frontend anymore.


texts:
In one states in a Country I need to apply 0% tax rate in both shipping tax and product tax. The default tax rate is 6%.

How can I do this? In Magento product only can apply a type of rule.


texts: How to save backend form data in database in magento 2

texts: I have created an admin grid and also created an associated form for that grid. And then I have created a table for that grid. Now, how to save the form data that particular grid DB table


texts: Comparing a complete Magento (core) install to stock

texts:
we have been upgrading Magento since 1.3 using Magento connect. Sometimes in a jiffy, sometimes with a lot of debugging. We are now @ 1.8.1. -> I have the idea though that not all files are of the latest release.

My question: is there a script or method to compare all core and base / default files of Magento on my server to a stock Magento 1.8.1?

Thanks


texts: How to filter collection by date range on Magento 2?

texts:
I want to filter collection according :

start date < today
end date > today

I try this but my getSlides() function return empty results

<?php

namespace Vendor\Module\Block;

use Magento\Backend\Block\Template\Context;
use Vendor\Module\Api\Data\SlideInterface;
use Vendor\Module\Model\ResourceModel\Slide\CollectionFactory as SlideCollectionFactory;

class Carrousel extends \Magento\Framework\View\Element\Template
{
    /** @var \Vendor\Module\Model\ResourceModel\Slide\CollectionFactory */
    protected $slideCollection;

    /**
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Vendor\Module\Model\ResourceModel\Slide\CollectionFactory $slideCollection
     * @param array $data
     */
    public function __construct(
        Context $context,
        SlideCollectionFactory $slideCollection,
        array $data = []
    )
    {
        parent::__construct($context, $data);
        $this->slideCollection = $slideCollection;
    }

    public function getSlides()
    {
        $now = new \DateTime();

        $slides = $this->slideCollection->create()
        ->addFilter('startDate', ['lteq' => $now->format('Y-m-d H:i:s')])
        ->addFilter('endDate', ['gteq' => $now->format('Y-m-d H:i:s')]);

        return (count($slides) > 0) ? $slides : false;
    }
}

Please help me...


texts: The block template file didn't call in my controller?

texts:
I can post my code. it's working controller and also block file but template File not working.

Sending code here.

 <?xml version="1.0" ?>
<!--
/**
* Module Configuration
*
*@author Magento
-->
<config>
    <modules>
        <Magentostudy_News>
        <version>1.0.0</version>
        </Magentostudy_News>
    </modules>
    <frontend>
        <routers>
            <magentostudy_news>
                <use>standard</use>
                <args>
                <module>Magentostudy_News</module>
                <frontName>news</frontName>
                </args>
            </magentostudy_news>
        </routers>
    </frontend>
    <layout>
            <updates>
            <magentostudy_news>
            <file>news.xml</file>
            </magentostudy_news>
            </updates>
    </layout>

    <global>
         <blocks>
                <news><class>Magentostudy_News_Block</class></news>
         </blocks>

    </global>

</config>

My news.xml file

    <layout version="0.1.0">
<default>
    <reference name="content"></reference>
</default>
<news_index_index>
    <reference name="content">

    <block type="news/news" name="news.slider" template="news/news.phtml"></block>

    </reference>

</news_index_index>
<layout>

This is My controller file

    <?php

class Magentostudy_News_IndexController extends Mage_Core_Controller_Front_Action{

    public function _construct(){

      Mage::app()->loadArea($this->getLayout()->getArea());

        $this->loadLayout();
        $this->renderLayout();

    }

    public function indexAction(){

       $cpBlock = $this->getLayout()->getBlockSingleton('Magentostudy_News_Block_News');

    }

}

?>

This is My Block file

    <?php

class Magentostudy_News_Block_News extends Mage_Core_Block_Template{

    public function _construct()
    {
        parent::_construct();

        $this->setTemplate('news/news.phtml');
    }

}

?>

Tell me What type of issue in this file? and how to slove it?


texts: How can I add New language in magento 2 admin panel Locale Options?

texts:
I want to create Kurdish (ku_IQ) language site  magento 2.2.3 but

  Configuration==>Store View:  Kurdish ==> General==>Locale Options==> Kurdish  not found !!

Now i want to add Kurdish (ku_IQ) Locale Options ..

I create below file & Flush cache but nothing change on local new language

=> app/i18n/matinict/ku_iq/registration.php

=> app/i18n/matinict/ku_iq/language.xml

=> app/i18n/matinict/ku_iq/composer.json

=> app/i18n/matinict/ku_iq/ku_IQ.csv

Github:
https://github.com/matinict/magento-2-kurdish-language-pack

That not working.

How can add new Admin Locale Options language in magento 2?


texts: Collecting standard onepage checkout improvements for extension

texts:
there are many discussions of onestepcheckout over onepagecheckout. Possible advantages of
onestepcheckout are known. We however decided to stick to default Magento - but! with some conversion improving aditions. For example based on this article: http://ampersandcommerce.com/6-ways-to-improve-conversion-for-magento-enterprise-one-page-checkout/

Now my question is: what are simple improvements we can make (and should make) to the default onepagecheckout of Magento to increase conversion?

For example

Remove header and footer in checkout (20% conversion increase)
http://convertify.co.uk/improving-the-conversion-rate-of-the-magento-default-checkout/
Replace guest checkout with button - Enter e-mail and Click to
continue

(and/or) move E-mail entry field up in address form (and save by ajax onchange) to capture for cart abandonment follow-up
Add social login buttons for quick email and address entry above address form
Add a text link asking for couponcode (but not in your face so customers starts a oole search for coupon code)
Maybe skip he cart (if and when +, -, delete & small image are present in review step)
Show all forms/steps on same page (scroll to next item, no reloading)
Social like and fast create account on success page
Option to add custom CMS blocks underneath every step (if block exist then show)
Auto select common options (guest + same as shippin address)
http://icebergcommerce.com/software/blog/iss/article/easy-magento-checkout-page-improvements
Add a trust logo to the checkout (if you have one)
http://convertify.co.uk/improving-the-conversion-rate-of-the-magento-default-checkout/
also as seen on samcart
What do you think?

And a side question: Do any extensions exist that do some of this above?


texts:
once we click on login "button" , we are hiding the pop up , but we want to hide only if the login is successfull. [ if customer enter valid email id & password ]

controllers

protected function _createProduct($type, $doSave = true, $originalProduct, $newImagePath = "")
    {

        Mage::register('isSecureArea',true);
        $session = Mage::getSingleton('customer/session');

        $result = array(
            'success' => false
        );

        $login ="";
        $productId ="";
        if ($this->getRequest()->isPost()) {
            $login     = $this->getRequest()->getPost('login');
            $productId = $this->getRequest()->getPost('product_id');
        }
            // echo $login['product_id'];die;
            // if (!empty($login['username']) && !empty($login['password'])) {
                try {
                    if(isset($login) && (is_array($login) && !empty($login)) || ($login!="")){
                        $session->login($login['username'], $login['password']);
                        $result['redirect'] = $this->_getRefererUrl() ? $this->_getRefererUrl() : Mage::getUrl('customer/account', array(
                            '_secure' => true
                        ));
                        $result['success']  = true;
                        $customerId         = Mage::getSingleton('customer/session')->getCustomerId();
                    }
                    else{
                        $customerId = "";
                    }

                    $product->setName($originalProduct->getName());

                    $customerId = Mage::getSingleton('customer/session')->getCustomerId();
                    $product->setCreatedByCustomerId($customerId);

                    if ($doSave)
                        $product->save();
                    // To save inside my_designs

                    return $product;

                }
                catch (Mage_Core_Exception $e) {
                    switch ($e->getCode()) {
                        case Mage_Customer_Model_Customer::EXCEPTION_EMAIL_NOT_CONFIRMED:
                            $message = Mage::helper('customer')->__('This account is not confirmed. Click here to resend confirmation email.', Mage::helper('customer')->getEmailConfirmationUrl($login['username']));
                            break;
                        case Mage_Customer_Model_Customer::EXCEPTION_INVALID_EMAIL_OR_PASSWORD:
                            $message = $e->getMessage();
                            break;
                        default:
                            $message = $e->getMessage();
                    }
                    $result['error'] = $message;
                    $session->setUsername($login['username']);

                }
                catch (Exception $e) {
                    $result = "ERROR :".$e->getMesage();
                    /
                }
            // } else {
            //     $result['error'] = Mage::helper('customer')->__('Login and password are required.');
            // }
        // }

        Mage::unregister('isSecureArea');
        $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));

        // code for guest end
    }

Login Form

<form action="<?php echo $this->getUrl('example/amasty/createSimpleProductAndRedirect.....>

Email Address
<input type="text" name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" id="email" />
password
<input type="password" name="login[password]"  id="pass" />

<button onclick="hideWindow()" id="send2"><?php echo $this->__('Login') ?></button>


texts: Login and registeration stopped working suddenly - Magento 1.9

texts:
In my store login and register just keep on refreshing
i have add the following lines in every register.phtml
after form tag

<?php echo $this->getBlockHtml('formkey'); ?>

<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />**strong text**

but still not working !

configuration/general/web/cookie settings:

Hhtp only :no, Cookie restriction :no, Time :86400.

added these lines in login.phtml but still just refreshing

      <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />

added theses lines in accountController.php in login post action but still issue exists the same

* Login post action
 */
public function loginPostAction(){

// generate form_key if missing or invalid
if (!($formKey = $this->getRequest()->getParam('form_key', null))
        || $formKey != Mage::getSingleton('core/session')->getFormKey()) {
    $this->getRequest()->setParams(array(
        'form_key' =>Mage::getSingleton('core/session')->getFormKey()
    ));
}
    if ($this->_getSession()->isLoggedIn()) {
        $this->_redirect('*/*/');
        return;
    }


texts:
I just don't get this damn error and it's driving me crazy.

Problem 1
    - The requested package magento/product-enterprise-edition 2.2.7 exists as magento/product-enterprise-edition[2.2.6] but these are rejected by your constraint.

All i'm trying to do is upgrade from 2.2.6 to 2.2.7

Here is my composer.json file and when i first opened it up it said version 2.2.5 and the require was magento/product-enterprise-edition": "2.2.6",

{
    "name": "magento/project-enterprise-edition",
    "description": "eCommerce Platform for Growth (Enterprise Edition)",
    "type": "project",
    "version": "2.2.7",
    "license": [
        "proprietary"
    ],
    "require": {
        "magento/product-enterprise-edition": "2.2.7",
        "composer/composer": "@alpha",
        "magemojo/m2-ce-cron": "^1.2",
        "gene/bluefoot": "^1.0",
        "mageworx/module-advancedproductoptions": "2.15.0",
        "amasty/shopby": "^2.10",
        "amasty/feed": "^2.2",
        "amasty/smtp": "^1.1",
        "mageworx/module-downloads": "^2.5",
        "mageworx/module-seosuiteultimate": "^2.21",
        "mageworx/module-shippingrules": "^2.5",
        "mageworx/module-geoip": "^2.1",
        "amasty/module-page-speed-optimizer": "^1.0",
        "amasty/module-elastic-search": "^1.4"
    },
    "replace": {
        "amzn/amazon-pay-sdk-php": "*",
        "amzn/amazon-pay-and-login-with-amazon-core-module": "*",
        "amzn/login-with-amazon-module": "*",
        "amzn/amazon-pay-module": "*"
    },
    "require-dev": {
        "phpunit/phpunit": "~6.2.0",
        "squizlabs/php_codesniffer": "3.2.2",
        "phpmd/phpmd": "@stable",
        "pdepend/pdepend": "2.5.2",
        "friendsofphp/php-cs-fixer": "~2.2.1",
        "lusitanian/oauth": "~0.8.10",
        "sebastian/phpcpd": "2.0.4"
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/"
        },
        "psr-0": {
            "": [
                "app/code/"
            ]
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ],
        "exclude-from-classmap": [
            "**/dev/**",
            "**/update/**",
            "**/Test/**"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/",
            "Magento\\ToolkitFramework\\": "dev/tools/performance-toolkit/framework/Magento/ToolkitFramework/"
        }
    },
    "minimum-stability": "stable",
    "repositories": {
        "0": {
            "type": "composer",
            "url": "https://repo.magento.com/"
        },
        "mageworx_packages": {
            "type": "composer",
            "url": "https://packages.mageworx.com/"
        },
        "amasty": {
            "type": "composer",
            "url": "https://composer.amasty.com/enterprise/"
        },
        "xtento": {
            "type": "composer",
            "url": "https://repo.xtento.com"
        },
        "mirasvit-ssu2": {
            "type": "composer",
            "url": "https://34628:AB94VE15JD@packages.mirasvit.com/"
        },
        "firebear": {
            "type": "composer",
            "url": "https://firebearstudio.com/composer/download/package/type/ee/user/c039b63f7e733ff958729ef4803c06b0/password/ded1d044e9cf2c78c3be7c37fce9a77d/"
        }
    },
    "extra": {
        "magento-force": "override"
    }
}


texts: Magento 2 - How do I get just the changed data?

texts:
when I try to get the value, I get the old value and the new that just do not get changed at $this->scopeConfig->getValue

How to get the current values? Cash tried to clean. Does not help

class Config extends \Magento\Framework\App\Helper\AbstractHelper
{
protected $_objectManager;
public $error = true;
private $ch;

public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Framework\ObjectManagerInterface $objectManager)
{
    $this->_objectManager = $objectManager;
    parent::__construct($context);
}

public function getStoreConfig($config_path, $scopeCode = NULL)
{
    return $this->scopeConfig->getValue(
        $config_path,
        \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
        $scopeCode
    );
}
}
class Handy extends \Magento\Framework\App\Helper\AbstractHelper
{
public $_objectManager;
public $_conf;

public function __construct(
    \Magento\Framework\App\Helper\Context $context,
    \Magento\Framework\ObjectManagerInterface $objectManager,
    \Infomodus\Upslabel\Helper\Config $config
)
{
    parent::__construct($context);
    $this->_objectManager = $objectManager;
    $this->_conf = $config;

}
public
function setPackageDefParams($itemData = NULL, $storeId, $type = "shipment")
{
 /* It takes the value is not Tube and that which was established for the first time */
    $defParArr_1['packagingtypecode'] = $this->_conf->getStoreConfig('upslabel/packaging/packagingtypecode');
}
}


texts: Magento 2, opposite of finset needed to filter a product collection

texts:
I have a problem in a product collection that I need to filter.
I have a multiselect list with countries. When a selection is made the products need to be hidden from these countries.

$collection->addAttributeToFilter('available_not_for_countries', array(array('nin' => $billingCountry),array('null' => true)));

I know I need the opposite of finset like NOT FIND_IN_SET but I have no idea how to create the new Zend_Db_Expr for this in this filter.


texts: Magento 2: understand processing order of layout handles and other directives?

texts:
I am preparing for certification on Magento 2 and I am having difficulty understanding this questions. Can anyone help me with these questions?

Understand processing order of layout handles and other directives

In what order are layout handles processed? In what order is layout XML merged within the same handle? How can the processing order be influenced? What are common problems arising from the merge order of layout declarations?


texts: MAGENTO 2 REST API Checkout payment using credit card

texts:
I am trying to place an order using magento 2 rest api through credit card. I am calling the below api POST
rest/V1/guest-carts/{cartId}/payment-information(for guests) and rest/V1/carts/mine/payment-information using token(for customers). The payload request is

 "paymentMethod": {
     "method": "custom_pay",
        "additional_data":{
             "cc_cid":"000"
             "cc_type":"VI",
             "cc_exp_year":"2017",
             "cc_exp_month":"2",
             "cc_number":"xxxxxxxxxxxxxxxx"
         }
 }

It throws a generic error saying, error processing the payment. Please try to place an order again. Can anyone please suggest how to process an order using magento rest api through credit cards. Thank you.


texts: Magento1 Feefo widget js conflict with prototype.js

texts:
I want to display feefo  carousal widget on my website. For that I have generate the widget code and trying to add on my magento 1.9 website. But Feefo widget JS is conflict with the prototype.js and raised the below error in console,

  Error 1

feefo-widget.js:53 Uncaught TypeError: Array.prototype.map callback must be a function
    at Array.map (feefo-widget.js:53)
    at Array.toArray (prototype.js:1002)
    at t.exports (feefo-widget.js:48)
    at Object.<anonymous> (feefo-widget.js:41)
    at o (feefo-widget.js:1)
    at Object.<anonymous> (feefo-widget.js:41)
    at o (feefo-widget.js:1)
    at Object.<anonymous> (feefo-widget.js:48)
    at o (feefo-widget.js:1)
    at Object.<anonymous> (feefo-widget.js:48)
map @ feefo-widget.js:53
toArray @ prototype.js:1002
t.exports @ feefo-widget.js:48
(anonymous) @ feefo-widget.js:41
o @ feefo-widget.js:1
(anonymous) @ feefo-widget.js:41
o @ feefo-widget.js:1
(anonymous) @ feefo-widget.js:48
o @ feefo-widget.js:1
(anonymous) @ feefo-widget.js:48
o @ feefo-widget.js:1
(anonymous) @ feefo-widget.js:53
o @ feefo-widget.js:1
(anonymous) @ feefo-widget.js:1
(anonymous) @ feefo-widget.js:1

  Error 2

enter code here
feefo.js:8 Uncaught ReferenceError: feefoWidget is not defined
    at HTMLScriptElement.feefoWidgetScript.onload (feefo.js:8)

Please help me to fix this issue? I have tried but no solution found. Thanks in advance.


texts: how to getTemplate of a block in my template.phtml in magento2?

texts:
In magento2 I want to get the newsletter template or static block in my template.phtml.

I tried to use

<?php echo $this->getLayout()->createBlock("Magento\Newsletter\Block\Subscribe")->getTemplate('subscribe.phtml')->toHtml(); ?>

but without success. Can anyone help?


texts: Manadev / SEO Layered Navigation Plus : how can I prevent redirect for CMS pages?

texts:
Simple question: the extension SEO Layered Navigation Plus is forcing a 301 redirect for all the CMS pages requested with a trailing slash.

For example:

example.com/about-us/ => 301 => example.com/about-us

I need to remove this interference and manage this on my own.

I already checked in Magento's own rewrites and there is nothing about this. Moreover:disabiling the SEO Layered Navigation Plus module does the trick (but I cannot do it as a definitive solution).

The only other place where I see references to my redirecting CMS pages is in MANAdev own SEO URL Keys:

These value are read-only and cannot be deleted.

The shop is a fully patched Magento ver. 1.9.2.1.


texts: How to show layered navigation 2 times on category list with a different template file?

texts:
I succeed to load 2 times layered navigation by using

<action method="insert"><blockName>catalog.leftnav</blockName></action>

The problem here is that I need to load another template file than catalog/layer/view.phtml

So I tried to do

<block type="catalog/layer_view" name="catalog.layer.custom" after="currency" template="catalog/layer/custom.phtml"/>

Which works fine ... until I use the filters :

"You cannot define a correlation name 'custom_attribut' more than once"

Apparently we can't have 2 block type="catalog/layer_view"

So is there a solution to show layered navigation 2 times on category list with 2 different template file ?

OR

In the end I need to show only one attribute in the 2nd place, not the entire layered navigation.
So is it possible to load manualy the attribute in question depending of the current product list, as it is the case in the basic layered navigation ?

Thanks


texts: I have used cacheable false for one block on home page but my whole page uncacheable , how can i prevent it

texts: I have used cacheable="false" for 1 block, but varnish cache is not working due to this as whole page is uncaheable now. please suggest me alternate for this.


texts: Adding a new Block to the left part in the category view

texts:
I’m working in showing some more information in my category view, in the left bar, so I manage to find the file that grabs all the sub categories of the main category and display them in the left bar, the file is the left.phtml. So the problem that I have it’s that I want to display a subcategory, brands, but this one needs to have its own block, like in this picture.

Right now I’m just duplicating the first block of the sub categories, but I need to show a category there with all its sub categories, in the second block of the left. Here’s the code I have

<?php if (!Mage::registry('current_category')) return ?>
<?php $_categories = $this->getCurrentChildCategories(); ?>
<?php print_r($_categories); ?>
<?php $_count = is_array($_categories)?count($_categories):$_categories->count(); ?>
<?php if($_count): ?>

        <?php echo $this->__('Browse By') ?>

<?php echo $this->__('Category') ?>

                <?php foreach ($_categories as $_category): ?>
                    <?php if($_category->getIsActive() && $_category->getProductCount()>0): ?>

                        <a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>><?php echo $this->htmlEscape($_category->getName()) ?> (<?php echo $_category->getProductCount() ?>)

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

Marcas

                    //here it will display the brands of the category

<?php endif; ?>

So what I’m trying to obtain it’s the category the user it’s looking when the page displays, so I printed all the array $_categories, and have identify the [parent_id] => 139, it’s the one that have the information of the category that the user it’s watching, so I need a way to save this in a variable so I can validate this and display the category I need in the second part of the left Block.

Hope you guys can help me.

Thanks!


texts: Magento 2 Customer Group in Mageplaza Social Login

texts:
Hey guys please take a look at this image first!

I want to add a new field for selecting the customer group in the registration field. So the customer will take the responsibility for selecting the right customer group.

The problem here, I don't know how to get the customer group list to the UI and how to send it back the database when the customer has done the registering.

Please help me, I'm not very familiar with this Magento 2.x thing.


texts: PayPal missing on checkout after upgrade to 2.1.8

texts:
I upgraded from 2.1.7 to 2.1.8 but since the upgrade, PayPal Express no longer shows as a method of payment on the checkout page.

I've re-entered all API, switched to default theme, tried reinstalling the PayPal module, tried about every single PayPal option, made sure no conflicts with Braintree, made sure all other PayPal methods were disabled, but once on the payment screen, PayPal is not an option for payment.

I can get the buttons to show on all category pages, product page and even the cart. It's on the step 2 of one page checkout where there's no PayPal option for payments.

It is a multistore setup and it doesn't work on either site. I'm clueless at this point and read the dev, but it didn't mention anything about new PayPal settings, at least that I'm aware of. Any insight is greatly appreciated.


texts:
I have set up the following shipping costs:

flat rate = 5$ per order;
free shipping from 40$.

These settings work fine for normal products. But when it comes to recurring profiles (i.e. nominal items), only the 5$ flat rate shows up, even when orders are above 40$. And yet, according to Magento user guide:

  The list of available shipping methods during the shopping cart checkout is restricted to the fixed only (Fixed, Table Rates, and Free).

So the free shipping option should be available for recurring products.

I have tried switching store views, disabling flat rate option, etc. but it was of no help.

Does someone have an idea about what might cause this issue? Maybe it has to do with nominal items not being considered by Magento as part of the order total?

Many thanks!


texts: How to migrate data from 2.2.x EE to 2.2.x CE?

texts:
I want to migrate my commerce website to an open-source.

I want to migrate the database from EE to CE.

I referred to the below link.

https://blog.magepsycho.com/migrate-downgrade-magento-2-from-enterprise-to-community-edition/


texts: How to programmatically set a customizable Option in magento2?

texts:
I'm creating an order via code, more or less along the lines of How to create order programmatically in Magento 2?.

But I don't find a way to set a customizable option, that already exists on the product, by code. How to do it?


texts:
i am getting error like
something went wrong with your request.please try again later
in shipment page.

for reference please find the attached image.


texts: Demo store banner not disappearing in magento 2.3.4

texts: The demo store notice is not disappearing in Magento. I checked the no option in Display Demo store notice. I even cleared the cache but still, the banner is not removed in the front end. I have attached pictures.


texts:
I would like to ask, how i can find a full course for magento 2. i want to learn the frontend/backend development.

I have searched for a resource but all what i get is an introduction articles

Thanks in advance


texts: How to get the customer collection even some of the customer gets deleted?

texts:
I'm collecting the customer abandoned cart detail and have deleted some of the customers accidentally from the admin panel (including who has had the abandoned cart). So, now it's showing as below

  Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No
  such entity with customerId = 226

I want to get the collection even the customer id is no more.

Below is the sample code

if($dataloop['customer_id'] > 0 ) {

    $getcustomerData= $this->_customerRepositoryInterface->getById($dataloop['customer_id']);
    $billingAddressId = $getcustomerData->getDefaultBilling();

    if($billingAddressId > 0) {
        $billingAddress = $this->_addressRepository->getById($billingAddressId);
        $telephone = $billingAddress->getTelephone();
    }
}


texts:
I have a phtml template that display the formkey in my html file. Below is how I'm displaying this

<form action=""
      method="post"
      id="form-validate-pound"
      class="form form-cart">

     <?= $block->getBlockHtml('formkey') ?>

      <button type="submit"
       name="click_for_pound_action"
       data-cart-empty=""
       value="click_pound"
       title="<?= $block->escapeHtml(__('Click for Pound')) ?>"
       class="action clear btn btn-yellow" id="click_pound_button">
           <?= $block->escapeHtml(__('Click for Pound')) ?>

      </button>
</form>

So basically I need to display <?= $block->getBlockHtml('formkey') ?> in my knockoutjs template. Below I need to display it in this html file

<form action=""
      method="post"
      id="form-validate-pound"
      class="form form-cart">

      <button type="submit"
       name="click_for_pound_action"
       data-cart-empty=""
       value="click_pound"
       title="<?= $block->escapeHtml(__('Click for Pound')) ?>"
       class="action clear btn btn-yellow" id="click_pound_button">

   </button>
</form>


texts:
I have the following situation:

I have set my images size for single page in view.xml let say 2000x2000

    <width>2000</width>
   <height>2000</height>

The image now is ok, and is 2000x2000.

My problem:

If a will upload a image with 1200x800, or another values the images look stretch or small and looks really wierd.

Is there a solution to avoid the resize? or can be set a "auto" value in view xml?

What i want, is to upload a picutres, and afert this I want the original size to be shown on the page.

Is this possible?


texts: how to add default products to related products list

texts: I want to add default products of certain ids(example- 1,5,7,3) to be added to the list of related products always with all the products at the end for the product page and need not store in database, how to add these with related product collection in magento


texts:
In my form.php file I have added a field for an image to be inserted.

$fieldset->addField('main_image', 'image', array(
      'label'     => Mage::helper('blog')->__('Upload a Main Image'),
      'required'  => true,
      'name'      => 'main_image',
    ));

I'm not sure how to add this field to the database with my sql upgrade script?

So far I have this

<?php

$installer = $this;

$installer->startSetup();

$table = $installer->getConnection()
addColumn($installer->getTable('blog/blog'), 'main_image', array(
    'type'      =>

    ))

As you can see I didn't know what type to put it as, I've done a fair bit of googling and haven't found anything.

New to magento so thanks for the help :)


texts: Shipping method does not show until weight minimum reached

texts:
I deal with products which have very little weight. Recently I noticed Fedex shipping methods are not showing up until my cart fills up to a certain point. For example, no shipping methods appear until seven or more 0.0008lb items are added or when four or more 0.0014lb items are added. So it seems that shipping methods are not showing up until I've added a minimum of at least .0056lb of weight to my cart.

This problem did not occur until recently, is anyone aware of a change in Fedex's API? Is there something else I can do to get around this problem?
 To my knowledge none of our settings have changed, hence why I suspect a change to Fedex's API. Any other insight or advice would be helpful right now we can't sell to a large portion of our customers. Has anyone or is anyone else experiencing this problem?


texts: How to recognize order before saving in the backend ? - Magento 2

texts:
I would like to post some data in admin order create form and check if it exists and is set if not throw an exception.

I was thinking about adminhtml_sales_order_create_process_data event, but it is called several times. I think it would be nice to have some sort of event before the admin order is saved and check if this data exists.


texts: Saving a product on Admin clears the whole FPC in Magento EE 1.14.1.0

texts:
I knew this was a problem on the previous versions on Magento EE (e.g. 1.12), but still, Magento EE 1.4.1.0 clears the whole Full Page Cache when saving any product (even a disabled one) from Admin?

On a fairly busy site on AWS I can see 25K GET commands per minute vs 500K SET cpm on a Redis (ElasticCache)!!

I traced Redis activities on a quite test site, and this is what I see, the main key being 0e9_REQEST_EE51372B8799AD3A16DD49A1964E4AB7

When I request the cached page for product A I see:

1435257634.091959 [2 172.31.31.125:38722] "hget" "zc:k:0e9_REQEST_EE51372B8799AD3A16DD49A1964E4AB7" "d"
1435257641.610883 [2 172.31.31.125:38723] "hget" "zc:k:0e9_REQEST_EE51372B8799AD3A16DD49A1964E4AB7" "d"
1435257649.431088 [2 172.31.31.125:39672] "hget" "zc:k:0e9_REQEST_EE51372B8799AD3A16DD49A1964E4AB7" "d"
1435257656.495843 [2 172.31.31.125:39238] "hget" "zc:k:0e9_REQEST_EE51372B8799AD3A16DD49A1964E4AB7" "d"

That's good.  Then I save product B from Admin (or any other product):

1435257671.218878 [2 172.31.33.37:34363] "del" "zc:k:0e9_FPC_SSL_OFFLOADER_HEADER_CACHE" "zc:k:0e9_REQEST_3FD0B9858A5BD4C5983A82B3BA4E891E" "zc:k:0e9_REQEST_EE51372B8799AD3A16DD49A1964E4AB7" "zc:k:0e9_CONTAINER_WISHLISTS_D41D8CD98F00B204E9800998ECF8427E" "zc:k:0e9_REQEST_639EC14FF5C85E1A00496032A1231E21_METADATA" "zc:k:0e9_CONTAINER_WELCOME_ADCE947C7071C72E6355BC3C41B90079" "zc:k:0e9_FPC_DESIGN_EXCEPTION_CACHE" "zc:k:0e9_REQEST_A046F51ADE936C4EFB9B1512BA2B90C1" "zc:k:0e9_E8228F20992B43F6EF7E1CE3252D32AD_2" "zc:k:0e9_REQEST_90C1C30BED5AD6353D867C7F3D5F8564" "zc:k:0e9_REQEST_B7755138804A8360DE7D0D835B496D1A_METADATA" "zc:k:0e9_REQEST_AB2B9C7E9CF0787D0346A28670942F27_METADATA" "zc:k:0e9_E8228F20992B43F6EF7E1CE3252D32AD" "zc:k:0e9_REQEST_063C44E888CA616BDBE25E457B367F0C" "zc:k:0e9_FULL_PAGE_CACHE_SESSION_INFO" "zc:k:0e9_REQEST_9CA83DF96A22C7E7B08DC906DEBC3F3A_METADATA" "zc:k:0e9_813965A26C514B1594EAEC25A38F2ABE" "zc:k:0e9_REQEST_D6A18A31DE59D8CE26FCB251E8E2CAF6_METADATA" "zc:k:0e9_CONTAINER_WISHLINKS_73EDD6326C9C66E02B889380F86479F8"

Then I reload the page (now without cache) and I see:

1435257730.216541 [2 172.31.31.125:38973] "hget" "zc:k:0e9_REQEST_EE51372B8799AD3A16DD49A1964E4AB7" "t"
1435257730.219902 [2 172.31.31.125:38973] "hmset" "zc:k:0e9_REQEST_EE51372B8799AD3A16DD49A1964E4AB7" "d" "gz:\x1f\x8bx\x01\x8d\xddc\xac\xf0l\x100\xe8c\xdb\xb6m\xdb\xb6m\xdb\xb6m\xdb\xb6m\xdb\xf6y\x8em\xef\xfb}\xebMv\xb3\xbf:i;i\xd2\xa4i\xa6\xf7\xccU\x8f\x9c\x9b\xde+7\xec\xf6%\x82.\xb3\x7f\xeb&\xb5?

etc...

Release Notes - Magento Enterprise Edition 1.14.2 - "Resolved several issues related to full-page cache invalidation when products are saved."

So Magento knows about this issue, they've resolved it and apparently they don't have a patch for it.

Now let's see if my good client with Platinum support can get Magento to provide a patch within a decent time frame.

If anyone knows how to get this fixed, please share your profound knowledge! Thanks!

Best

Osvaldo


texts: Adminhtml module pass variables to template

texts: I'm working with Magento CE 1.7.0.2. I am creating a custom admin page. Tutorial I follow is from MagentoCommerce. It is a good enough tutorial but there is no information about how to pass variables to Form Template app/design/adminhtml/default/default/template/sintax/myform.phtml. Probably variable must be set in file app/code/local/Mage/Sintax/Block/Myform.php but in tutorial file is empty. How can I pass variable to myform.phtml?


texts:
How can I override Order.php  need to change button text for create new order,
please suggest.


texts: Custom Customer attribute grid not filter by asc or dec

texts:
I have tried to create custom customer attribute and it is working fine, but i have tried to filter this from grid like asc or dec. it is showing error.I have attached screen shot with it.

  [2018-11-21 05:09:40] main.CRITICAL: SQLSTATE[42S22]: Column not
  found: 1054 Unknown column 'customer_clv' in 'order clause', query
  was: SELECT main_table.* FROM customer_grid_flat AS main_table
  ORDER BY customer_clv ASC

customer_listing.xml file

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="customer_columns" class="Magento\Customer\Ui\Component\Listing\Columns">
        <column name="customer_clv" class="Suyati\Customer\Ui\Component\Listing\Column\Customerclv">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="editor" xsi:type="string">text</item>
                    <item name="sortable" xsi:type="string">true</item>
                    <item name="label" xsi:type="string" translate="true">Customer Lifetime Value</item>
                    <item name="sortOrder" xsi:type="number">10</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>


texts:
All admin Configuration perfect set.

But in front side after place order Continue Loader but not redirect thank you page. Order add in Admin side and Amount Not cut in customer account.

I use magento version 2.0.10 with VES pencil theme

Please help if you know.


texts: How to access model variable in block class magento

texts:
I am working on custom module.The code is written in following order:

class JG_Mymodule_Model_Mysql4_Mymodule{ }

One of my friend wirte code in model like that:

protected function _afterLoad(Mage_Core_Model_Abstract $object)
    {

        $select = $this->_getReadAdapter()->select()
            ->from($this->getTable('findyoursize_values'))
            ->where('findyoursize_id = ?', $object->getId());

        if ($data = $this->_getReadAdapter()->fetchAll($select)) {
            $storesArray = array();
            foreach ($data as $row) {
                $storesArray[] = $row['dimensions_id'];
            }
           $object->setData('in_products', $storesArray);
            Mage::getSingleton('core/session')->setMyValue($storesArray);
        }

        return parent::_afterLoad($object);

    }.

I want to use $object->setData('in_products') value in my block class , how can I access that value?


texts: Magento 2 How to Add File Upload Field in Admin Form?

texts: I want to file upload field into Admin Form By using Ui_component XML how to do same? can we use the same code as image upload or any other specific option for the same?


texts:
I need to display a custom template inside the mini cart, after the subtotal and above the buttons (view all and proceed to checkout). I have my template in /template/mymodule/mytemplate.phtml wich for the moment has only a p tag with 'test' written in it. Then I edited my local.xml to include my template. If I write:

<reference name="content"><block type="core/template" name="myname" as="myalias" template="mymodule/mytemplate.phtml" before="-" /></reference>

the block is correctly shown at the beginning of the content. But if I change the reference with

<reference name="cart_sidebar">

nothing is shown in the mini cart.

So, what do I have to reference in local.xml to have my template displayed inside the mini cart?


texts: Magento 1.9.1 Getting a 404 error page on multi store

texts:
My original magento store is on www.antistaticesd.com (default category)
My another store using the same magento and other root category(business store) is supposed to be at  www.antistaticesd.com/business

I changed the base URL in sysytem > Configuration to www.antistaticesd.com/business  for this store view.

I copied and pasted two files  index.php and  .htaccess from the root to the "business" directory.
When I hit www.antistaticesd.com/business  on the browser, it gives me a 404 error page.
Please tell me what further steps do I take to solve this.


texts:
In our webshop we specify the fabric of the clothes.

We have an attribute text field for this.
Apart from this we have 3 languages in our store.

Is there a way i could automatically translate some words?

Example.

In English:
80% cotton, 20% wool

In German:
80% Baumwolle, 20% Wolle

I could make a list of the most common used fabrics, with there translations.
This would safe me a lot of time when creating the products.

We have magento 1.8.1CE


texts: Stock inventory for products sold in different packing sizes

texts:
I'm selling a product, which I import in packs of 1440 pieces. I split these up and sell them in bags of 100, 720, or 1440 pieces. Until now I have set these up as one configurable product with 3 options for number. But how would it be possible to keep track of stocks in the system?

If I have 1 pack with 1440 pieces, I need the system to show that if a pack with 100 pieces is sold, the 1440 pack is out of stock (because now only 1340 pieces left). Is it possible to do this in Magento?
I don't want to make it a single product where people can type any number, because I want to sell only these 3 sizes of bags - not for instance 17 or 132 pieces.


texts: Magento 1.9 - How to get grand total in Mage_Payment_Block_Info

texts:
I'm looking for how to get grand total in Mage_Payment_Block_Info.phtml.
I know grandtotal comes from $quote so i was trying to bring this data to Mage_Payment_Block_Info.php. But I can't find answer!

  app/design/frontend/rwd/default/template/payment/info/default.phtml

#1 .
<?php echo number_format(Mage::helper('checkout')->getQuote()->getGrandTotal(), 2) ?>
#2 .
<?php echo number_format(Mage::getModel('checkout/session')->getQuote()->getGrandTotal(),2) ?>
#3 .
<?php echo number_format(Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal(), 2) ?>

#4 .
<?php print_r(Mage::helper('checkout')->getQuote()->getData('grand_total')) ?>
<?php $grandTotal = Mage::getModel('checkout/session')->getQuote()->getGrandTotal();
echo $grandTotal?>

I tested above them but they don't work. Do i have to declare that i use checkout model in Mage_Payment_Block_Info.phtml. If it is, how can i do that?


texts: _isUrlInternal function issue with multiwebsite magento 2

texts:
I am getting the issue with the redirection with multi-website.
I am on multiwebsite and I am trying to redirect the URL from admin using the above code
return $this->_redirect($this->_redirect->getRefererUrl());

_isUrlInternal function is creating the issue with that.
As in my code, store is changed and due to that _isUrlInternal  is always redirecting me to second website home page due to _isUrlInternal  function condition.

Can't we modify the _isUrlInternal  function definition so that it can understand the admin URL as well?


texts: Display Product collection issue in Magento 2

texts:
I have a product collection and i have used below code to display in my template file as follows.

 <?php
 $productCollectionSku = array('111', '222', '333', '444', '555', '666'); // these are the comma separated skus.

        foreach($productCollectionSku as  $productSku){
            $product =  $block->getProductBySku($productSku);
            $productName = $product->getName();
            $shortDescription = $product->getshortDescription();
            $productUrl = $product->getProductUrl();
            $productId = $product->getId();

            $productPrice = $product->getPrice();
            $addtoCartUrl = $block->getAddToCartUrlForProduct($productSku);
        ?>

                <a href="<?php echo $productUrl; ?>" class="product photo product-item-photo">

                    <img class="product-image-photo" src="<?php echo $productImage; ?>" width="240" height="300" alt="<?php echo $productName; ?>">

                    <a class="product-item-link" href="<?php echo $productUrl; ?>">
                        <?php echo $productName; ?>

                                <?php echo $productPrice; ?>

                    <form action="<?php echo $addtoCartUrl; ?>" method="post" class="best-items">
                        <?php echo $block->getBlockHtml('formkey')?>
                        <input type="hidden" name="productId" value="<?php echo $productId; ?>">
                        <button type="submit" title="Add to Cart" class="action tocart primary">
                            Add to Cart
                        </button>
                    </form>

    <?php } ?>

Here is my getProductBysku function

  public function getProductBySku($sku)
   {
    return $this->productRepository->get($sku);// injecting this class in my block file \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,

   }

The above code working fine if all of the SKUs are simple products,

I need to prepare for configurable products also. Can we get the product info
and display here config products with all the variations as swatches.

All I am looking here is how to display configurable products here exactly like in the category list page with the swatches being shown.

Where all the color and size swatches shows with clickable option.

Can anyone help me to implement this one?

Thanks in Advance!!


texts:
I'm new to Magento 2.

  Fatal error: Class 'Mage' not found in \vendor\magento\module-theme\view\base\templates\root.phtml on line 23

Can anybody tell me how to solve this?


texts:
I'm trying to do exporting orders from magento store

 $myOrder=Mage::getModel('sales/order');
    $orders=Mage::getModel('sales/mysql4_order_collection');
    $allIds=$orders->getAllIds();

but it returns all orders to me. How can i filter orders by state "new"? i'm trying $orders->addFieldToFilter('state',Array('eq'=>"new")); or $myOrder->setData('state','new'); but magento still returns all orders. Help


texts: Missing argument and undefined variable 'text'

texts:
Unsure on how to debug this issue. Recently started getting hundreds of these in system.log.

2013-08-30T11:20:46+00:00 ERR (3): Warning: Missing argument 1 for Mage_Core_Block_Text::setText()  in /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Core/Block/Text.php on line 36
2013-08-30T11:20:46+00:00 ERR (3): Notice: Undefined variable: text  in /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Core/Block/Text.php on line 38

This is filling the log up at a rapid pace as they are being thrown on every page load.

Coming from the Magento core yet there have been no modifications to the core at all.

Don't suppose anyone has any ideas on this at all?


texts: Adding category title, image and description to above layered nav

texts:
I'm trying to make a small change to the 2 columns left design for the default category pages (specifically layer navigation). My design calls for adding the category title, description and thumbnail to the left column right above the layer navigation.

The problem is I can't find anything relevant at all. Searching for category and columns just brings forth the mass swarm of people who want to move columns around, not add to them.

I've tried adding a new block reference to XML files and adding a new phtml template for them but after about 10 tries of different methods of adding references blocks functions code snippets I've completely lost track and have no clue what the correct (or any working) method is.

If anyone can point me in the right direction at-least I'd at least be very grateful.


texts: Backorder notification not showing if saleable qty 0 and actual qty is 1 because order hasn't been shipped

texts:
Backorder notification isn't showing in the cart if saleable qty= 0 and the actual qty= 1 when the order has been shipped with that item it will then show the correct notification in cart. "We don't have as many quantity as you requested, but we'll back order the remaining 1." (See image)
The problem is customers can purchase a product thinking that it is in stock when it actually isn't until the order containing the item is shipped.