texts: Pass Category's attribute in url and display its sub categories

texts:
Background :

I am displaying sub-categories of category in Json format once we pass category id in url....

example : sitename.com/script.php?category_id=2

Note : I created these categories using Ultimate Module Creator custom module

<?php

require_once('app/Mage.php');
Mage::app();

$cat_model = Mage::getModel('ultimate_mars/category');
$reqCat = (int)$_REQUEST['category_id'];

if ($reqCat > 0)
{
$_cate = $cat_model->getTreeModel()->getCollection()->addFilter("parent_id", $reqCat);
}
else
{
$_cate = $cat_model->getTreeModel()->getCollection()->addFieldToFilter("entity_id", array('gt' => 1));
}

$category = array();
foreach ($_cate as $_category) {
    $category[] = array("name" => $_category->getCategoryname(), "id" => $_category->getEntityId());
}

echo json_encode($category);

Requirement :

Now instead of Category_id , i want to pass Attribute Product Type ( producttype is attribute code ) & get the same result....

so i replaced this line in above code :

$reqCat = (int)$_REQUEST['$attributeCode'];

Issue :

Than i tried to access with sitename.com/script.php?attributeCode=T_SHIRT , but its displaying all categories & sub categories :

app/code/local/Ultimate/Mars/Model/Category - Source.php

<?php

class Ultimate_Mars_Model_Category_Source extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
{

    public function getAllOptions($withEmpty = false)
    {
        if (is_null($this->_options)) {
            $this->_options = Mage::getResourceModel('ultimate_mars/category_collection')

            ->load()
            ->toOptionArray();
        }
        $options = $this->_options;
        if ($withEmpty) {
            array_unshift($options, array('value'=>'', 'label'=>''));
        }
        return $options;
    }

    public function getOptionText($value)
    {
        $options = $this->getAllOptions(false);
        foreach ($options as $item) {
            if ($item['value'] == $value) {
                return $item['label'];
            }
        }
        return false;
    }

    public function toOptionArray()
    {
        return $this->getAllOptions();
    }

    public function getFlatColums()
    {
        $attributeCode = $this->getAttribute()->getAttributeCode();
        $column = array(
            'unsigned'  => true,
            'default'   => null,
            'extra'     => null
        );
        if (Mage::helper('core')->useDbCompatibleMode()) {
            $column['type']     = 'int';
            $column['is_null']  = true;
        } else {
            $column['type']     = Varien_Db_Ddl_Table::TYPE_INTEGER;
            $column['nullable'] = true;
            $column['comment']  = $attributeCode . ' Category column';
        }
        return array($attributeCode => $column);
    }

    public function getFlatUpdateSelect($store)
    {
        return Mage::getResourceModel('eav/entity_attribute_option')
            ->getFlatUpdateSelect($this->getAttribute(), $store, false);
    }
}

Here is link to Download module : link


texts: After enabling Google Tag Manager, Paypal Express checkout breaks

texts:
When going through the one step checkout process, Paypal Express is encountering an error where the page is not being properly redirected.

By debugging into opcheckout.js, in the function setStepResponse, this line was stopping execution of all JS:

$('checkout-'+response.update_section.name+'-load').update(response.update_section.html);

Some additional debugging showed that response.update_section.name was undefined.

By adding a custom observer to the hook controller_action_postdispatch_checkout and ensuring a name is set, I was able to fix this problem.

The Enterprise extension GoogleAnalyticsUniversal has an observer tied to the same event that calls the function setGoogleAnalyticsOnCheckout.  It appears that this function is causing the problem.

Is this a bug in Enterprise?  Or is it possible the data is "corrupted" upstream by a custom extension?


texts: Is it possible to move container on a particular width?

texts: How it is possible to change the position of a container in particular width for example:(768 pixel).My task is to change the position of sidebar.main block to the bottom of products listing in  catalog category view page on mobile width.Actually sidebar.main is showing above the product listing in mobile width.


texts:
In my Magento admin panel, some of the codes are mystically getting disappeared.
When I put this code in the editor

  What's Trending

 Holiday Gift Guide

 Animal Prints

 Plaid Suits

and then clicking on Show/Hide Editor it makes this code disappear

Code in editor(Before clicking Show/Hide Editor )

Code after clicking on Show/Hide Editor or saving it first time opening the same piece of code for updating.

Whats this issue. I don't understand.

The same thing happens with this code also.

Privacy Policy&nbsp;

This makes below code disappear

Privacy Policy&nbsp;


texts: How do I check the values of the of the residential/commercial, liftgate, scheduled delivery selections inside Magento shipping module

texts: How do I check the values of the of the residential/commercial, liftgate, scheduled delivery selections (made by customer) inside Magento ce shipping module?


texts: Hide out of stock products in Layered Navigation

texts:
I will describe my magento issue as best I can.

I have shoes size filter in Layered Navigation but for some reason when i press ex. "size 43" then the results display shoes that had number 43 and now they are now out of stock or they are available in other sizes.

What I need is the out of stock products to be displayed normal but when i press some of the filters ex."shoes size or shirt size" then out of stock products or products with that filter that have been sold to not be displayed.

I hope that someone has the answer.

Thanks

Steve


texts: Send Customer Registration Confirmation mail using SOAP API

texts:
I am trying to create API for customer signup. I works perfectly but now i need to add one more functionality. i want to sent customer confirmation mail when customer register. i have tried all but result are null.

$session =  $client->login($apiuser, $apikey);
try{
    $result = $client->call($session,'customer.create',array(array('email' => "$email", 'firstname' => "$firstname", 'lastname' => "$lastname", 'password' => "$password", 'website_id' => "$websiteId", 'store_id' => "$storeId", 'group_id' => 1)));
    if($result){
        $cust = Mage::getModel('customer/customer')->setWebsiteId(Mage::app()->getStore()->getWebsiteId())->loadByEmail($email);
        $cust->sendNewAccountEmail('confirmed');
        echo json_encode("New Customer created with Id-$result");
    }
}
   catch( Exception $e ) {
    echo json_encode($e->getMessage());
}

My above code create customer successfully but not work for mail confirmation.


texts: Magento 2: How to set a custom price of a product?

texts:
In Magento 2, I need to set the custom price of a product pro-grammatically when admin creates an order from backend.

For example, in this page

  'www.site.com/admin/sales/order_create/index/key/a0f4c...

when an admin click's 'Add Selected Product(s) to Order' (after clicking 'add products'), I want to compute prices of that selected products through some formula then assign these prices as a custom price to that products.

So what I really need is a piece of code by which Magento assigns custom price to product.


texts: Can I have a required field based on a condition?

texts:
I created a new EAV attribute for customer called "existing customer". it's a yes/no question.
I have an option that comes up if the person clicks on 'no' called "what are you interested in?", with a text input.
It's also a required field.
Is there any way to make the "what are you interested in?" field not required if the customer answers yes to the previous customer question?
Thanks


texts: Security Patch SUPEE-10570 — Error "Hunk #4 FAILED at 1973" during installation

texts:
I am trying to apply the patch SUPEE-10570 into a Magento Enterprise store (1.13.0.1). However, I am receiving the following error message:

Hunk #4 FAILED at 1973.
1 out of 4 hunks FAILED -- saving rejects to file app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php.rej

At first I thought it could be due to a missing patch, but it looks like I already have all of them.

List of applied patches:

 SUPEE-5344
 SUPEE-1533
 SUPEE-5994
 SUPEE-6285
 SUPEE-6482_EE_1.13.0.2
 SUPEE-6788
 SUPEE-7405-EE-1-13-0-2
 SUPEE-7405
 SUPEE-1533
 SUPEE-3941
 SUPEE-8788
 PATCH_SUPEE-9767_EE_1.13.0.1_v2
 SUPEE-10266-1.13.1.0
 SUPEE-10415-1.13.0.1
 SUPEE-9652

What else should I be looking for?

Thank you.


texts:
I would link to add a link to Order History in my top.links menu .
I add this code in my local.xml:

 <reference name="top.links">
    <action method="addLink" translate="label" module="sales"><name>orders</name><path>sales/order/history/</path><label>My Orders</label></action>
</reference>

But every time i click on "Order link" the path is added to the url so I have someting link : site.com/customer/sales/order/history and then site.com/customer/sales/order/history/sales/order/history.
What is wrong?


texts: Need to run Reindex command in Controller (programmatically) in Magento 2

texts: I need to run command php bin/magento indexer:reindex in Controller.


texts:
I'm trying to add external js in my module which will be applicable on all pages on frontend. This is the process I've followed:
1. Code in my layout file app/code/Lapisbard/General/view/frontend/layout/default.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="frontend-1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <head>
        <link src="Lapisbard_General::js/ro_allpage.js"/>
    </head>
    <body/>
</page>

2. Added js file at app/code/Lapisbard/General/view/frontend/web/js/ro_allpage.js with following code

define('js/theme', [
    'jquery',
    'domReady!'
], function ($) {
    'use strict';
    console.log('Hello');
});

I see my file is being added on the page but it throws console error Uncaught ReferenceError: define is not defined. What I'm doing wrong?
Also I tried code below which throws Uncaught ReferenceError: require is not defined

require(["jquery"], function($){
    console.log("hello");
});


texts: How to Run magento 2 command without connect putty?

texts:
When our Magento 2 on live server and we require to enable disable modules, flush cache , deploy static files etc ,we need to configure SSH.

but now not connect my putty so how to run all command


texts: Multiple magento vhost listening to same queue in different rabbitMQ vhost - Cron is not working

texts:
I have setup 2 vhosts for Magento 2.2. Both listen to same rabbitMQ instance with different vhosts. However, the queue names are same (separate queues are created in eah vhost). Now, when we run the consumer crons, we can see only consumer crons from only one vhost. When we stop cron for the one running, then we can see the cron for other vhost starts up.
It looks like, magento checks if the cron with same consumer names are running, it wont span the consumer with same name(although paths are different for vhost, but looks magento checks only for consumer name match). Can someone confirm?
And what will be alternate to this.

Shall we change consumer names in new vhost? We tried this and it works, we can see both crons running.)
Any Other suggestion?


texts: Magento EE upgrade from 2.2.9 to 2.3.4 issue

texts:
I have upgraded Magento from version 2.2.9 to 2.3.4 using the composer.

And run the setup: upgrade, then I am getting below error.

  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (#sql-27b_17e, CONSTRAINT QUOTE_ITEM_PARENT_ITEM_ID_QUOTE_ITEM_ITEM_ID FOREIGN KEY (parent_item_id) REFERENCES quote_item (item_id) ON DELETE CASCADE), query was: ALTER TABLE quote_item MODIFY COLUMN item_id int(10) UNSIGNED NOT NULL  AUTO_INCREMENT COMMENT "Item ID", MODIFY COLUMN quote_id int(10) UNSIGNED NOT NULL DEFAULT 0  COMMENT "Quote ID", MODIFY COLUMN updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT "Updated At", MODIFY COLUMN product_id int(10) UNSIGNED NULL   COMMENT "Product ID", MODIFY COLUMN store_id smallint(5) UNSIGNED NULL   COMMENT "Store ID", MODIFY COLUMN parent_item_id int(10) UNSIGNED NULL   COMMENT "Parent Item ID", MODIFY COLUMN discount_amount decimal(20, 4)  NULL DEFAULT 0 COMMENT "Discount Amount", MODIFY COLUMN base_discount_amount decimal(20, 4)  NULL DEFAULT 0 COMMENT "Base Discount Amount", MODIFY COLUMN tax_amount decimal(20, 4)  NULL DEFAULT 0 COMMENT "Tax Amount", MODIFY COLUMN base_tax_amount decimal(20, 4)  NULL DEFAULT 0 COMMENT "Base Tax Amount", MODIFY COLUMN row_total decimal(20, 4)  NOT NULL DEFAULT 0 COMMENT "Row Total", MODIFY COLUMN base_row_total decimal(20, 4)  NOT NULL DEFAULT 0 COMMENT "Base Row Total", MODIFY COLUMN row_total_with_discount decimal(20, 4)  NULL DEFAULT 0 COMMENT "Row Total With Discount", MODIFY COLUMN base_tax_before_discount decimal(20, 4)  NULL  COMMENT "Base Tax Before Discount", MODIFY COLUMN tax_before_discount decimal(20, 4)  NULL  COMMENT "Tax Before Discount", MODIFY COLUMN price_incl_tax decimal(20, 4)  NULL  COMMENT "Price Incl Tax", MODIFY COLUMN base_price_incl_tax decimal(20, 4)  NULL  COMMENT "Base Price Incl Tax", MODIFY COLUMN row_total_incl_tax decimal(20, 4)  NULL  COMMENT "Row Total Incl Tax", MODIFY COLUMN base_row_total_incl_tax decimal(20, 4)  NULL  COMMENT "Base Row Total Incl Tax", MODIFY COLUMN discount_tax_compensation_amount decimal(20, 4)  NULL  COMMENT "Discount Tax Compensation Amount", MODIFY COLUMN base_discount_tax_compensation_amount decimal(20, 4)  NULL  COMMENT "Base Discount Tax Compensation Amount", MODIFY COLUMN gift_message_id int(11)  NULL   COMMENT "Gift Message ID", ADD CONSTRAINT QUOTE_ITEM_PARENT_ITEM_ID_QUOTE_ITEM_ITEM_ID FOREIGN KEY (parent_item_id) REFERENCES quote_item (item_id)  ON DELETE CASCADE, ADD CONSTRAINT QUOTE_ITEM_QUOTE_ID_QUOTE_ENTITY_ID FOREIGN KEY (quote_id) REFERENCES quote (entity_id)  ON DELETE CASCADE, ADD CONSTRAINT QUOTE_ITEM_STORE_ID_STORE_STORE_ID FOREIGN KEY (store_id) REFERENCES store (store_id)  ON DELETE SET NULL


texts: Magento 1: Multi website in Magento but Common checkout

texts:
Would I like to know that is it really possible?

I have set up multi-website using Magento 1.x, but my requirement is whenever the customer adds the product to cart, then moves to check out than checkout will process on my main website domain.

Same like Shopify, in Shopify, whenever you check out they redirect the user to their fix domain that it something like chekckout.shopify.com

I don't know, but is it really possible in Magento?


texts:
I want to add a watermark to my images in the store. But when a dealer is logged in, he must see the original images. The dealer are in the customer group Dealers.

Is it possible to hide the watermark for the dealers / a customer group?

I have been searching for this, but I cannot find it.


texts:
i have implemented advance bundle js in magento2 all good but when i go to checkout page and change country no shipping method change.

then i debug the issue the issue comes when we enable bundling then i open my require config js file and debug the code bundles/checkout when i remove it complete then its working.

then i keep to js in bundle checkout if i remove Magento_Checkout/js/checkout-loader its working but when i put it then not works there are more than 25 js which creating problem what should i do now.

 require.config({
           bundles: {"bundles/checkout":[
       "Magento_Checkout/js/checkout-loader",
       "Magento_Paypal/js/view/payment/paypal-payments"
  });


texts: How to filter zero-prices products end of list?

texts:
I want all of the zero-priced products for different filtering options (Name etc) to end of list (search page and category product list). For example product sorted by name arrange the products in alphabetical order, but if product price is zero it should be last of list even if name of the product start with a letter A.

What is the best way to do this feature?


texts: Magento 2.2 import product images from csv giving error

texts:
I am getting an error while importing CSV in Magento 2.2:

  "Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s): 4".

I tried all the solutions and also checked the folder permission (755). All the images are uploaded in /pub/media/import folder and in the CSV.

I just mention the name of the images.


texts: Custom attribute not saving correctly in staging environment

texts:
I developed a Magento2 extension that enables adding product attributes of a custom type. When I save such custom attribute on my local machine, the script writes “frontend_input_renderer” property of the attribute to the database as expected ('catalog_eav_atttribute' table). When I do it on staging, it just adds a table row without this property in it (it writes null).

Local machine runs MAMP with php 7.0.0 and mysql 5.6.25.

Staging server runs Centos7 with php 7.0.7 and php-fpm, MariaDB 10.1.14, and SElinux.

What could cause different script execution in these two environments?


texts: How to get Customizable Options of a simple product in magento 2

texts:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$product = $objectManager->get('Magento\Framework\Registry')->registry('current_product');

$customOptions = $objectManager->get('Magento\Catalog\Model\Product\Option')->getProdu

ctOptionCollection($product);

print_r($customOptions);

I have created a customizable option, Option Title named as Colors and used the above code, but it didn't return any value.


texts: Just installed magento, can't access magento connect

texts:
Just installed Magento for the first time locally on a mac via phpMyAdmin. Used this speedy 1:43 video to figure out how to do it https://www.youtube.com/watch?v=iWOW6futhVQ

The site is up locally @ http://127.0.0.1:8888/ and /admin is also working allowing me to login to the portal.

The next goal is to access Magento Connect Manager to download an extension but when I navigate to System > Magento Connect > Magento Connect Manager and then put in the same credentials used in the admin panel the result is "Invalid user name or password".

One verification I've made is making sure the the Administrators role has All Resource Access but it's still showing the same error.

So my question is, might you know of anything that may need to be done for a fresh installation to access the Magento Connect Manager, or any ideas on how I may troubleshoot the issue?

Thank you for reading!


texts: to retrieve the list of stock data by product ID using catalogInventoryStockItemList in android using k2 soap

texts:
Hi I want to display is the stock of particular product available in my android app where I want to retrive the products through k2 soap api through
catalogInventoryStockItemList  method plz can anyone guide me how to proceed to this?

     public  void getproductstock(){

    SoapObject request = new SoapObject(NAMESPACE, "catalogInventoryStockItemList");

    //SoapSerializationEnvelope envelope =new SoapSerializationEnvelope(SoapEnvelope.VER11);

    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

    envelope.dotNet = true;

    envelope.setOutputSoapObject(request);

    HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

    try
    {

        androidHttpTransport.call("", envelope);

        SoapObject response = (SoapObject)envelope.getResponse();

           String result = response.getProperty(4).toString();

        tv_products.setText(result);

    }

    catch(Exception e)

    {

        e.printStackTrace();

    }

}

Sir but i am unable to fetch and display is_in_stock attribute of particular product in textview


texts: How to create a link to a product in a different Website/Store View?

texts:
I have 2 websites with 2 Store Views per website. 1 website is the 'shop' and 1 is the 'website'. 'Website' does not have cart or customer account functionality but I want to add a button "Shop now!" to the product page that links to the same product in the 'shop' and it should also be the corresponding Store View (Store Views are Swedish and English).

How can I get the link to the same product page as the product page "I'm on" but in another Store View (store id)? I have something like this in mind for the logic of it but I don't know how to finish it and I'd be really grateful for some help;

-- UPDATED CODE --

<?php if (Mage::app()->getStore()->getStoreId() == 3): ?>
    <?php $product= Mage::getModel('catalog/product')->setStoreId(1)->load([var product ID]); ?>
    <?php echo 'getProductUrl().'">Shop now!'; ?>
<?php else :?>
    <?php $product= Mage::getModel('catalog/product')->setStoreId(2)->load([var product ID]); ?>
    <?php echo 'getProductUrl().'">Shop now!'; ?>
<?php endif; ?>

Thanks a bunch in advance and do let me know if I need to clarify anything in my question!


texts:
We are in the process of planning for a project, an eCommerce project. The client already has a working project, for some reason they decided to rebuild from scratch with some additional functionalities. Their major concern was to handle high traffic at all times because their current version fails so.

We chose to go with Magento 2.x for building up the e-commerce project.

But really confused with which web server to proceed. Nginx or Apache?

And what are the steps to be taken care of to speed up Magento store?


texts: Magento 2 - How to revert model save in afterSave method

texts:
I have two tables "first_table" and  "second_table".
I am using afterSave method in "first_table" model class like bellow

namespace Vendor\Module\Model;

use Magento\Framework\Model\AbstractModel;

/**
 * FirstTable model
 *
 */
class FirstTable extends AbstractModel
{
    /**
     * Model construct that should be used for object initialization
     *
     * @return void
     */
    protected function _construct()
    {
        $this->_init(\Vendor\Module\Model\ResourceModel\FirstTable::class);
    }

    /**
     * Processing object after save data
     *
     * @return $this
     */
    public function afterSave()
    {
        // some code
        parent::afterSave();
    }
}

In after save function, I want to take current record ID (By $this->getId()) and save some data in "second_table".
Now what I want is if "second_table" insert goes fail, I want to revert the "first_table" insert and redirect user again to edit page. Is it possible ?


texts: How to change the price of a product on the category page?

texts:
I am building a module for customer specific pricing. Here is psuedocode for altering the price for a specific product. This works on the product page and through the checkout journey.
$_product = $observer->getProduct(); //price = 4.07
$price = $this->_getPrice($customer_id, $_product->getSku()); ///price = 10.01

$_product->setPrice($price);
$_product->setFinalPrice($price);
//Disable tier pricing.
$_product->setTierPrice([]);

This code is in an observer, listening to the catalog_product_load_after event.
In order to change the price on the category page I am doing the same code but listening to the events catalog_product_collection_load_after and catalog_block_product_list_collection.
$_collection = $observer->getCollection();
foreach ($_collection as $_product) {
    $price = $this->_getPrice($customer_id, $_product->getSku()); ///price = 10.01
    $_product->setPrice($price);
    $_product->setFinalPrice($price);
    //Disable tier pricing.
    $_product->setTierPrice([]);
}

I've added logging and can see that the new price is being retrieved and set to the product object, but is not persisting to the category page. I think it's because the $_collection is not passing the product in the foreach by reference, so any changes I make to product don't get saved back into the collection.
How do I make the category page show my updated product price?


texts:
I am trying to override an html file in the lib folder, but I cant get it to work. Here is what I have so far:

Path to file I want to override: /lib/web/mage/gallery/gallery.html

Path to file I want to override with: /app/design/frontend/{Module}/{Theme}/web/mage/gallery/gallery.html

I have flushed the cache, but it still only loads the original file.

Any help with this would be appreciated.

Update:
If I delete the lib files, it will use the files I want to use, but I want to override the lib files, not have to delete them.


texts:
I have two knockout components. The xml in layout is:

    <referenceContainer name="content">
        <block class="Vendor\Module\Block\List" name="some_name" template="list.phtml">
        <arguments>
            <argument name="jsLayout" xsi:type="array">
                <item name="components" xsi:type="array">
                    <item name="js_list" xsi:type="array">
                        <item name="component" xsi:type="string">Vendor_Module/js/js-list</item>
                        <item name="config" xsi:type="array">
                            <item name="template" xsi:type="string">Vendor_Module/js-list</item>
                        </item>
                        <item name="children" xsi:type="array">
                            <item name="js_item" xsi:type="array">
                                <item name="component" xsi:type="string">Vendor_Module/js/js-item</item>
                                <item name="config" xsi:type="array">
                                    <item name="template" xsi:type="string">Vendor_Module/js-item</item>
                                </item>
                            </item>
                        </item>
                    </item>
                </item>
            </argument>
        </arguments>
        </block>
    </referenceContainer>

The component js_list has a template that contains the fallowing:

 0 ">

The content of the template from the component js_item is printed out but when I try to access the variable defined in it testVarThatPrintsTest :

define(
    ['jquery', 'ko', 'uiComponent', 'Magento_Ui/js/modal/modal', 'domReady!'],
    function($, ko, Component, modal) {
        'use strict';

        return Component.extend({

            initialize: function() {
                this._super();
            },

            defaults: {
                template: 'Vendor_Module/js-item',
                testVarThatPrintsTest: 'TEST TEST TEST@'

            }
        });
    }
);

I get the fallowing error:

Message: testVarThatPrintsTest is not defined
    at text (eval at createBindingsStringEvaluator (knockout.js:2624), <anonymous>:3:57)
    at update (knockout.js:4260)
    at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3004)
    at evaluateImmediate (knockout.js:1737)
    at Object.ko.computed.ko.dependentObservable (knockout.js:1946)
    at knockout.js:3002
    at Object.arrayForEach (knockout.js:151)
    at applyBindingsToNodeInternal (knockout.js:2974)
    at applyBindingsToNodeAndDescendantsInternal (knockout.js:2854)
    at Object.ko.applyBindings (knockout.js:3065)

What is the problem here?


texts: Multi site access with a single i.p address

texts:
I followed the steps on this tutorial to setup my multi-domain site, and its working fine, but now i want to setup my another site which has multi sites but currently I have single i.p address to access them all. I tried different tricks in httpd.conf, .htaccess and also changed site address in admin panel at site level but it did not work. How I can make them working with single ip address?

Any help would be highly appreciated.

  My httpd.conf file

<VirtualHost *:80>
    DocumentRoot /var/www/
    ServerName 1.2.3.4
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot /var/www/
    ServerName 1.2.3.4/a
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot /var/www/
    ServerName 1.2.3.4/b
</VirtualHost>

My .htaccess file

 SetEnvIf Host 1.2.3.4 MAGE_RUN_CODE=base
 SetEnvIf Host 1.2.3.4 MAGE_RUN_TYPE=website
 SetEnvIf Host ^1.2.3.4 MAGE_RUN_CODE=base
 SetEnvIf Host ^1.2.3.4 MAGE_RUN_TYPE=website

 SetEnvIf Host 1.2.3.4/a MAGE_RUN_CODE=site_a
 SetEnvIf Host 1.2.3.4 MAGE_RUN_TYPE=website
 SetEnvIf Host ^1.2.3.4 MAGE_RUN_CODE=site_a
 SetEnvIf Host ^1.2.3.4 MAGE_RUN_TYPE=website

 SetEnvIf Host 1.2.3.4/b MAGE_RUN_CODE=site_b
 SetEnvIf Host 1.2.3.4/b MAGE_RUN_TYPE=website
 SetEnvIf Host ^1.2.3.4/b MAGE_RUN_CODE=site_b
 SetEnvIf Host ^1.2.3.4/b MAGE_RUN_TYPE=website

I tried ips like 1\.2\.3\.4 in .htaccess as well.

I also changed the site unsecure/secure urls to 1.2.3.4/a and 1.2.3.4/b but no gain.


texts: Reorder option is disabled in my account

texts: Some order display Recorder only. Check attachment.


texts: How can I achieve the following image(shop this collection) in Magento 2 product page by adding an attribute?


texts: product image not uploading in magento 1.9 version

texts:
I have installed magento 1.9 version in server. when i am trying to upload product image it is not uploading.

I already search in google i got few different ways.

  1) code change in uploader.php page but no use image is not uploading.

  2) folder permissions need to give 777 i tried this also. but no use
  image is not uploading.

if any one can reply for this grate help to me.


texts: How to save custom model which has foreign key column

texts:
I've created a custom table to store some custom payment gateways' fee into a table sales_order_payment_gateway_fee , which is mapped by simple model Model\GatewayFee, Model\ResourceModel\GatewayFee, and corresponding GatewayFee\Collection. I don't use EAV model for this.

The table structure is simple like this:

id PK
transaction_id
order_id (FK -> sales_order.entity_id)
payment_id (FK -> sales_order_payment.entity_id)
amount
net
fee

I register this event checkout_submit_all_after to get the order_id and payment_id, then I try to save the model:

$gatewayFee = $this->orderPaymentGatewayFeeFactory->create();
$gatewayFee->setData('order_id', $order->getEntityId());
$gatewayFee->setData('payment_id', $payment->getEntityId());
$gatewayFee->setData([
    'amount' => $data['amount'],
    'net'    => $data['net'],
    'fee'.   => $data['fee'],
]);
$this->gatewayFeeResource->save($gatewayFee);  // exception this line

This is the thrown exception:

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento_local`.`sales_order_payment_gateway_fee`, CONSTRAINT `SALES_ORDER_PAYMENT_GATEWAY_FEE_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_order` (`entity_id`)), query was: INSERT INTO `sales_order_payment_gateway_fee` (`amount`, `fee`, `net`) VALUES (?, ?, ?) {"exception":"[object] (Zend_Db_Statement_Exception(code: 23000)

Apparently, I already set data for the order_id and payment_id, which shows correct values on observer, but they are not added into the SQL statement.

Can anyone point me out how to fix it?

Thank you.


texts:
Case:

Suppose we are observing event: catalog_product _collection_ load_before in some custom page. For example:

class MagePsycho_Custom_Model_Observer
{
    public function catalogProductCollectionLoadBefore(Varien_Event_Observer $observer)
    {
        if (Mage::app()->getFrontController()->getAction()->getFullActionName() == 'some_custom_route')
        {
            $collection = $observer->getCollection();
            $collection->addAttributeToFilter('custom_attribute', 123);
        }
    }
}

And lets say we have some other blocks which also uses the product collection to display the products, which now becomes empty as the above filter gets added.

How would you safely observe the event in this kind of situation so that it works for both(custom page & blocks)? Please share your views.


texts: Magento 2: How to import csv to add more value to product attribute's dropdown options in admin?

texts:
I have created admin grid with layout and block now I need to know how to import CSV and use its value as array, for adding values I have written

Controller:

<?php

namespace Vendor\OptionImport\Controller\Index;

class Mydummy extends \Magento\Framework\App\Action\Action
{
    protected $_eavSetupFactory;
    protected $_storeManager;
    protected $_attributeFactory;
    protected $eavConfig;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Eav\Model\Config $eavConfig,
        \Magento\Eav\Setup\EavSetupFactory $eavSetupFactory,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attributeFactory
    ) {
        $this->_eavSetupFactory = $eavSetupFactory;
        $this->_storeManager = $storeManager;
        $this->_attributeFactory = $attributeFactory;
        $this->eavConfig = $eavConfig;

        parent::__construct($context);
    }

    public function execute()

    {
        echo "Hey Supriya";
        // an array of options which I want to add to attribute //
        $allStores = $this->_storeManager->getStores();
        $attribute_arr = ['Example1','Example2','Three'];

        //Load attribute by attribute code “manufacturer” to get attribute id //
        $attributeInfo=$this->_attributeFactory->getCollection()
            ->addFieldToFilter('attribute_code',['eq'=>"manufacturer"])
            ->getFirstItem();
        $attribute_id = $attributeInfo->getAttributeId();
        $option=array();
        $option['attribute_id'] = $attributeInfo->getAttributeId();
        foreach($attribute_arr as $key=>$value){
            $option['value'][$value][0]=$value;

            foreach($allStores as $store){
                $option['value'][$value][$store->getId()] = $value;
            }
        }
   // add this option array to attribute
        $eavSetup = $this->_eavSetupFactory->create();
        $eavSetup->addAttributeOption($option);
    }
}


texts: event observer for the creation of new products

texts:
I want to run the observer only when the product is created and not when it is updated. I found this discussion: product-creation-and-saving-existing-products and I followed Tim Ramsey's advice.

So I put this in the config.xml

<global>
    <models>
        <wally_logproductupdate>
            <class>Wally_LogProductUpdate_Model</class>
        </wally_logproductupdate>
    </models>
    <events>
        <catalog_product_save_before>
            <observers>
                <wally_logproductupdate>
                    <class>wally_logproductupdate/observer</class>
                    <method>beforeSave</method>
                    <type>singleton</type>
                </wally_logproductupdate>
            </observers>
        </catalog_product_save_before>
    </events>
</global>

and this in Observer.php:

class Wally_LogProductUpdate_Model_Observer
{
    protected $isNew = false;

    public function beforeSave($observer)
    {
        $product = $observer->getEvent()->getProduct();
        if ($product->isObjectNew()) {
            $this->isNew = true;
        }
    }

    public function afterSave($observer)
    {
        $product = $observer->getEvent()->getProduct();
        if ($this->isNew) {
            $name = $product->getName();
            $sku = $product->getSku();
            $price = $product->getPrice();

            Mage::log("[{$name} ({$sku}) {$price}] aggiornato", null, 'product-updates.log');
        }
    }
}

The problem is that the log file is not updated when a new product is created.

How can i solve?


message: %fieldName is a required field.

fieldName: criteria

texts:
I am trying to get all slides, but I have an error:

{"message":"%fieldName is a required field.","parameters":{"fieldName":"criteria"}}

when I call this API:

   /V1/jeffSliderSlide/search:

Any help ?

My code is:

/**
     * @api
     * @param \Magento\Framework\Api\SearchCriteriaInterface $criteria
     * @return \Magento\Framework\Api\SearchResultsInterface
     */
    public function getList(\Magento\Framework\Api\SearchCriteriaInterface $criteria)
    {
        $searchResults = $this->searchResultsFactory->create();
        $searchResults->setSearchCriteria($criteria);
        $collection = $this->slideCollectionFactory->create();
        foreach ($criteria->getFilterGroups() as $filterGroup) {
            $fields = [];
            $conditions = [];
            foreach ($filterGroup->getFilters() as $filter) {
                $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq';
                $fields[] = $filter->getField();
                $conditions[] = [$condition => $filter->getValue()];
            }
            if ($fields) {
                $collection->addFieldToFilter($fields, $conditions);
            }
        }
        $searchResults->setTotalCount($collection->getSize());
        $sortOrders = $criteria->getSortOrders();
        if ($sortOrders) {
            /** @var SortOrder $sortOrder */
            foreach ($sortOrders as $sortOrder) {
                $collection->addOrder(
                    $sortOrder->getField(),
                    ($sortOrder->getDirection() == SortOrder::SORT_ASC) ? 'ASC' : 'DESC'
                );
            }
        }
        $collection->setCurPage($criteria->getCurrentPage());
        $collection->setPageSize($criteria->getPageSize());
        $objects = [];
        foreach ($collection as $objectModel) {
            $objects[] = $objectModel;
        }
        $searchResults->setItems($objects);
        return $searchResults;
    }


texts: PayPal IPN received but payment not added to order

texts:
We received a PayPal payment this morning where the transaction was not added to the order in Magento (payment still shows as pending).

I checked the IPN history on the PayPal site and it shows that the IPN was sent successfully and received a response code 200 from our website. This suggests to me that the problem was not on PayPal's end.

I have checked through our access_log and system.log files but there is nothing noteworthy in either of those files at the time of the IPN. The access_log shows:

access_log:173.0.81.1 - - [07/Sep/2015:09:46:52 +0000] "POST /paypal/ipn/ HTTP/1.0" 200 509 "-" "PayPal IPN ( https://www.paypal.com/ipn )"

Other PayPal payments have been received today and payment details are being added correctly.

We are running Magento CE 1.7.0.2 and are using PayPal Website Payments Standard.

Can anyone suggest how to identify what could cause this payment to not be applied to the order properly?


texts: How to validate phone number for billing address in magento2.1.7?

texts: How to validate phone number for billing address (should accept only number's and it should not exceed more then 10 digits) in magento2.1.7?


texts:
I am new to magento 2.1..

I have a problem to show the products.Product is shown in that page but the issue is the when i am pressing add to cart button it is not pressing also same problem in add to wishlist,compare.


texts: How to send shipment email notification using rest api magento 2?

texts:
How we can send email notification of shipment using rest api

  /V1/shipment/:id/emails

what parameters and what need to change in url need to do?


texts: how to download wishlist in excel format in magento 1.9

texts: i want to download my wishlist in excel format without any plugin, currently i'm able to download my wishlist as docx type. Please help.


texts: How to set quantity of cart as 0 programmatically

texts:
I want to programm Magento in such a way that the quantity of cart displays zero even if the product is Added into the cart. Initially there will be one product into cart but it hasn't to be displayed on the top menu cart link

I have used following code but I don't get enough response.

Mage::getModel('checkout/cart')->getQuote()->setItemsQty(0);


texts: Magento 2 - discount depend on Payment Method does not work

texts:
I go to Magento 2 Admin > Marketing > Promotions > Cart Price Rules and create a new Rule: Bank Transfer Payment:

Tab Rule Information:

Rule Name: Bank Transfer Payment
Status: Active
Websites: Main Website
Customer Groups: select all
Coupon: No Coupon
Uses per Customer: 0
From: blank
To: blank
Priority: 0
Public in RSS Feed: No

Conditions tab:

If ALL  of these conditions are TRUE :

Payment Method  is  Bank Transfer Payment

Actions Tab:

Apply: percent of product price discount
Discount Amount: 2
Maximum Qty Discount is Applied To: 0
Discount Qty Step (Buy X): 0
Apply to Shipping Amount: No
Discard subsequent rules: No
Free Shipping: No
Apply the rule only to cart items matching the following conditions (leave blank for all items): nothing

Then I enable Bank Transfer Payment method, go to checkout page, click on Bank Transfer Payment but the Discount Percent Price does not show up in Order Summary.

Please give me an advice. How can make a discount on payment method on Magento 2. For Magento 1, it wroks well.

Thanks very much


texts: Success/Error/Warning messages not displaying on Ajax form submit

texts:
I have a form page where there were originally two separate forms, but I have combined them using javascript to submit the data to a controller action. The first is submitted like any Magento form and the second is submitted via ajax after the first. The problem is even though I have the success message and error message code in the controller, the success message never appears on the page after it reloads.

public function editprofileAction(){
        if($this->getRequest()->isPost()){
            list($data, $errors) = $this->validateprofiledata();
            $fields = $this->getRequest()->getParams();
            if(empty($errors)){
                $write = Mage::getSingleton('core/resource')->getConnection('core_write');
                $collection = Mage::getModel('marketplace/userprofile')->getCollection();
                $collection->addFieldToFilter('mageuserid',array('eq'=>$this->_getSession()->getCustomerId()));
                foreach ($collection as  $value) {
                    $data = $value;
                }
                ...

           try{
                if(!empty($errors)){
                    foreach ($errors as $message){$this->_getSession()->addError($message);}
                }else{
                    Mage::getSingleton('core/session')->addSuccess( Mage::helper('marketplace')->__('Profile information was successfully saved'));}
                    $this->_redirect('marketplace/marketplaceaccount/editProfile');
                return;
            }catch (Mage_Core_Exception $e){
                $this->_getSession()->addError($e->getMessage());
            }catch (Exception $e){
                $this->_getSession()->addException($e,  Mage::helper('marketplace')->__('Cannot save the customer.'));
            }
            $this->_redirect('customer/*/*');
        }else{
            foreach ($errors as $message) {Mage::getSingleton('core/session')->addError($message);}
            $_SESSION['new_products_errors'] = $data;
            $this->_redirect('marketplace/marketplaceaccount/editProfile');
        }

        if(empty($errors)){
            Mage::getSingleton('core/session')->addSuccess('Profile information was successfully saved');
            $this->_redirect('marketplace/marketplaceaccount/editProfile');
         }
    }
    else{
        $this->loadLayout( array('default','marketplace_account_editaccount'));
        $this->_initLayoutMessages('customer/session');
        $this->_initLayoutMessages('catalog/session');
        $this->getLayout()->getBlock('head')->setTitle('Profile Information');
        $this->renderLayout();
    }
}


texts:
Recently, we have migrated your site on Amazon servers. Right now, we have a multi-server architecture having

1 ELB
2 EC2 r3.xlarge instances
2 RDS, one for blogs and other for Magento
Cloudfront CDN

I am not sure if the current architecture( Implement by Certified AWS company) is perfect, but i have few issue/queries that i am curious to know

When we need to import a file ( inventory for e.g.) vis Data profile
on which instance that files will be uploaded? How do Magento picks
the files from correct instance where files are uploaded. I have
faced issue saying file not exists when I tired to run data profile.
If we upload any images for a CMS pages, then will image file be
uploaded on server first and then on CDN or directly on CDN? If the
files are loaded on Instance first then how to CDN know on which
instance files are uploaded?

I have tried to search on Google a lot but never got any satisfactory results.

Can anyone please provide their comments/suggestion for above.

Thanks


texts:
I recently started working in Magento 2, after reading docs and tutorial I set up my first magento site and is running successfully on my localhost.
I am now setting a new Magento 2 project, I used the same way I setup the previous project, but now, my custom.css file not loading and I can't even find that in the page source if it's loaded. I've checked many times the path etc., and everything seems OK.

I've added the custom.css file in the following path:

app/design/frontend/<vendor>/<theme>/Magento_Theme/layout/default_head_blocks.xml

I have noticed that running the command

  php bin/magento setup:static-content:deploy

not generating the custom.css file in the static folder.
Please help me sort out where I am doing mistake.

Thanks.


texts: magento2.2 layered navigation limit items

texts:
i'm wondering is it possible to limit filter section in layered navigation somehow? i have one category with large amount of values (~100), i'd like to limit it somehow, for example by scrollbar etc.

i have found one suggestion to add css style:

dl#narrow-by-list dd >ol {
max-height: 150px;
overflow-y: scroll;
overflow-x: hidden;
}

but it doesnt work for me. probably my layered navi using another style?


texts: Magento 1.9.2.4 configurable swatches don't change main image

texts:
I've been stuck for hours on this one.

Product I'm working on: this site

I've made this configurable product, enabled swatches and added photos for each of those associated products. However when I click on color and size, can't get main image to change.

How do I fix it ?


texts: Blank page one page checkout after upgrading from 1.9.3.8 to 1.9.3.9/10

texts:
I'm bringing our webshop up to date, but when upgrading from 1.9.3.8 to either 1.9.3.9 or 1.9.3.10 going to checkout gives a blank page.

Shopping cart works, can even update it or ask for sending cost quote. But going to checkout doesn't work.

I erased my system log and did a purchase until (and including) going into checkout. Under 1.9.3.8 no system log is generated. Under 1.9.3.9 my system log is as follows:

2018-09-23T13:19:59+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 55: parser error : Opening and ending tag mismatch: customer_account line 50 and reference  in /home/admin/domains/engrano.nl/public_html/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2018-09-23T13:19:59+00:00 ERR (3): Warning: simplexml_load_string():         \</reference>  in /home/admin/domains/engrano.nl/public_html/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2018-09-23T13:19:59+00:00 ERR (3): Warning: simplexml_load_string():                     ^  in /home/admin/domains/engrano.nl/public_html/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2018-09-23T13:19:59+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 56: parser error : Opening and ending tag mismatch: layout line 29 and customer_account  in /home/admin/domains/engrano.nl/public_html/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2018-09-23T13:19:59+00:00 ERR (3): Warning: simplexml_load_string():     \</customer_account>  in /home/admin/domains/engrano.nl/public_html/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2018-09-23T13:19:59+00:00 ERR (3): Warning: simplexml_load_string():                        ^  in /home/admin/domains/engrano.nl/public_html/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2018-09-23T13:19:59+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 57: parser error : Extra content at the end of the document  in /home/admin/domains/engrano.nl/public_html/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2018-09-23T13:19:59+00:00 ERR (3): Warning: simplexml_load_string(): \</layout>  in /home/admin/domains/engrano.nl/public_html/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2018-09-23T13:19:59+00:00 ERR (3): Warning: simplexml_load_string(): ^  in /home/admin/domains/engrano.nl/public_html/shop/app/code/core/Mage/Core/Model/Layout/Update.php on line 450

This doesn't seem to be in a file I've been customizing....


texts:
I have this line of codes for my magento custom merchant panel for my magento project.

<?php
$store_id = 1;
require_once "../app/Mage.php";
Mage::app()->setCurrentStore($store_id);
$session = Mage::getSingleton('admin/session');
$username = Mage::app()->getRequest()->getPost('username');
$password = Mage::app()->getRequest()->getPost('password');
$session->login($username,$password);
$user = $session->getUser();
$url = Mage::getBaseUrl()."merchant/validate-voucher.php";
if($session->isLoggedIn()==1){
    Mage::app()->getResponse()->setRedirect($url)->sendResponse();
}

I need help in fixing the memory leak issue on this code.

HP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /lib/Zend/Db/Statement/Pdo.php on line 291, referer: http://dev.supremedeals.com/merchant/

I am getting this error after i login and disappears when i hit enter again on my browser url bar.


texts:
I have installed following extension.

https://github.com/thaiphan/magento2-s3/wiki/Installation

While trying to upload the images using export cmd, getting below error
The AWS credentials you provided did not work. Please review your details and try again. You can do so using our config script.


texts: Don't display swatches on product listing

texts:
Basically i can see swatches on both the product listing and the product page.
How do i remove the ones on the product listing, so I only have them on the product page

I only want the swatches to be displayed here.

And i dont want the swatches to be displayed on the page below.


texts: magento 1 configurable product options get only enabled products

texts:
Hi i have landing page in that page i am displaying 10 products in that have some product have configurable and some simple.For configurable have multiple options like size, color.What i am facing issue is like it showing all products For example SKU:98 for this configurable product have 4 simple products color:red,black, Size:S,L. in this S size and Black color is disabled but still it is loading
if ($_product->getTypeId() == "configurable"):
                                        $childProducts = Mage::getModel('catalog/product_type_configurable')
                                                ->getUsedProducts(null, $_product);
                                        ?>
                                        <?php $attValConfig = $_product->getTypeInstance()->getConfigurableAttributesAsArray($_product); ?>
                                        <?php if (sizeof($attValConfig)): ?>
                                            <?php foreach ($attValConfig as $attValConfigSingle):
                                                $childProducts = Mage::getModel('catalog/product_type_configurable')
                                                ->getUsedProducts(null, $_product);
                                            ?>

                                                    <?php echo $attValConfigSingle['label']; ?>:

                                                    <select name="super_attribute[<?php echo $attValConfigSingle['attribute_id']; ?>]" id="attribute<?php echo $_product->getId() ?>" class="required-entry super-attribute-select" onchange="fabchangeprice(this)">
                                                        <option price="<?php echo $price_option; ?>">Choose an option...</option>
                                                             <?php foreach ($childProducts as $child){
                                                                 //echo "jdhfkjds".$child->getStatus();
                                                                  if($child->getStatus() == 2 ) continue; ?>
                                                                     <option price="<?php echo '$' . $child->getFinalPrice(); ?>" value="<?php echo $child[$attValConfigSingle['attribute_code']] ?>">
                                                               <?php echo $child->getResource()->getAttribute($attValConfigSingle['attribute_code'])->getFrontend()->getValue($child); ?></option>
                                                                <?php //}
                                                             } ?>

                                                        ?>
                                                    </select>

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

How can remove that how to achieve this functionality


texts: Magento 2 : How to send form data to admin email?

texts: How to send the form data through email to admin I have created a form in the template and on submit click it should send data to the admin.


texts: Checkout: Mixed cart, split order and split payment

texts:
Trying to workout the best approach to checkout(mixed cart) a specific product type with payment1 and all other product types with payment[2].

I guess splitting the order will be one part, do you have any clues as to how I would then process split(1) with payment(1) and split(2) with payment(2) ?

My initial thoughts were to somehow create a product set that doesn't have a price and to then mask the cart total. Couldn't find anything on approaching that way though.


texts:
i have a custom model that i want to display in a page-anted grid for users on a page in storefront. i can call the collection in the phtml with a filter and it works, but when i move the call to the block it does not work if i try to filter (i can call the whole collection just when i add the filter it stops working)the collection any ideas? this is the call

Mage::getModel('model/name')->getCollection()->addFilter('group_id', $val);


texts: How to post form data from Unit Test controller to custom controller | Magento 2

texts:
I have a custom module with form. I want to post values from unit test file to my custom module controller.

I tried
$this->request = $this->getMockBuilder(\Magento\Framework\App\RequestInterface::class)
            ->disableOriginalConstructor()
            ->setMethods(['getPost'])
            ->getMockForAbstractClass();

    $this->request->expects($this->any())->method('getPost')->will($this->returnSelf());

It passed POST check but how to pass variable to controller.

thanks in advance


texts: Add quantity to dropdown list in Configurable product

texts:
i want to show product quantity in dropdown list ( in Configurable product ). Now i can see only title and price, but I want to see title and quantity or title price and quantity

Ex.
--Chose Size --
XL - 5 items
L - 2 items
S - Out of Stock


texts: SUPEE-6788 Patch CMS Pro News/Blog by MageWorld not working

texts:
I'm preparing my Magento module config.xml file for SUPEE-6788 security patch, following this post
http://magento.com/security/patches/supee-6788-technical-details
According to this post, I need to update

    <admin>
        <routers>
            <cmspro_admin>
                <use>admin</use>
                <args>
                    <module>MW_Cmspro</module>
                    <frontName>cmspro_admin</frontName>
                </args>
            </cmspro_admin>
        </routers>
    </admin>

I have updated to

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <cmspro_admin after="Mage_Adminhtml">MWCmsproAdmin_Adminhtml</cmspro_admin>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

However, when I click on the navbar to add news, it just takes me to the home page, I think I don't have any admin permission maybe?
Could anyone point out what I have done wrong?


texts: How to deselect all options from multiselect in Backend?

texts:
I am using the extension reCAPTCHA. There is a multiselect and I selected two options.

I successfully deselected them by holding CTRL while clicking on them. But if I save then they are selected again. Is this a known bug?

How can I workaround it?


texts:
Is it possible to display the Magento product catalog (just a select few columns) on a page on my company site? My company's Magento install is integrated with our ERP system so it shows real-time inventory qty's. I'd like to do this to allow  the sales team a quick and convenient way to sort different product categories and see availability. I'm running 1.9.2.4

Any push in the right direction would be great!


texts: magento 2 override the default "luma" fotorama-item product detail page slider .phtml

texts:
I want to change the fotorama-item and palace the custom zoom functionality on the product detail page. I am using the default "luma" theme not my custom theme.

I have gone to the admin panel and Enabled Template Path Hints for Storefront and it's using the below file:

E:/xampp/htdocs/learnmagento/vendor/magento/module-catalog/view/frontend/templates/product/view/gallery.phtml

So, just want to remove fotorama and palace the below example when we hover on the image.

http://www.elevateweb.co.uk/image-zoom/examples

I want to use the Inner Zoom.

Anybody can help me how I can palace the Inner Zoom functionality when user hove on the image.


texts: Is there a way to put advanced search form in category sidebar in Magento 2.2.6? The form is in catalogsearch/advanced/ page


texts: How to use block from different theme in magento?

texts:
Is it possible to use a block from a different theme from the back-end?

I am using a customized theme without a layered navigation in for the catalog pages (category). So could I just get the layered navigation from the rwd theme via the "category"-- "custom design" tab. For example by calling the left block from rwd theme via the "Custom Layout Update"?


texts: Is my default.xml in the correct location?

texts:
I am trying to remove the footer links on my theme. I am using the Luma theme as a parent theme.

I added this code-

<referenceBlock name="footer_links" remove="true" />

To my default.xml file. I then copied that file to

/files/magento2/project-community-edition/app/design/frontend/Magento/ThemeName/layout

I have checked and made sure my theme is physical and not virtual.

I have purged every cache multiple times but still no luck. I am trying this on Magento 2.1.7


texts: Customize onepage/success url with observer

texts:
I must to add order_id to url of onepage/success page,  I write this code, but it appears to be not working.

         <events>
            <controller_front_init_routers>
                <observers>
                    <dk_images>
                        <!-- <type>singleton</type> -->
                        <class>DK_Images_Controller_Router</class>
                        <method>initControllerRouters</method>
                    </dk_images>
                </observers>
            </controller_front_init_routers>
        </events>

and controller

<?php
class DK_Images_Controller_Router extends Mage_Core_Controller_Varien_Router_Abstract
{
    public function initControllerRouters($observer)
    {
        $front = $observer->getEvent()->getFront();
        $front->addRouter('checkout/onepage', $this);
        return $this;
    }

    public function match(Zend_Controller_Request_Http $request)
    {

        if (!Mage::isInstalled()) {
            Mage::app()->getFrontController()->getResponse()
                ->setRedirect(Mage::getUrl('install'))
                ->sendResponse();
            exit;
        }
        $urlKey = Mage::helper('core/url')->getCurrentUrl();//trim($request->getPathInfo(), '/');

        $parts = explode('/', $urlKey);

        if (count($parts) < 3) {
            return false;
        }

        if ($parts[5] == 'onepage' && $parts[6] == 'success') {

            $lastOrderId = Mage::getSingleton('checkout/session')
                   ->getLastRealOrderId();

            $request->setModuleName('checkout')
                    ->setControllerName('onepage')
                    ->setActionName('success')
                    ->setParam('id', $lastOrderId);
            $request->setAlias(
                Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS,
                $urlKey
            );
            return true;
        }
        return false;
    }
}


texts:
On Magento orders and invoices the seguence is city, state, postal code.
I'm living in Holland and I would like to change it on orders and invoices to
postcal code,  city, state

Example L.A., California, Beverly Hills 91210 would change to  Beverly Hills 91210, LA , California

Can somebody please explain how to achieve this


texts: What is the proper way to get a sales_order by increment_id from the database

texts:
Hi i'm relatively new to Magento2 development and it has really been difficult to find straight answers to programmatical problems.

For instance; a simple: How to i retrieve an sales_order record from the database so that i can read and update all of it's fields in the database.

Some people say use the ObjectManager directly.
Some people say use the ObjectManager but through DI
Some people say don't do that, use a OrderRepository
Some people say yes, do that last one but do it with a OrderRepositoryInterface and do it directly
Some people say yes, do that last one but do it with a OrderRepositoryInterface and use DI
Some people give examples what to do not, but fail to mention what to do.
Some people give examples that don't work.
etc etc etc

So, if i want to retrieve an Order in the Sales module and i
want to be able to update and read all fields in the databases table
what is the correct official and preferred way to do that in Magento2?

Where can i find examples, and where can i find the logic behind this.
I just bought 4 magento2 developer books, and all are quite useless in
this aspect.


texts: Magento Customer address missing when creating new order + new customer from backend

texts:
Running on Magento 1.8

Steps to reproduce:

Create Order > Create New Customer
Add product
Fill in every mandatory field including address
Create Order
After Order is created, go to Manage Customer. From there you can
see the customer address is blank.


texts:
I just want to inject an object into my plugin.

/* @var \Magento\Checkout\Model\Session */
protected $session;

public function __construct(\Magento\Checkout\Model\Session $session)
{
    $this->session = $session;
}

For some reason, I get an error message:

  Fatal error: Uncaught TypeError: Argument 1 passed to
  Company\Modul\Plugin\Checkout\LayoutProcessorPlugin::__construct()
  must be an instance of Magento\Checkout\Model\Session, none given,
  called in ...

I've deleted the generate directory, clear the cache, but I am still getting this error.

Why is it?


texts: magento configurable product please specify the product's option(s) i- Display missing options under notification

texts:
i am adding products to cart but it shows me:

please specify the product's option(s)

how i can display which product option is missing in notifications.

basically i want to display options missing to user so he know what he has to select before add to cart.

Thanks


texts: What is the use of Magento 2.2.6 product image cache?

texts:
I have some points regarding the Product Image Cache to discuss with you.

I have created a product from the Magento admin panel.
After creating the product, I have uploaded two of the product images (same images but different sizes) to that product.
I have downloaded the images from the storefront of our site and see that both the images have the same size (but originally I have uploaded two different sizes).
When I have investigated this issue, I came to know that the Images in the storefront are coming from the product cache.
Now, my doubt is that how this product image cache has generated?.

Please guide me.

Looking forward to hearing from you.


texts: Magento 2 global-e module implementation

texts: Does anyone have an overall idea how global-e module works on a magento site? When we switch the country flag which belongs to a global-e specific store, how it switches the store front? Is it any IFRAME loading on the page?


texts:
I am getting this error on my local magento.

  Fatal error: Class 'Mage_Xmlconnect_Helper_Data' not found in
  /var/www/magento/app/Mage.php on line 546.

Edit:

I have checked the file is there on the correct path. Also I have checked the file was not in include/src directory so copied the directory to this path also and compiled from command line,but getting the same error, Any idea how to fix it??


texts:
I have created data patch
It was working fine locally

Unable to apply data patch Devall\SpecialPrice\Setup\Patch\Data\AddLabaCenaAttribute for module Devall_SpecialPrice. Original exception message: Notice: Undefined index: entity_type_id in /var/www/html/vendor/magento/module-eav/Setup/EavSetup.php on line 1097

now when setup:upgrading, have this error.
What can be the problem
I am using 2.3.3 magento

$this->eavSetupFactory->updateAttribute(4, 184, 'is_used_for_promo_rules', 1);


texts: Failed orders are placed using new order status rather than Canceled

texts:
I'm in the final stages of setting up my Magento 2 Store and I am trying to add authorize.net as a payment option. I am getting an error:

Sorry, but something went wrong. Please contact the seller.

Which when I check the transact.dll from the request I see:

An error occurred while trying to report this transaction to the merchant.
An e-mail has been sent to the merchant informing them of the error. The
following is the result of the attempt to charge your credit card.

  The credit card number is invalid.

This all makes sense as I am using an invalid credit card number, the issue is that in the Magento admin the order has been placed with a status of processing.

This order failed but has been placed in the system as if it succeeded, which is causing orders to look as though the customer has paid. From my research I have discovered that when this happens the order should be set to the cancelled status, not the New Order Status so I'm not quite sure what is happening here.

Any thoughts?


texts: Custom Page Sizing values for all pages magento 2 admin

texts:
I want to ask if there is a way to override the per page drop down for all pages in magento 2 admin. I want to override this and even I add a custom page in the admin, it will still be implemented.

Thanks in advance, Help to be appreciated


texts: Can't get Customer Data on frontend in Magento 2

texts:
I'm trying to get the customer data on on the frontend of a custom template similar to how it is done in:

  app/code/Magento/Theme/view/frontend/templates/html/header.phtml

As described in this article.

This is what I have:

test2:

But it throws this error in the browser console:

  knockout.js:3012 Uncaught ReferenceError: Unable to process binding
  "text: function (){return customer().firstname }"


texts: Export a csv with product name and thumbnail image?

texts:
I know it's possible to export csv's from Magento. Is there a way to get a small image to export in a column and not just the image path or url.

Also, I know _media_image is a field, is that an actual image file or no? Sorry for the naive question.

Or if this isn't possible is there any other way you think it could be done?

Thanks for the help.


texts: How to Configure a First Data Payment Gateway in Magento 2?

texts: Please provide any official documents or any demo/tutorials mode for this (How to make Payment Gateway in Magento 2).


texts: Magento2: Most Viewed & Sold Product Count

texts:
I would like to add the product visit counter and total sales of the product on the product card.
Can anyone suggest some solution?


texts: Magento 2.3.4 Custom uiComponent admin form joint table Add New gives ambiguous query

texts:
Collection:

protected function _initSelect()
    {
        parent::_initSelect();

        $this->getSelect()->joinLeft(
            ['secondTable' => $this->getTable('ekvi_employee_salary')], //2nd table name by which you want to join
            'main_table.employee_id = secondTable.employee_id', // common column which available in both table
            '*' // '*' define that you want all column of 2nd table. if you want some particular column then you can define as ['column1','column2']
        )->where('secondTable.store_id = ? ', 0);

        return $this;
    }

Backend Admin Add New E.G: .../admin_fkozk7/routeId/module/new/key/zzzzzzzz

The issue That I have is when Adding new Employee It loads the joint with the WHERE Condition and employee_id would be empty hence is the error. How Should this be resolved/approached when adding new raw?

Anyone Appreciate!


texts: How to copy a category in a SEO friendly way?

texts: I have a category "clothing" (showing in menu) with a subcategory "all clothing". Both has the same products, but the url (/clothing and /clothing/all-clothing) is different, so that I have duplicate content. How can I make the url of "all clothing" the same as the url of "clothing"?


texts: Errors during installation- Submitting Package to Magento Marketplace

texts:
I am trying submit one Magento2 Extension on Magento2 marketplace but i am getting following error:

  Problem 1

Environment: Operating System - Centos 7, PHP Version - 5.6 , Magento Platform - 2.1 CE

Command: deploy:mode:set production

Installation issue:
Enabled maintenance mode
Starting compilation
Something went wrong while compiling generated code. See the error log for details.

Command returned non-zero exit code:
/usr/bin/php -f /var/www/html/bin/magento setup:di:compile
Build step 'Execute shell' marked build as failure
[PostBuildScript] - Execution post build scripts.
[DockerOperationsPHP56Magento21CE] $ /bin/sh -xe /tmp/hudson8419337065117254776.sh

  Problem 2

Environment: Operating System - Centos 7, PHP Version - 7.0 , Magento Platform - 2.1 CE

Command:  deploy:mode:set production

Installation issue:

Enabled maintenance mode
Starting compilation
Something went wrong while compiling generated code. See the error log for details.
Command returned non-zero exit code:
/usr/bin/php -f /var/www/html/bin/magento setup:di:compile
Build step 'Execute shell' marked build as failure
[PostBuildScript] - Execution post build scripts.
[DockerOperationsPHP70Magen...

What i tried:
I have tried to execute the same command on local and i am getting similar kind of error like following :

When i checked the system.log for error. It is giving the me following error:

but that is my local machine php memory issue. How can can i solve it to get it done on magento connect to upload my extension successfully.


texts:
I am trying to change the title of a new tab depending on the category ID of the product and I am getting this error message and i cant figure out why

  Fatal error: Call to a member function getId() on a non-object in
  /home/senorehe/public_html/app/code/local/Mage/Catalog/Helper/Data.php

I know it is telling me what the problem is but i dont know why it is occurring as it works on my test server. This is my code which i have in Mage/Catalog/Helper/Data.php

 public function getTabName(){
    $currentCategoryId = Mage::registry('current_category')->getId();

    if ($currentCategoryId == '1168' || $currentCategoryId == '1169' || $currentCategoryId == '1174' || $currentCategoryId == '1175' || $currentCategoryId == '1177')
    {
        return 'Size Guide';
    }
    return $this->__('Data Sheets');
}

and this is the local.xml code

<action method="addTab" translate="title" module="catalog" >
    <alias>pdf_tabbed</alias>
    <title helper="Catalog/getTabName" />
    <block>catalog/product_view_attributes</block>
    <template>catalog/product/view/pdf.phtml</template>
</action>


texts: change the button text in custom module?

texts:
Hi i used this code to add button in custom module in magento admin.

I need to create a "Run Now" button and my code created a button without text. Like screenshot:

My question is : how to add "Run Now" text on button?

File: system.xml

<enabled translate="label">
                            Enable Module
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </enabled>

<module_btn translate="label">
                <depends><enabled>1</enabled></depends>
                Product Button
                <frontend_type>button</frontend_type>
                <frontend_model>weo_productlist/adminhtml_system_config_button</frontend_model>
                <sort_order>2</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>0</show_in_website>
                <show_in_store>0</show_in_store>
            </module_btn>

Here is the code of /adminhtml_system_config_button file:

<?php
class Weo_Productlist_Block_Adminhtml_System_Config_Button extends Mage_Adminhtml_Block_System_Config_Form_Field
{

protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
    {
        $html = parent::_getElementHtml($element);
        $this->setElement($element);

        $html = $this->getLayout()->createBlock('adminhtml/widget_button')
                    ->setType('button')
                    ->setClass('scalable1')
                    ->setLabel('Run Now')
                    ->setOnClick("return callajaxRequestController();")
                    ->toHtml();

       return $html;

    }

}


texts:
How to override admin footer.phtml file?

path: vendor/magento/module-backend/view/adminhtml/templates/page/footer.phtml


texts:
We try to update some store views with the following command:

Mage::getSingleton('catalog/product_action')->updateAttributes(array($foundProductID), array('name' => $language['name'],
              'short_description' => $language['shortDescription'],
              'description' => $language['desciption'],
              'meta_description' => $language['metaDescription'],
              'meta_keyword' => $language['metaKeyword'],
              'meta_title' => $language['title']), $storeID);

Then we get this error message:

Fatal error:
Uncaught exception 'Exception' with message 'Warning: Invalid argument supplied for foreach() in app/code/core/Mage/Index/Model/Event.php on line 167' in app/code/core/Mage/Core/functions.php:245 Stack trace:
#0 app/code/core/Mage/Index/Model/Event.php(167): mageCoreErrorHandler(2, 'Invalid argumen...', '/var/www/magent...', 167, Array)
#1 app/code/core/Mage/Index/Model/Event.php(199): Mage_Index_Model_Event->_mergeNewDataRecursive(false, Array)
#2 app/code/core/Mage/Index/Model/Resource/Event.php(67): Mage_Index_Model_Event->mergePreviousData(Array)
#3 app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(423): Mage_Index_Model_Resource_Event->_beforeSave(Object(Mage_Index_Model_Event))
#4 app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Mode in app/code/core/Mage/Core/functions.php on line 245

We have to update huge amounts of products. That's why we try to use

Mage::getSingleton('catalog/product_action')->updateAttributes

This should be very fast.

Any ideas what's going wrong?


texts:
I need to have a checkout page that allows the user to insert his data in one step.
So all the sections (billing, shipping, shipping method, payment method, review order, place order button) are in the same page displayed at the same time.
How can I do this?


texts: Add a child block to product.info.tabs description tab

texts:
I am using tabs for my product view page. In my local.xml I have the following:

<catalog_product_view>
    <reference name="product.info">
        <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs"
                           template="catalog/product/view/tabs.phtml">
            <action method="addTab" translate="title" module="catalog">
                <alias>description</alias>
                <title>Description</title>
                <block>catalog/product_view_description</block>
                <template>catalog/product/view/description.phtml</template>
            </action>
            <action method="addTab" translate="title" module="catalog">
                <alias>videos</alias>
                <title>Videos</title>
                <block>catalog/product_view_attributes</block>
                <template>catalog/product/view/videos.phtml</template>
            </action>
        </block>
    </reference>
    <reference name="product.description">
        <block type="core/template"
               name="namespace.inline"
               as="namespace_inline"
               template="catalog/view/gallery/inline.phtml" />
    </reference>
</catalog_product_view>

In my catalog/product/view/description.phtml, I have the following:

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

But the child template does not render.

I tried switching to the default theme, and it works, but the default theme does not use tabs.

Is there something going on with the Mage_Catalog_Block_Product_View_Tabs block that does not allow it to have child blocks?


texts:
We want to use one Magento backend for multiple stores and every store have normally 1 store view. We have 2 or more websites with 2 or more store views.

For German, we want to use the store code "de", for English "en" and so on. Now our problem is that every store code can't be used more than one times (is unique). When we get more websites and stores we must find for every a new store code.

Now one URL looks like this:

For a German store view, "mysite.com/deu/" or "mysite.com/de1/" and this is not fine. What can we do to solve this problem with the unique store codes?

Hope you can help me.


texts: How to change price on product filter result page?

texts:
I've created a custom module to show the installments price, and it is working OK in the product page and category page, for this, I've created a plugin, my 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">
    <preference for="Magento\Catalog\Block\Product\ListProduct" type="Vendor\Module\Block\Product\ListProduct" />
</config>

To show the installments on category page, and a layout catalog_product_view.xml to show on product view page.

But in filter result page (catalogsearch_result_index) it does not work, I've tryed to set my plugin, to my custom price render as I've done with category page, like this:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Catalog\Block\Product\ListProduct" type="Vendor\Module\Block\Product\ListProduct" />
    <preference for="Magento\CatalogSearch\Block\SearchResult\ListProduct" type="Vendor\Module\Block\Product\ListProduct" />
</config>

And I've tryed to set a layout file catalogsearch_result_index.xml, like this:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <referenceBlock name="search.result">
                <block class="Magento\CatalogSearch\Block\SearchResult\ListProduct" name="search_result_list" template="Magento_Catalog::product/list.phtml" cacheable="false">
                    <!--My Custom Block-->
                    <block class="Vendor\Module\Block\Parcelamento" after="product.info.price"
                        name="product.info.price.installment.block"
                        template="Vendor_Module::list.phtml">
                    </block>
                </block>
            </referenceBlock>
        </referenceContainer>
    </body>
</page>

But nothing works, how can I override the price render for catalogsearch results? Thanks in advance.


texts: How to add button in customer order history frontend

texts: i want to add custom button in customer order history grid. how can i can do that through custom module..


texts: Magento 2: How to I solve product image not changing in admin panel

texts:
I have a Configurable product.

I change the image of config product

before saving ::

after saving  ::

Product Image not changing I tried 3 time

How I can solve this?

pub/media/catalog/product


texts: M2: How to add a canonical tag on the login page


texts: Possible to change the layout of 1 block only?

texts:
after some searching I couldn't find an answer to my problem.

I have a website with the 2coluns-left layout (and some cms pages with 1 column layout. Now I put a cms block at the bottom of my page (right above the footer) and would like to have it on the whole width of the site which would be 1 column layout, but only for this block.

Is this possible for cms static blocks?

Thanks a lot for your help!

edit:

there is also unother problem I just discovered. The block I am talking about should only be seen on the homepage, but it is shown on every single page. How can I avoid this?


texts: SecurityPatch 9652: Possible problems after SUPEE-9652 applied

texts:
Magento has released its security patch SUPEE-9652, for Magento 1.x CE and EE

I just want to know what are the possible problems after applying this security patch
and What are the new changes in this security patch?


texts:
The content editor in the backend is not displaying on my site.
I'm getting the following error:

editor_template.js:1 Uncaught SyntaxError: Unexpected token <
editor_plugin.js:1 Uncaught SyntaxError: Unexpected token <

When I inspect the files, this is their content:
    <!doctype html>
<html lang="en-US">
    <head >
        <script>
    var BASE_URL = 'XXXXXXXXX/index/index/key/XXXXXX/';
    var FORM_KEY = 'XXXXXXXXX';
    var require = {
        "baseUrl": "XXXXXX/pub/static/adminhtml/Magento/backend/en_US"
    };
</script>

The 'XXXX's are meant to obscure the URL and formkey, they're not part of the actual file.
The files don't seem to be js files at all.
The route from which the files are loaded is:

/admin/blog/post/edit/id/1/key/XXXXXX//themes/advanced/editor_template.js
/admin/blog/post/edit/id/1/key/XXXXXX//plugins/layer/editor_plugin.js

These routes seem to be incorrect, but I have no idea where they are generated.
Any thoughts on how to solve this issue on Magento 2.0.7?


texts: How to get the bundle product option in magento

texts:
I am new one here. I need to know how can we get the bundle product options that we will set through the admin panel. I have a situation where i need to display three product in the product view page in magento and so for that, I need to fully customize the product view page. I am trying to figure out how to solve this problem.MY main troubles are as follows..

1)is it possible to display  3 product in the product view page?if yes, give your suggestions

2)how can i get the bundle product( i have 3 bundle products only in my site) options to a page viewttest.phtml which i added into the view page through layout in order to customize the page.

3)i have 2 drop-down options common for all 3 products. one  to select the state and other for select the business type and according to this all products price will change. trying to implement it by defining custom options.Is that method is better or any other method for it???how can change the price of products using my custom drop-down menus..

Please help me friends i need a solution for this....and thanks..


texts: Magento 1.7 Import: "Invalid image file type."

texts:
For the past couple year we've uploaded our configurable product images to the parent product. We're implementing some new procedures that require specific images to be uploaded to each child product as well.

I'm using a bulk import to associate these images with their respective child products. All images have been placed in the /media/import folder, and the import sheet has been configured with the images listed under the "image" column, formatted as /image-filename.jpg

Upon attempting to upload the file and import the images, Magento gives me an error for each entry claiming "Invalid image file type." The research I've done so far only elaborates as far as saying that Magento only accepts 'jpg', 'jpeg', 'gif', and 'png' image types, but of course all my images are '.jpg'

Any ideas why Magento wouldn't like my .jpg's?


texts: I have two store views, I changed one of them from wesbitetest.com to websitetest.com/fr-ca/ but the front end didn't load the js and CSS files as expected, and the URL becomes websitetest.com/fr-ca/?___store=fr_ca instead of websitetest.com/fr-ca/


texts:
I have made button New Comment as well as controller NewComment.php.

When I try to redirect to controller I have ERR_TOO_MANY_REDIRECTS.

This is my button block code:

namespace Vendor\Module\Block\Adminhtml\Category\Edit;

use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
use Magento\Cms\Block\Adminhtml\Page\Edit\GenericButton;

class NewCommentButton extends GenericButton  implements ButtonProviderInterface
{

public function getButtonData()
{
    return [
        'label' => __('New Comment'),
        'class' => 'save primary',
        'sort_order' => 90,
        $this->getUrl('frontname/controller/newcomment')
    ];
}
}


texts:
I need to add floating cart with product count in my site(screenshot_1). Which is now in header minicart. I need to fix minicart in right side of my site.

How I can do that?

screenshot_1


texts: how to remove the duplicate canonical tag

texts: We have a canonical tag on the product page of the website. But there are 2 tags.how can remove one canonical tag on the product page.


texts:
I want disabled all inputs in form checkout in Magento 2.

In the photo it looks like I want it to be seen, but I do not know in which Magento file you have to modify that.

I do photo only one input, but I want all form disabled, because only can buy if is logged and I don't want that the data can be changed.


texts: Magento 2.2.5 Error in Exception Log Every Night

texts:
I'm getting an error in exception.log every night.

Error is

  main.CRITICAL: Directory "/tmp/analytics/tmp" cannot be created  {"exception":"[object] (Magento\Framework\Exception\FileSystemException(code: 0): Directory \"/tmp/analytics/tmp\" cannot be created

It happens when the cronjob Magento\Analytics\Cron\CollectData executes but var/tmp/analytics/tmp does exist and has permissions set to 775

I think it relates to Advanced Reporting because when I try to access it, I get the 404 page on https://advancedreporting.rjmetrics.com

How would I go about solving this ?


texts: 2.1.3 installation returning 404 on admin

texts:
I just finished installing, was given the sucess page, clicked on the link do admin and I get a 404 page.

When I go to the home page, there's a bunch of plain html with no CSS or JS working. It looks like a htaccess problem, but It's first time trying Magento and I have no idea how its htaccess was supposed to look like.

I'm running on PHP 7, Mysql 5.6 and Ubuntu 16.04. It's a brand new installation on a brand new server.

So far, I've installed php extensions shown as required on the magento-check page and the ones required to run composer install

Does anyone know how to solve that?


texts: If statement for translatable product attribute values

texts:
I'm using this kind of statements on other places in the webshop (product detail page) but I want to use this one is on the category page:

<?php if ($_product->getAttributeText('cp_doos_specificaties') == "Ja" || "Yes"): ?>

But for some reason this isn't working... When I remove the || Yes it's working, but I need the Yes also because the webshop is also in English and otherwise the code won't work.

Hope someone can help me with this.


texts: Capturing data on who a product was purchased for

texts:
We're going to be using Magento to sell professional development course registrations to various customers, and some of those courses are purchased for someone else. For example, the head of HR for a company may want to purchase 12 course seats for company employees, but won't be attending the course themselves. We need to be able to ask the course purchaser during the checkout process, the names, emails, and phone numbers of the people who will be attending the course.

Is this data best stored as a customer, with some kind of special attribute, or is there a better place to store this data.

For an example of what we're trying to do, check out the Magento training catalog: http://magento.com/training/catalog/developers.


texts: Magento 2 Injecting Object in $data array

texts:
I am trying to inject my custom object in constructor like this in di.xml

<type name="Magento\CatalogSearch\Block\Advanced\Result">
    <arguments>
        <argument name="data" xsi:type="array">
            <item name="catalogFilterHelper" xsi:type="string">Package\Module\Helper\Data</item>
        </argument>
    </arguments>
</type>
<type name="Magento\CatalogSearch\Block\Result">
    <arguments>
        <argument name="data" xsi:type="array">
            <item name="catalogFilterHelper" xsi:type="object">Package\Module\Helper\Data</item>
        </argument>
    </arguments>
</type>

And trying to access it in theme template like
app/design/frontend/Vendor/theme/Magento_CatalogSearch/templates/advanced/result.phtml

$block->getData('catalogFilterHelper');

It returns null.

When I am trying to get the object in the same template by using object manager.

//$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
//$block = $objectManager->get(\Magento\CatalogSearch\Block\Advanced\Result::class);

I get the proper result.

So seems like when layout is executed and blocks are created it overides the di.xml configurations for blocks $data array.


texts: Magento 1.9 How can i get and store configurable attributes like color,size,monogram based on product in custom page through custom table

texts:
My requirement is to fetch all data of the product in cart apart from SKU, name, and quantity.
Is there anyone to help me out?


texts:
Today I got mail from Magento regarding Magento DevBox Beta for faster access the website and more features. I have downloaded the module, But Where I need to paste it and how to install it. I don't know?

was there anyone installed it? please guide me how to install it?


texts:
how do get layout in magento 2 in  custom module same

Edit
this code

<?php
namespace Addon\Gallery\Block\Adminhtml\Gallery\Gallery;

use \Magento\Backend\Block\Widget\Container;
class Edit extends \Magento\Backend\Block\Widget\Container
{

    protected $_layoutFactory;
    protected $_coreRegistry = null;

     public function __construct(
         \Magento\Backend\Block\Widget\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Framework\View\LayoutFactory $layoutFactory,
        array $data =[]
    )
    {
        $this->_layoutFactory = $layoutFactory;
        $this->_coreRegistry = $registry;

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

    }
     public function getPage(){

        return $this->pageLayoutBuilder->getPageLayoutsConfig()->getOptions();
     }

}

Show error

Notice: Undefined property: Addon\Gallery\Block\Adminhtml\Gallery\Gallery\Edit::$pageLayoutBuilder in C:\localhost\magento2_beta\app\code\Addon\Gallery\Block\Adminhtml\Gallery\Gallery\Edit.php


texts: Send mail on New product add and on edit existing product

texts: I want to sent one email when we adding new product & another different email when we editing present product?


texts: Fatal error: Class 'Mage_Uploader_Helper_Data' not found?

texts:
( ! ) Fatal error: Class 'Mage_Uploader_Helper_Data' not found in
  /var/www/html/example/app/Mage.php on line 546

Call Stack
#   Time    Memory  Function    Location
1   0.0001  229960  {main}( )   .../index.php:0
2   0.0038  5566720 Mage::run( )    .../index.php:106
3   0.0040  5581328 Mage_Core_Model_App->run( ) .../Mage.php:683
4   0.0179  5922552 Mage_Core_Controller_Varien_Front->dispatch( )  .../__default.php:20307
5   0.0197  6106776 Mage_Core_Controller_Varien_Router_Standard->match( )   .../__default.php:17620
6   0.0200  6132512 Mage_Core_Controller_Varien_Action->dispatch( ) .../__default.php:18067
7   0.1145  6470776 Mage_Cms_IndexController->indexAction( )    .../__default.php:13672
8   0.1146  6471768 Mage_Cms_Helper_Page->renderPage( ) .../IndexController.php:45
9   0.1146  6472680 Mage_Cms_Helper_Page->_renderPage( )    .../__default.php:10918
10  0.1419  9566760 Mage_Core_Controller_Varien_Action->renderLayout( ) .../__default.php:11003
11  0.1420  9568392 Mage_Core_Model_Layout->getOutput( )    .../__default.php:13643
12  0.1420  9568800 Mage_Core_Block_Abstract->toHtml( ) .../__default.php:27696
13  0.1422  9569928 Mage_Core_Block_Template->_toHtml( )    .../__default.php:2518
14  0.1422  9570040 Mage_Core_Block_Template->renderView( ) .../__default.php:3281
15  0.1424  9571488 Mage_Core_Block_Template->fetchView( )  .../__default.php:3267
16  0.1425  9589960 include( '/var/www/html/loveboots/app/design/frontend/default/blanco/template/page/1column.phtml' ) .../__default.php:3236
17  0.1425  9590408 Mage_Core_Block_Abstract->getChildHtml( )   .../1column.phtml:4
18  0.1425  9590584 Mage_Core_Block_Abstract->_getChildHtml( )  .../__default.php:2181
19  0.1425  9590976 Mage_Core_Block_Abstract->toHtml( ) .../__default.php:2237
20  0.1426  9591704 Mage_Core_Block_Template->_toHtml( )    .../__default.php:2518
21  0.1426  9591816 Mage_Core_Block_Template->renderView( ) .../__default.php:3281
22  0.1427  9592416 Mage_Core_Block_Template->fetchView( )  .../__default.php:3267
23  0.1427  9611152 include( '/var/www/html/loveboots/app/design/frontend/default/blanco/template/page/html/head.phtml' )   .../__default.php:3236
24  0.1494  9869048 Mage_Core_Helper_Js->getTranslatorScript( ) .../head.phtml:190
25  0.1494  9869112 Mage_Core_Helper_Js->getTranslateJson( )    .../__default.php:19534
26  0.1494  9869240 Mage_Core_Helper_Js->_getTranslateData( )   .../__default.php:19524
27  0.1520  9924784 Mage::helper( ) .../__default.php:19610

please give me any solution? How to solve it?


texts: Report period - add addtional selection "week"

texts:
I want to extend the period selection (day,month,year) with an option "week".

I can add following function to my Grid.php:

public function getPeriods()
{
    return array(
        'day' => Mage::helper('reports')->__('Day'),
        'week' => Mage::helper('reports')->__('Week'),
        'month' => Mage::helper('reports')->__('Month'),
        'year' => Mage::helper('reports')->__('Year')
    );
}

This makes the week option to show up in the selection.

And it looks like app/code/core/Mage/Reports/Helper/Data.php is handling the selection in getIntervals($from, $to, $period = self::REPORT_PERIOD_TYPE_DAY)

Do I have to overwrite this function? Isn't there any better solution possible?
Thanks!


texts: Where do I go to edit the CMS Home Page?

texts:
Using Magento 2, I uploaded a theme and trying to edit the imported demo home page. but I can't find where to edit that page to change the blocks on it.

When I go to Content > Pages, there's a "Home" listed there but that's for example.com/home, not just example.com.


texts: Problems with less variables in _theme.less

texts:
I use below media queries in my custom _theme.less like

& when (@media-common = true) { }

but when I execute this command bin/magento setup:static-content:deploy I get variable @media-common is undefined in file what is wrong in this case?
Using grunt compiles without any errors.


texts: Is it necessary to upgrade from 2.3 to 2.4?

texts:
we are currently using 2.3.3 . I it necessary to upgrade the version 2.3.x to  2.4.x or we can keep using 2.3.x ? can anyone explain it a bit
thank you


texts: Magento 2 how to add extra validation to new Billing address form fields in checkout page

texts:
i want to put some extra validation to billing address form in checkout page. When a customer in payment page and wants to add new billing address , i want to add few validations to First Name, Last Name and Phone Number fields,

How can i add it ? i did the same validation for shipping address form in checkout_index_index.xml. But i am unable to find anything related to billing address form,
Please help.