texts: how to filter sku from renderer in grid?

texts:
so I have a renderer for orders and here is the code:
the sku renderer is working fine I have problem with search and filtering the skus

$this->addColumn('sku', array(
                'header'=> Mage::helper('sales')->__('SKU'),
                'index' => 'sku',
                // begin: render the sku content
                'renderer' => new Lenmar_Adminhtml_Block_Sales_Order_RendererSkuFk1(),
                // end: render the sku content
                'type' => 'text',
           'filter_condition_callback' => array($this, '_addressFilter'),
            ));

I read in the article which I should use callback but I don't know how to write the function to select the sku because $this here doesn't have the sku also I used this but it is not correct and gives me error of unknown column sku:

protected function _addressFilter($collection, $column)
    {
        if (!$value = $column->getFilter()->getValue()) {
            return $this;
        }

        $this->getCollection()->getSelect()->where(
            "sales_flat_order_item.sku like ?"
        , "%$value%");

        return $this;
    }

Error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sales_flat_order_item.sku' in 'where clause'

updated prepare collection:

 protected function _prepareCollection()
    {
        $storeCode='bceu';
        $stores = array_keys(Mage::app()->getStores());
        foreach($stores as $id){
          $store = Mage::app()->getStore($id);
          if($store->getCode()==$storeCode) {
            $storeId=$id;
          }
         }
        //$value=3200000001;
        $from="2014-05-21";
        $collection = Mage::getResourceModel('sales/order_collection')

        ->addFieldToFilter('store_id',$storeId)
        //->addAttributeToFilter('increment_id', array('gt' => $value))

        ->addAttributeToFilter('created_at', array("from" => $from, "datetime" => true))
        ->join(array('a' => 'sales/order_address'), 'main_table.entity_id = a.parent_id AND a.address_type != \'billing\'', array(
                'city'       => 'city',
                'country_id' => 'country_id'
            ))
            ->join(array('c' => 'customer/customer_group'), 'main_table.customer_group_id = c.customer_group_id', array(
                'customer_group_code' => 'customer_group_code'
            ))
            ->addExpressionFieldToSelect(
                'fullname',
                'CONCAT({{customer_firstname}}, \' \', {{customer_lastname}})',
                array('customer_firstname' => 'main_table.customer_firstname', 'customer_lastname' => 'main_table.customer_lastname'))
            ->addExpressionFieldToSelect(
                'products',
                '(SELECT GROUP_CONCAT(\' \', x.name)
                    FROM sales_flat_order_item x
                    WHERE {{entity_id}} = x.order_id
                        AND x.product_type != \'configurable\')',
                array('entity_id' => 'main_table.entity_id')
            )

        ;

         // CUSTOM

        $collection->getSelect()->joinLeft(array('sfop'=>'sales_flat_order_payment'),
    'main_table.entity_id = sfop.parent_id',array('po_number' => 'sfop.po_number'
    ));


texts: How to patch a core controller, model, block or helper in Magento 2

texts: How to create a custom patch file for Magento 2?


texts: Magento 2 : How to upload image from frontend

texts: I want to add a feedback form in frontend, with an image upload field, How to save form data and images in database?


texts: Magento 2: I want to show custom messgae based on product added in cart in payment step

texts:
In Magento 1, there is custom message based on product id, added in cart as below:-

Same I want to show in Magento 2.3.

For static message I follow this article.

Please help me how to add condition based on product ids in checkout .


texts: Varien_Io_Sftp connection sometimes works, sometimes doesn't

texts:
I need to use FTP(S) and SFTP in my extension to receive and send files. I got FTP(S) to work with no problems whatsoever (using Varien_Io_Ftp), but I'm struggling with SFTP.

The problem is that there is an error that occurs only sporadically. Sometimes everything works as expected and the file is transferred, but sometimes it just refuses to connect to the server at all (Error: Unable to open SFTP connection as user@localhost).

I have traced it down to the file lib/phpseclib/Net/SSH2.php in line 1274 (getting response to 'ssh-userauth' packet), which returns false.

I'm fairly certain that the problem is not the SSH/SFTP server, because I can connect via CLI (using both ssh and sftp) every time.

Now what can I do to make this work reliably? I don't think updating the phpseclib is an option since it's part of / shipped with Magento core, right? I'm using Magento 1.9.3.2 by the way.

Edit: Here is what I do with the SFTP class, if that helps:

$this->connection = new Varien_Io_Sftp();
$args = array(
    'host' => $host,
    'username' => $user,
    'password' => $password,
);
$this->connection->open($args);


texts: How to create multiple active quotes for a single customer

texts:
I want to create multiple quotes for a single customer and assign the quotes based on some identifier in the quote table.
For checkout, I want to use a single quote every time but in the quote table of Magento, the other quotes for the customer should be active. Is there a solution to it?


texts: Newsletter successfully subscribed Message not displaying on homepage Magento2.3.0

texts:
I am facing an issue with the subscription message. when I subscribe for the newsletter from the homepage the page reloads but successfully subscribed message is not displayed on the homepage but when I follow the same steps on the contact us page it shows successfully subscribed message. Please help.

Environment
Magento - 2.3.0
PHP - 7.1


texts: How to get Current Child id from Configrable Product in Magento2?

texts:
I have configure product with 3 colors.How to get Current Child product_id from Configurable Product in Magento2?

If anyone knows please explain me


texts: Please help me in pay some amount by credit card and remaining by cash on delivery option in magento. Like, if product price is 100$, then we can define in admin panel that 60$ will be paid by credit card and rest 40$ will be paid by cash on delivery option.


texts: How to create custom tab in product admin section in Magento 2

texts: I want to create one custom tab in the admin product section for all products and I want to display a custom message. How can I do this?


texts: How to get all products of the Cart on HomePage. Magento2

texts:
I'm trying to get all the products of the cart for that I'm trying

use Magento\Checkout\Model\Cart;
$this->_cart = $cart;
public function getCartProducts(){

        $itemsCollection = $this->_cart->getQuote()->getItemsCollection();
    //    echo"
"; print_r($itemsCollection->getData()) ;

        // get array of all items what can be display directly
        $itemsVisible = $this->_cart->getQuote()->getAllVisibleItems();
        // print_r($itemsVisible) ;
        // retrieve quote items array
        $items = $this->_cart->getQuote()->getAllItems();
        print_r($items) ;
        echo"Asad";
        foreach($items as $item) {
            echo 'ID: '.$item->getProductId().'
';
            echo 'Name: '.$item->getName().'
';
            echo 'Sku: '.$item->getSku().'
';
            echo 'Quantity: '.$item->getQty().'
';
            echo 'Price: '.$item->getPrice().'
';
            echo "
";
        }

When I run this code then it returns me Null Array in case of $items = $this->_cart->getQuote()->getAllItems(); and $VissibleItems = $this->_cart->getQuote()->getAllVisibleItems(); While in this case $itemsCollection = $this->_cart->getQuote()->getItemsCollection(); it returns me many products which are not even added in cart. So how can I get all the products of the cart??
NOTE: I'm doing this on Localhost (Luma) and I'm doing this for guest user

Edited: I can get the data http://127.0.0.1/magento/checkout/cart/ but on homepage I cannot get the data I want to get the data on homepage because on homepage I get Null Array
On homepage it do not return any data

but on Cart page it shows data


texts: I´ve installed Magento on Windows 10, installed correctly but css doesn´t load, rewrite is configured on apache.


texts: Different tax rate for B2B and B2C in magento 2

texts:
We sell physical products in germany for individual and for companies (B2B) from Magento 2 website. For individuals, the tax rate is 19% and for B2B( ie if the customer enter company name & VAT) the tax is 0%.
I check the magento 2 documentation but could not find any links to have different rates for B2B and B2C. Can this be allowed from inside the Magento configuration ? Do we need to have use extension ? How can we achieve the same with custom code ?
Thx a lot
Laxman


texts:
I have a website that I have been working of for a few years on and off and today it broke...

After trying to access the site - (http://justhardware.co.uk/) I get the following error thrown.

  Fatal error: Call to a member function getOptions() on null in C:\Inetpub\vhosts\justhardware.co.uk\httpdocs\app\Mage.php on line 329

The code on line 329 is:

327  - public static function getBaseDir($type = 'base')
328  - {
329  -     return self::getConfig()->getOptions()->getDir($type);
330  - }

Please help!


texts:
I our great Corona-Times a lot of people are working from home. The same in our company. Generally that's no problem, but now sometimes we miss emails on our office computers because they are downloaded from the homeoffice-working people on the local home computer.
Therefore we are looking for a possibility to integrate an eMail program like Outlook in our Magento 2 installation.
Means, we want to write, send and receive eMails in our backend, so that we dont loose anymore customer communication emails.
Christian


texts: After Upgrade to Magento 2.2.2: Duplicate entry '0-0-0-0' for key 'PRIMARY', query was: INSERT INTO `salesrule_product_attribute` () VALUES ()

texts:
If I Upgrade Magento from 2.1.8 to 2.2.2 and run setup:upgrade I get the following error:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-0-0-0' for key 'PRIMARY', query was: INSERT INTO `salesrule_product_attribute` () VALUES ()

If I truncate all salesrule tables it works, but I can't do this on a production environment. Is there any workaround for this issue?


texts: What is the purpose of the getId and setId methods of Varien_Object? And what value should I pass?

texts:
In many constructors, for example Mage_Adminhtml_Block_Sales_Order_Grid, there is a call to setId(). I've traced this back up the hierarchy and found it defined in Varien_Object.

I've subclassed Mage_Adminhtml_Block_Widget_Grid and found that if I don't call setId in the constructor, my code doesn't work, but if I call it, its does. Rather than blindly copying core code, I'd like to understand what the purpose of the id of an object is any why code needs it.

Also I'd like to know what value to pass when I call setId. I assume there is some sort of naming convention, but I haven't been able to infer one from the core classes.


texts:
I'm fairly new to editing the footer in magento. I want to transform footer. I managed to change only address part, but not the rest. Getting struck in complex file structure of Magento.

I want to transform this footer:

into this one:

Please help me out.


texts: Magento2 - How to pass any custom static data to order email template?

texts:
Is their any way we can pass some static data to order confirmation email template ?
And then use it as variable in email template ?
like {{var order.pickupDate}}

Thank you


texts: How to call custom module controller for ajax call in magento 1.9?

texts:
I am trying to call the custom modules controller function for ajax call, Can any tell me how to get the URL. This is my controller function,

class Spritz_RequestQuotation_IndexController extends Mage_Core_Controller_Front_Action
{
   public function emailquoteAction(){

   }
}

This code I am using to get URL, Its giving 404 not found.

<?php echo $this->getUrl('spritz_requestquotation/IndexController/emailquote') ?>

This is my JS code.

var formId = 'quotation_form';
var myForm = new VarienForm(formId, true);
var postUrl = '<?php echo $this->getUrl('spritz_requestquotation/IndexController/emailquote') ?>';
function doAjax() {
    if (myForm.validator.validate()) {
        new Ajax.Updater(
            { success:'formSuccess' }, postUrl, {
                    method:'post',
                    asynchronous:true,
                    evalScripts:false,
                    onComplete:function(request, json) {
                    Element.hide(formId);
                    Element.show('formSuccess');
                    setTimeout(function(){
                        var inst = jQuery('[data-remodal-id=quoteform]').remodal();
            inst.close();
                    }, 2000);
                },
                onLoading:function(request, json){
                    Element.show('formLoader');
                },
                parameters: $(formId).serialize(true),
            }
        );
    }
}

new Event.observe(formId, 'submit', function(e){
    e.stop();
    doAjax();
});


texts: Magento 2.2.9 problem after installing not loading some JS files

texts:
After successfully installing Magento 2.2.9 (Windows 10, wamp server) I got the following picture. Does someone know how to solve this?

I'm a beginner in Magento. I will be grateful for your answers.


texts:
From what I've read there are 2 ways to include your javascript files:

1) In catalog_product_view.xml you insert  <link src="js/product.js"/>
and in web/js/product.js you add your js code specific to the product page (old magento1 way).

2) The second way (the way magento2 does it) items.phtml (or whatever phtml file) you add

<script>
    require([
        'jquery'
    ], function ($) {
        //do something specific here
        });
</script>

Why do they through php, html and javascript in a single phtml file? I've never seen that before in another platform. Especially if your javascript code is big you don't want to have it there.

And for example if you put it in another separate file, like product.js, isn't it better to include it via xml then to do this in phtml:

<script>
    require([
        'product'
    ], function ($) {
        //do nothing here because it is done in product.js
        });
</script>


texts: Certs-Engine and Magento Certified Developer Exam

texts:
I'm trying to take the exam for the Magento Certified Developer.

I wonder if the answers provided to each question are realiable?

Because when I came to this question today,

I am confused can some one tell weather it is C,D or E


texts: Magento 2.1.X Admin Shipping Method Loop Through Cart Items

texts:
I am trying to make my shipping plugin work in the admin.

My plugin requires me to loop through the cart
How do I Make this work with the admin?

public function __construct(
    \Magento\Framework\App\Helper\Context $context,
    \Magento\Framework\ObjectManagerInterface $objectManager,
    \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
    \Magento\Catalog\Api\ProductRepositoryInterface $productRepo,
    \Magento\Checkout\Model\Session $checkoutSession,
    \Magento\Checkout\Model\Cart $cart
)
{
parent::__construct($context);
$this->_objectManager = $objectManager;
$this->_productCollectionFactory = $productCollectionFactory;
$this->_productRepo = $productRepo;
$this->_checkoutSession = $checkoutSession;
$this->_cart = $cart;
}

public function getCartItems()
    {
    foreach($this->_cart->getQuote()->getAllVisibleItems() as $item)
        {
        $sku = $item->getSku();
        }

    }

This errors out when trying to pull the cart.  No error just skips over it.
I think I need to access the session and the cart a different way.


texts: Problems associated with having a large number of custom options on simple products

texts:
I have a simple product (SP) with 3 drop-down custom options with each having about 100 options. This simple product is associated to a configurable product (CP).

After importing these products using MAGMI, I noticed that I couldn't modify the custom options on the SPs from the admin. I found out that max_input_vars in PHP limits the number of variables being saved, so I increased that, and the custom options were once again editable in the Magento admin.

Now, I find another peculiar behavior. This SP won't show under the associated tab of the CP, apparently, because of the large number of custom options. The association is available in catalog_product_super_attribute, and when I remove all of the custom options from this SP, it shows up again in the associated tab of the CP.

Does anybody had to fix an issue like this? I am using Magento EE 1.13.


texts:
When I try to update the cart qty of any product it doesn't change anything, is always set to

The cart.phtml has already set the form_key: <?php echo $this->getBlockHtml('formkey'); ?>... so, i don't know what is happening here. Everything seems to be in order.

Any clues?


texts:
I have set cron for indexing issue. but i have got error in mail.

/home/ltfab/public_html/shell/indexer.php: line 1: ?php: No such file or directory
/home/ltfab/public_html/shell/indexer.php: line 2: /backup: Is a directory
/home/ltfab/public_html/shell/indexer.php: line 3: access-logs: command not found
/home/ltfab/public_html/shell/indexer.php: line 4: access-logs: command not found
/home/ltfab/public_html/shell/indexer.php: line 5: access-logs: command not found
/home/ltfab/public_html/shell/indexer.php: line 6: access-logs: command not found
/home/ltfab/public_html/shell/indexer.php: line 7: syntax error near unexpected token `('
/home/ltfab/public_html/shell/indexer.php: line 7: ` * This source file is subject to the Open Software License (OSL 3.0)'

Any Expert Please help i have try some solution but no luck with this.


texts: How are dynamic cronjobs inserted into cron_schedule

texts:
The timing for a number of Magento's core cron tasks such as sitemap, stock alert notifications and log cleaning can be adjusted via the admin's System Config. This means they are not defined inside the cronjob node of a module's config.xml however they do get written into the cron_schedule table like other jobs.

How does the cron scheduler find those jobs? My guess is that there is an event thrown during the schedule generation, but I can't see any instances of dispatchEvent within Mage_Cron.


texts: What to do after editing a module that was already on? nothing/remove cache/reindex etc (Magento 2.1)

texts:
Say I've made a module and it's enabled. Now I change something of the module, for example edit the text in a view or add a block.

Should I do something after doing this or not? For example, flushing the cache, rebuilding indexes, removing the content of some folders etc.


texts:
We have 2 stores (a 1.7.0.2 upgrade from 1.5.1 and a 1.6 install) that both have a problem that for some orders has a missing e-mail address (customer_email in sales_flat_order). The stores are two completely different installations and the only thing I found that is the same in both versions is that they both use OneStepCheckout (latest version) and that the problem is only seen for clients (but not all) that already have a customer account. I guess that the problem is in the customer account, but I can't find anything strange with these accounts.

Any ideas on where to check or how to debug this problem?

Thanks.


texts: How to access cart total from js file in magento 2?

texts:
I want to access the cart total from js. I have minicart-mixin.js in my custom module. I want to get the cart total there.

My file is minicart-mixin.js below.

define([
'uiComponent',
'Magento_Customer/js/customer-data',
'jquery',
'ko',
'underscore',
'sidebar',
'mage/translate',
'mage/dropdown'
], function (Component, customerData, $, ko, _) {
'use strict';

var mixin = {
    isButtonEnable: function () {
        /*You can add your condition here based on your requirements.*/
        console.log(customerData.get('cart')._latestValue.subtotal);
    }
};

return function (target) {
    return target.extend(mixin);
};
});

Console i am getting like this

$70.00

How can i get the $70 only.


texts: Problem in uploading catalog images after upgrade to Magento 1.9.2.3

texts: I upgraded to magento 1.9.2.3 and now, when I try to upload a product image, the back-end shows the white square with a "?" in the centre. I attach a screenshot. Can you help me to solve this problem?


texts: Magento 2: Fixing Call to Undefined Method Mock_BlockFactory_4b440480::create() Test Failures

texts:
I recently submitted a pull request to Magento to fix a single instance of an object manager being directly used.

However, Magento's travis unit test run failed with the following error.

  PHP Fatal error:  Call to undefined method Mock_BlockFactory_4b440480::create() in /home/travis/build/magento/magento2/app/code/Magento/Cms/Controller/Adminhtml/Block/Delete.php on line 39

Based on the travis build, I can't even tell which test failed.  I've been able to get a similar (identical?) error locally with a stack trace

PHP Fatal error:  Call to undefined method Mock_BlockFactory_ec77572c::create() in /Users/alanstorm/Documents/github/astorm/magento2/app/code/Magento/Cms/Controller/Adminhtml/Block/Delete.php on line 39
PHP Stack trace:
PHP   1. {main}() /Users/alanstorm/Documents/github/astorm/magento2/vendor/phpunit/phpunit/phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() /Users/alanstorm/Documents/github/astorm/magento2/vendor/phpunit/phpunit/phpunit:55
PHP   3. PHPUnit_TextUI_Command->run() /Users/alanstorm/Documents/github/astorm/magento2/vendor/phpunit/phpunit/src/TextUI/Command.php:132
PHP   4. PHPUnit_TextUI_TestRunner->doRun() /Users/alanstorm/Documents/github/astorm/magento2/vendor/phpunit/phpunit/src/TextUI/Command.php:179
PHP   5. PHPUnit_Framework_TestSuite->run() /Users/alanstorm/Documents/github/astorm/magento2/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:426
PHP   6. PHPUnit_Framework_TestSuite->run() /Users/alanstorm/Documents/github/astorm/magento2/vendor/phpunit/phpunit/src/Framework/TestSuite.php:675
PHP   7. PHPUnit_Framework_TestCase->run() /Users/alanstorm/Documents/github/astorm/magento2/vendor/phpunit/phpunit/src/Framework/TestSuite.php:675
PHP   8. PHPUnit_Framework_TestResult->run() /Users/alanstorm/Documents/github/astorm/magento2/vendor/phpunit/phpunit/src/Framework/TestCase.php:753
PHP   9. PHPUnit_Framework_TestCase->runBare() /Users/alanstorm/Documents/github/astorm/magento2/vendor/phpunit/phpunit/src/Framework/TestResult.php:686
PHP  10. PHPUnit_Framework_TestCase->runTest() /Users/alanstorm/Documents/github/astorm/magento2/vendor/phpunit/phpunit/src/Framework/TestCase.php:817
PHP  11. ReflectionMethod->invokeArgs() /Users/alanstorm/Documents/github/astorm/magento2/vendor/phpunit/phpunit/src/Framework/TestCase.php:951
PHP  12. Magento\Cms\Test\Unit\Controller\Adminhtml\Block\DeleteTest->testDeleteAction() /Users/alanstorm/Documents/github/astorm/magento2/vendor/phpunit/phpunit/src/Framework/TestCase.php:951
PHP  13. Magento\Cms\Controller\Adminhtml\Block\Delete->execute() /Users/alanstorm/Documents/github/astorm/magento2/app/code/Magento/Cms/Test/Unit/Controller/Adminhtml/Block/DeleteTest.php:151

I've been able to narrow the local failure down to this test -- but I'm at a bit of a loss at to what's going on.

My guess is that the test framework has automatically mocked a DI argument for me, but that the automatic mocking is missing the create method.  If that's the case, then my actual question is How do I add a mock for a newly injected dependency in Magento's test framework.

However, I've never gone this deep down Magento's testing rabbit hole, so I'm not sure what actually needs to happen here.  Can anyone with Magento testing experience set me straight?


texts: Magenot 2 Customer registration issue in backend

texts:
I am having an issue with customer registration in the backend of my Magento 2 website,
After filling all the required fields it still asks me about email and phone while I already put both of them.
just like the below image.

While I am checking my Network tab in my browser inspector it is sending all the data correctly to the server

this message is when the email did not exist in my system, while I am putting an existing email it says this email is duplicated, which means this field is working but the validation somehow has an issue from the server-side.
I tried to edit some configurations and some code changes, but nothing solved.
As I am new to Magento and its coding framework, I decided not to play with codes any more not to face other problems,
could anyone provide me with any suggestions or direct me to the Function I should edit to solve the issue?


texts: Something went wrong while installing sample data. Please check var/log/system.log for details during Magento installation

texts:
I am a beginner in Magento. When i was trying to install "Magento-CE-2.0.0+Samples-2015-11-17-06-11-18.zip" on my local server using Wamp,it first gets stuck at 90%, after quite a while, it shows "Success" but at the end of the page it shows the following error-

  "Something went wrong while installing sample data. Please check
  var/log/system.log for details. You can retry installing the data now
  or just start using Magento"

I checked the "var/log/system.log" and there is this message-

  [2015-12-21 09:42:48] main.ERROR: Sample Data error: Warning:
  IntlDateFormatter::parse(): Date parsing failed in
  C:\wamp\www\Magento\vendor\magento\framework\Stdlib\DateTime\Timezone.php
  on line 166 [] []

when i click at the button "Launch Magento Admin" which is situated at the bottom of the page, i get this error

  What can i do to solve this problem?

I have already posted it on "Stack Overflow" because i didn't know this forum exists. There is no answer on "Stack Overflow" so i have posted it here again.


texts: Better query to delete object inside a collection

texts:
I'm trying to delete a wishlist item from the collection, the code works, but whats a better way instead of using the naive forloop

       $wishlist_collection = Mage::getModel('wishlist/item')->getCollection()
->addCustomerIdFilter($customer->getId());

        // @note come on, find better way
        foreach($wishlist_collection as $wish) {
            if ($wish->getProductId() == $product_id)
                $wish->delete();
        }


texts: magento profile debugg : db_update what is it

texts:
i was trying to debug slow reason fro my magento website in profile i got below output
there was large with db_update, can u tell db_update is used or what is that need or seems bit odd to me

layout/db_update: default   4.8821  1   0   0
CORE::create_object_of::Mage_Core_Model_Resource_Layout 0.0002  11  6,200   0
layout/db_update: STORE_french  4.8806  1   0   0
layout/db_update: THEME_frontend_smartwave_legenda  4.8796  1   0   0
layout/package_update: catalog_product_view 0.0078  1   32,392  0
layout/db_update: MAP_popup 4.8771  1   0   0
layout/db_update: MAP_price_msrp_item   4.8760  1   0   0
layout/db_update: SHORTCUT_popup    4.8747  1   0   0
layout/db_update: SHORTCUT_uk_popup 4.8732  1   0   0
layout/db_update: catalog_product_view  4.8712  1   0   0
layout/db_update: PRODUCT_TYPE_simple   4.8700  1   0   0
layout/db_update: PRODUCT_17    4.8690  1   0   0
layout/db_update: customer_logged_out   4.8677  1   0   0


texts: Display product attribute on product page magento 2

texts:
I am using magento 2.3
I want to display product attribute on product page, I select the storefront properties tab and change the value of Visible on Catalog Pages on Storefront drop down value No to Yes. but custom product attribute is not showing.

please see attached screenshot. same I want to display.


texts: How to get coupan code(Promotion code) amount for an order (Magento 2)

texts:
I am getting the coupon code(promotional code) for an order
For a coupon code, I am using this

$order->getCouponCode();

How to get the coupon code discounted price so I can show it to the user.
Like gift card I am getting gift card amount

For gift card name - $orderInfo->getGiftCards()

For gift amount - $orderInfo->getGiftCardsAmount()

I am showing all the information like this

I need to show coupon code option, I am not able to get the coupon code discounted price.

How to get coupon code price.


texts: Magento auto email send to user after place order magento 1.9

texts: just only want that when a user place the order from my site then an automatic email should be sent to the user email address which contain order details but my Magento dont do it. I have searched in google but I don't fiend an answer. I dont want to use other third party scripts like SMTP Pro.


texts: oberserver event for filter shipment method

texts:
can you please tell me which observer event i have to use for filter shipment method before shipment method load on onpage checkout ? and also code for how to acces a shipment method or return true or false.

i.e in below given code i can control which payment method i want i can show it or not on checkout page. even its enabled or disabled in magento admin so same thing i want with shipment method.

payment_method_is_active

//i.e this observer and below given coe i used for control payement method visibility on one page checkout

    public function filterpaymentmethod(Varien_Event_Observer $observer){
        $method = $observer->getEvent()->getMethodInstance();

        $event           = $observer->getEvent();
        $method          = $event->getMethodInstance();
        $result          = $event->getResult();
       // echo $method->getCode()."<br>";
      //$result->isAvailable = true;
or
       //$result->isAvailable = true;
}
}

So i want same thing with shipment method


texts: Magento 2 server and client-side validation

texts:
In this Magento 2 documentation has provided tutorial how to create custom client-side validation before order placement, but does the validation not supposed to be in server-side also?

If the tutorial is incomplete then how to validate custom fields added to checkout page in server-side?
Example: when creating custom checkout field, the data from it is inserted into next db tables sales_order, sales_order_grid, quote. Is server-side validation even then necessary to add if i have followed this tutorial?


texts: Can anyone explain about pay trace payment gateway?

texts: Can anyone explain the benefits of pay trace payment gateway


texts: Magento 2.3.1 - Advanced pricing error after customer login in frontend

texts:
We are working with Magento 2.3.1. The cache is enabled.
We are experiencing strange behavior with the respective customer groups and the advanced pricing: It seems the customer groups somehow "slip out" after putting products into the shopping cart.
1.) We have standard customers and business customers
2.) When logged in as business customer one sees the advances (tier prices) of a product. Like here All looks good. Advanced prices are showing.
3.) Now when I put a product in the cart first problem is, that the advanced prices are not taken into the cart but only the standard prices. Then when I go back continue shopping, still logged in as a business customer, it does not show the advanced prices anymore at all, but only the normal prices for non logged in private customers. See here.
4.) Does anyone out there have a hint, what could have happened here, regarding the customer groups and the price display and add to cart function of the correct price?
I´d be super thankful for any help.
Best regards


texts:
I'm using UI components to list campaigns, and gettings the rows at collection class, it should return more than one row. Anyone knows how to merge the data to be displayed in the campaign_listing.xml So I can have just one row and the columns, in this case store_id can be together?

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

    $this->getSelect()->join(
        ['secondTable' => $this->getTable('bi_loyalty_campaign_store')],
        'entity_id = secondTable.campaign_id',
        ['store_id']
        )->join(
        ['thirdTable' => $this->getTable('store_group')],
        'store_id = thirdTable.group_id',
        ['stores' => 'name']
    );
    $this->addFilterToMap('stores', 'thirdTable.name');

}

I want to transform this:

'3', 'exp', 'jkvjhfh', '2018-06-12', '2018-06-29', '1', '1', 'Main Website Store'`
'3', 'exp', 'jkvjhfh', '2018-06-12', '2018-06-29', '1', '2', 'loja2'

into this:

'3', 'exp', 'jkvjhfh', '2018-06-12', '2018-06-29', '1', '1,2', 'Main Website Store, loja2'

Currently I'm getting this error when listings campaigns with ui components:

  Item
  (Magento\Framework\View\Element\UiComponent\DataProvider\Document)
  with the same ID "3" already exists.

Because there are more than one campaign with the same id.

The query that i would like to is:

SELECT main_table.*, group_concat(secondTable.store_id), group_concat(thirdTable.name) AS stores FROM bi_loyalty_campaigns AS main_table
 INNER JOIN bi_loyalty_campaign_store AS secondTable ON main_table.entity_id = secondTable.campaign_id
 INNER JOIN store_group AS thirdTable ON thirdTable.group_id =store_id  GROUP BY campaign_id ORDER BY entity_id ASC


texts: Removing CSS as part of custom page layout

texts:
I have a custom page layout defined as lf_cms in layouts.xml file, and am trying to remove the css file as defined in default_head_blocks.xml and load a new CSS file, except the CSS changes are not loading.

What do I need to do to get changes to the CSS files to load on the page?

I know that the page layout is loading correctly because it's showing up in the admin section under the Design tab on a CMS page. In addition, if I make a syntax error, I get an exception when viewing the page.

I have also recompiled static assets, cleared caches, and removed var/view_preprocessed files.

  [custom_theme]/Magento_Theme/layouts.xml

<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
    <layout id="lf_cms">
        <label translate="true">lf_cms Custom</label>
    </layout>
</page_layouts>

  [custom_theme]/Magento_Theme/page_layout/lf_cms.xml

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="1column"/>
    <head>
        <remove src="css/standardStyles.css" />
        <css src="css/customStyles.css" />
    </head>
</layout>

Any help or direction would be greatly appreciated.

Thank you!


texts: How to set input type 'Select' in ui_component grid in magento 2.1.16

texts:
I just Create ui_component Vender/Module/view/adminhtml/ui_component
and in this I user

<column name="check_status" component="Magento_Ui/js/grid/columns/select">
           <settings>
               <options class="PME\MakeAnOffer\Controller\Adminhtml\Index\Status\ProductStatus"/>
               <filter>select</filter>
               <dataType>select</dataType>
               <label translate="true">Status</label>
           </settings>
       </column>

now its works perfectly for 2.2.7 and 2.3.0 but in case of 2.1.16 it give me the error

and when I remove these lines which I mention in my code then its works perfectly how can I set this??? or any alternative in place of <setting> or component


texts: How to create front-end custom form with one textbox and submit button in magento

texts:
I am interested in creating a submission form that allows users to submit order decline remarks.

I just need it to be a simple form with input box and submit button when do I submit form, form data should be store in table.

I have come across several tutorials that allow you to extend a basic contact form but that will not work in this instance.

Any general guidance would be appreciated.


texts:
As per the update in magento for security patch SUPEE6788 as mentioned in [link][1]

[1]: http://magento.com/security/patches/supee-6788-technical-details i just change my config.xml from pervious code

<admin>
        <routers>
            <shipping>
                <use>admin</use>
                <args>
                    <module>Test_Shipping</module>
                    <frontName>shipping</frontName>
                </args>
            </shipping>
        </routers>
    </admin>

to

<admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <test_shipping after="Mage_Adminhtml">TestShipping_Adminhtml</test_shipping>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>

but it did not work for me can anyone has solution for this issue.


texts: Magento 1.14.4.0: Programmatically clear cache of individual product

texts:
I need to clear the cache for individual product. For example, If admin change any detail/price/qty of product. I need to run script that clear the cache for that particular product only. I am running script which clear the cache for all products but I need to do it for single product. I am running script from route of Magento.

<?php
require_once("app/Mage.php");
Mage::app();
Mage::app()->setCurrentStore(1);
$type = 'BLOCK_HTML';
Enterprise_PageCache_Model_Cache::getCacheInstance()
            ->cleanType($type);
echo "success";

Please suggest. Thank you in advance.


texts: Recently Viewed Products Not Showing (on live server only)

texts:
For all user types.

It works perfectly on my development WAMP environment, but does not work on live server.

local.xml

<block type="reports/product_viewed" after="-" name="bottom.reports.product.viewed" as="recently_viewed" template="reports/product_viewed.phtml" />

When viewing the product page with template hints, the block exists at the bottom of the page, but with no content.

When I put a random html string into the product_viewed.phtml file, above everything, even this does not output - the phtml file is not even being called on the live server.

I would assume Mage_Reports_Block_Product_Viewed is returning a blank collection - but I cannot find out why, please help!


texts: Magento 2 : Load/Get Orders by Direct Queries

texts:
I have multiple Order Id in foreach loop, and I want to load or get orders by these order_ids.

I have used this code

if ($requestName == 'sales_order_grid_data_source') {
    if ($result instanceof $this->collection)
    {
        $select = $this->collection->getSelect();
        if(!empty($filtered_order_id))
        {
            foreach($filtered_order_id as $order_id)
            {
                //order id here........... like 6, 7, 8
                //what to do here??
                $select->('main_table.entity_id = '.$order_id.'');
            }
        }
        return $this->collection;
    }
}

Please suggest any solution?


texts: Magento 2 product collection not filtering by custom attribute (Type multi-select)?

texts:
I am trying to filter product collection with custom attribute "Groups" code "group" which is a multi-select attribute created from Magento admin, but it is giving empty result (this attribute is assigned to products)

Code:

$collection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
        $collection->addAttributeToSelect('*');
        $collection->addAttributeToFilter('group', array( 'in' => array( 5 ) ));
        //$collection->addAttributeToFilter(array( array('attribute'=>'group', 'eq' => '5')));
        $collection->load();

what am I doing wrong ?

Note: Excuse me for using Object manager as currently I am just trying  functionality


texts:
I want to insert custom options for a product via sql query.
I tried with these queries:

INSERT INTO catalog_product_option ( sku, product_id, image_size_x, file_extension, option_id, image_size_y, sort_order, is_require, type, max_characters ) VALUES ( NULL, 24981, NULL, NULL, 944, NULL, 0, 1, 'drop_down', NULL );

INSERT INTO catalog_product_option_title ( option_title_id, option_id, store_id, title ) VALUES ( 944, 944, 0, 'NEW MODEL' );

INSERT INTO catalog_product_option_type_value ( option_type_id, sku, sort_order, option_id ) VALUES ( 3264, '00-13000381', 1, 944 );

INSERT INTO catalog_product_option_type_title ( option_type_id,
option_type_title_id, store_id, title ) VALUES ( 3264, 3264, 0, '909 PLUS' );

INSERT INTO catalog_product_option_type_price ( option_type_id, price_type, price, option_type_price_id, store_id ) VALUES ( 3264, 'fixed', 0.0, 3264, 0 );

The option is not showed in the admin panel.
Am I missing some table?


texts: Magento 2 FrontEnd: Display Information only for an admin user

texts:
As the title says, I want to be able to display some information in the product page that only appears for admins logged in.

1st question: How do I define an user (client) in frontend as admin?
2nd question: How do I show that information (inside a div for example) only to the clients that I want, or in this case, are
admins?

Is this possible?


texts: Magento2: How to call js function in custom file

texts:
I want to call a particular third party js function in my custom js file.

XXX/YYY/view/frontend/web/js/view/payment/method-renderer/cashondelivery-method.js.

define([
        'Magento_Checkout/js/view/payment/default'
    ], function (Component) {
        'use strict';

    return Component.extend({
        defaults: {
            template: 'XXX_YYY/payment/cashondelivery'
        },

        /**
         * Returns payment method instructions.
         *
         * @return {*}
         */
        getInstructions: function () {
            //some code here
        },
        getCodFeeInstruction: function () {
            return window.checkoutConfig.codfee_msg;
        }
    });
});

I need to call getInstructions() in my custom js file.

In my custom file:

AAA/ZZZ/js/view/payment/method-renderer/online-method.js

define([
    'jquery',
    'Magento_Checkout/js/view/payment/default',
    'mage/url',
    'XXX_YYY/js/view/payment/method-renderer/cashondelivery-method'
], function ($, Component, url, payment) {
    'use strict';
    console.log('online');
    return Component.extend({
        defaults: {
            template: 'AAA_ZZZ/payment-methods/onlinepayment',

        },

        getPreparePayment: function () {
            console.log("asd");
            payment.getInstructions();
        }
    });
});

But it returns payment.getInstructions is not a function error in console.

How to do that.

Thanks.


texts: Magento 2: how to change the Order ID's?

texts:
There is a similar question here: Magento 2 - What is the correct way to change default Order Id?
However that did not work for me.

The first order in my store has the ID 000000001.
I want that number to start with 2.
I also want to change the last digit, so the next order's ends in 399.


texts: How to filter Products with activated Flag?

texts: I use the Use for Promo Rule Conditions flag. How can I filter only products having this flag set to yes? Is there a table where it is set so that I can use it for filtering?


texts: How to calculate tax based on 4 decimals?

texts:
Magento 2 calculates the price Inc tax based on 2 decimals. I managed to save the price as 4 decimals. This get's stored in the catalog_product_entity_decimal table.

The problem now is that the vat does not get calculated based on the 4 decimals but the 2.

Example:

  Stored price: 41,275200
  vat percentage: 9 %
  expected price inc VAT: 44,989968 (displayed as 44,99)
  actual price displayed 45,00 (41,28 x 1,09 = 44,9952)

How can I fix this, I want the calculations based on all the decimals (4 in my case), but still want to display prices with 2 decimals?


texts: How best to restore the javascript console in Chrome/ developer tools in dev environment?

texts:
I've noticed that the javascript console object doesn't work on Magento sites when using any developer tools other than firebug. So debugging javascript with statements like console.log("something") doesn't work in Chrome for instance.

This seems to be done in /web/js/varien/js.js where a dummy console object is created and

if (!("console" in window) || !("firebug" in console))
{
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];

window.console = {};
for (var i = 0; i < names.length; ++i)
    window.console[names[i]] = function() {}
}

I'm guessing it's done to stop the various 3rd party scripts from sending log data to the console in production or to stop it from crashing in browsers that don't have a native console object.

I can comment out that code, but I'm guessing that's not what the team at Varien do when working on javascript (or perhaps they only use firebug...).

So what's the smart way to do this so that I've got it in my development environment but I don't accidentally push it to production?


texts: Run custom logic when order creation is rolled back due to an exception

texts:
I'm building a module that integrates 3rd party gift cards.  I'm using an observer before the order is placed to charge the card.

public function beforeOrderPlace($observer)
{
    $order = $observer->getOrder();
    $this->chargeGiftcard($order->getGiftcardNumber(), $order->getGiftcardAmount());
}

However, in the event the order can't be created (i.e. the remaining balance charged to a credit card failed) I need to "uncharge" the giftcard from the 3rd party, with something like

public function rollback($observer)
{
    $order = $observer->getOrder();
    $this->addBalanceToGiftcard($order->getGiftcardNumber(), $order->getGiftcardAmount());
}

How can I hook into the transaction used during order creation to add my rollback?


texts: Increase product qty to more than 8 charcters

texts:
Currently when I enter
9999999999999 (13 digits) in the Product Inventory tab of the admin, it automatically changes the qty to 99999999.9999 (8 floats and 4 decimals).

How can this be changed to allow the 13 non-decimal numerals?


texts:
I currently have close to 3000 products and all use this custom option.
I need to change the highlighted field showing 2.99 to 3.99. How can this be accomplished?


texts: Magento 2: Translate Order Email template

texts:
How can I translate the attribute label?

I've already added to "Manage Label" but still not working.

Color is translated but not size?

Does anyone have an idea ? I tried all possible by placing in my_theme/i18n.de_DE.csv still not working.


texts: Exclude CSS from styles-l/styles-m files if the module output is disabled

texts: I disabled some modules output for my website and would like to exclude their CSS too. Any idea.


texts: Magento 1.8.1 : IAS infinite scroll not working

texts:
I have installed ajax scroll infinite scroll module in my store, it is installed correctly without any error but it is not working.

I found that a new page is requested when i scroll page and response also getting html with success flag but the problem is html is not getting replaced with result.

Following this code I have written to enable infinite scroll.

<script type="text/javascript">
jQuery.ias({
container : '.category-products',
    item: '.item',
    pagination: '.toolbar .pager',
next: '.next',
loader: '<img src="../skin/frontend/orra/default/images/ajaxscroll/loader.gif" /> Loading more products, please be patient...',

});

</script>

can anybody help me to resolve the issue?


texts: How get product IDs of root category and subcategory under root category programmatically?

texts: I want to get all product IDs of a root category and subcategory programmatically, when I click the root category. How can I get product IDs of both categories together under root category?


texts: Get item price excluding tax in email invoice - Magento 2.4.1

texts:
We want to load the product price excluding tax inside the invoice email.
Therefore we copied the default file to: /app/design/frontend/theme/theme/Magento_Sales/templates/email/items/invoice/default.phtml
Our tax setting for "Catalog Prices" is set to "Including Tax".
And we tried a lot, but at the moment the price is display including tax with:
<?php echo $this->helper('Magento\Framework\Pricing\Helper\Data')->currency($_item->getPrice(), true, false);?>

How can we get the price excluding tax?


texts: How to log line breaks in default Magento log?

texts: This might be a too simple question for someone. How can I get a line break in my .log file by using Mage::log()? Whatever I pass to log() it treats as a string. Any help would be appreciated.


texts: Magento2- How to update an extension to a new version?

texts:
I have my extension in app/code. The extension name is Mirasvit_Seo.

I want to update it to the latest version. I simply ran composer update but it didn't got upgraded. I tried doing this link but got an error showing :

  [InvalidArgumentException]

Could not find a matching version of package mirasvit/module-seo. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).

Can anyone please help me with this?


texts: Magento 2 load multiselect attribute values in product list

texts:
I am trying to load multiple values of Color attribute in product list phtml file with this code:
<?php echo __('Color: ') . $_product->getAttributeText('color'); ?>

But I get array error:
Notice: Array to string conversion

Any help please? This is magento 2.4 version


texts: is reference block inside reference block is a good thing or bad?

texts:
Before anything, I already searched this online and didn't find anything satisfactory.

I was working on a project where I had to add an extra column in order items section of every place.

Everything was working fine I added the column everywhere including in the admin section of order view page.

In this section, I add the extra field by increasing an extra attribute to the sales_order_view.xml layout file, added the code below,

<referenceBlock name="order_items">
    <arguments>
        <argument name="columns" xsi:type="array">
            <item name="product_type" xsi:type="string" translate="true">Product Type</item>
        </argument>
    </arguments>

    <referenceBlock name="default_order_items_renderer">
        <arguments>
            <argument name="columns" xsi:type="array">
                <item name="product_type" xsi:type="string" translate="true">col-product_type</item>
            </argument>
        </arguments>
    </referenceBlock>

    <block class="Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn"
               name="column_product_type" template="Custom_CustomColumnInItems::order/items/product_type.phtml" group="column" />
</referenceBlock>

and it's working fine, but then one of the senior's pinout the point that referenceBlock inside the referenceBlock is never seen before.

So My question is, Is the referenceBlock inside the referenceBlock is allowed and legal in magento2 or not?

Am I allowed to do that?


texts:
I'm having a problem with product checkout in M2. When I want to place the order, a success page must be displayed, but I got redirected to the view cart page, and the item is still in the cart. I have traced it down to app/code/Magento/Checkout/Controller/Onepage/Success.php and find out this piece of code:

if (!$this->_objectManager->get('Magento\Checkout\Model\Session\SuccessValidator')->isValid()) {
        return $this->resultRedirectFactory->create()->setPath('checkout/cart');
    }

and in app/code/Magento/Checkout/Model/Session/Validator.php

    public function isValid()
{
    if (!$this->checkoutSession->getLastSuccessQuoteId()) {
        return false;
    }

    if (!$this->checkoutSession->getLastQuoteId() || !$this->checkoutSession->getLastOrderId()) {
        return false;
    }
    return true;
}

What could be the cause to this?


texts: How to fix this "Running schema recurring.Unique constraint violation found"

texts:
How to fix this error
"Running schema recurring.Unique constraint violation found".

This statement occurs when I used upgrade command of Magento 2 model upgradation.


texts:
when I am updating product using the following code

$product = $this->productFactory->create()->load($productId);
foreach ($attrData as $key => $value) {
    $product->setDataUsingMethod($key, $value);
}

$product->setStockData(['qty' => $newqty, 'is_in_stock' => $newss]);

$this->productFactory is object of \Magento\Catalog\Model\ProductFactory

the product updated data in product grid is not getting updated, only data in product edit section is getting updated. In the grid, I am getting older values even after the cache flush and re-indexation.

When I am saving data using the following method

$this->productAction->create()->updateAttributes([$productId], $attrData, $storeId);

$this->productAction is object of \Magento\Catalog\Model\Product\ActionFactory

everything works as expected and the data in product edit section and product grid is same.

Why is it like so and what is the reason for this behaviour?


texts: Magento2: Disable private(browser) caching Magento_Review

texts:
Version: Magento 2.3.2
Problem: When a customer review is placed on the product page (and approved) you see the number of reviews going up by 1. But the review itself is not visble until the user clears the browser cache. I see the Magento_Review uses the customerdata implementation, but this part is new to me.
My question: Is there a clean way of disabling this local caching so reviews get visible immediately (after approving the review ofcourse) without the need of the user to clear its cache?
Thanks!


texts:
I just add some additional attributes on magento stores and I see it on product detail page. But when I duplicate this code below, its not working. I need to add 2 custom attributes so I will have, DESCRIPTION (which is already given), SPECIFICATION (custom), DELIVERY (custom) and REVIEW (given) TABS.

I'm editing it on catalog.xml file

 <block type="catalog/product_view_attributes" name="product.attributes" as="additional" template="catalog/product/view/attributes.phtml">
        <action method="addToParentGroup"><group>detailed_info</group></action>
        <action method="setTitle" translate="value"><value>Additional Information</value></action>
 </block>


texts: Infinite scroll not working on home page cms

texts:
I am a newbie to magento, I installed Strategery InfiniteScroll 2 for infinite scrolling of products. It works properly in inner pages. It is not working in home page.

When i viewed the home page source code the jquery files are not included in home page(cms).
How can i include an extensions jquery files on home page. The jquery.latest.min.js also not included in home page. How can i include this on home page


texts: Magento 2.0 Product page form does not show up if I enable my custom catalog_product_new.xml

texts:
The product form page seems to disappear if I enable my custom catalog_product_new.xml.

See screenshot:

I checked the log files and I see a main.CRITICAL: Block product_tabs throws exception and cannot be rendered.
I can't seem to point out was is the culprit although I am assuming the issue is in the catalog_product_new.xml.

This is the code I have added:

Rahaha\AdminSample\view\adminhtml\layout\catalog_product_new.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

        <referenceBlock name="product_tabs">
            <block class="Rahaha\AdminSample\Block\Adminhtml\Product\Edit\Tab\CustomTabz" name="custom-tab" template="product/tab/customtabz.phtml">
            </block>
            <action method="addTab">
                <argument name="name" xsi:type="string">product-reviews</argument>
                <argument name="block" xsi:type="string">custom-tab</argument>
            </action>
        </referenceBlock>

</page>

Rahaha\AdminSample\view\adminhtml\templates\catalog\product\tab\customtabz.phtml

<fieldset class="fieldset form-inline">
<legend class="legend"><?php echo __('Custom Tab') ?></legend>

        <?php  echo __('First') ?>

        <input type="text" class="input-text" id="custom_first" name="first" value="first">

        <?php  echo __('Second') ?>

        <input type="text" class="input-text" id="custom_second" name="second" value="second">

</fieldset>

Rahaha\AdminSample\Block\Adminhtml\Product\Edit\Tab\CustomTabz.php

<?php
namespace Rahaha\AdminSample\Block\Adminhtml\Product\Edit\Tab;

class CustomTabz extends \Magento\Backend\Block\Widget
{
    protected $_template = 'catalog/product/tab/customtabz.phtml';

    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        array $data = []
    ) {
       parent::__construct($context, $data);
    }
}


texts: Unable to extend adminhtml customer addresses tab in magento2

texts:
In magento1 i could extend the adminhtml customer addresses tab

class Vendor_Module_Block_Adminhtml_Customer_Edit_Tab_Addresses extends Mage_Adminhtml_Block_Customer_Edit_Tab_Addresses {
    public function __construct() {
        parent::__construct();
        $this->setTemplate('vlcsolutions/customer/tab/addresses.phtml');
    }
}

and now if i modify vlcsolutions/customer/tab/addresses.phtml, changes are reflected,

How to achieve the same in magento2.

I have not found any class or template like customer/tab/addresses.phtml


texts: Magento does not pass empty varible in POST data

texts:
I am using Magento community and I have below problem.
I have created a module which adds a product to customer groups. I have added checkboxes for all the customer groups in a tab using Ajax tab using code..

<?php foreach ($group as $eachGroup) { ?>
<input type="checkbox" name="productgroup[]" value="<?php echo $eachGroup->getCustomerGroupId(); ?>" <?php if(in_array($eachGroup->getCustomerGroupId(),$existGroupProduct)){ ?> checked="checked" <?php } ?>>
<?php } ?>

When I select a customer group, it saves the data. When I edit my selected values it works fine.

Now when I try to remove all the groups by unselecting all checkboxes, it is not working. I have checked my variable using below conditions but none works.

isset($_POST['productgroup'])
..
empty($_POST['productgroup'])

If I set the value of the array as null in my function it also resets my customer groups value if I have not opened my "Customer Group" tab and I save the product.


texts: Problems with friendsofphp/php-cs-fixer and php7.3

texts:
Hello to all users of the forum, I need help.

I upgraded from version 2.3.2-p2 to 2.3.4 and after that the error is occurring:

composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

 Problem 1
    - friendsofphp/php-cs-fixer v2.13.3 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.15) does not satisfy that requirement.
    - friendsofphp/php-cs-fixer v2.13.2 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.15) does not satisfy that requirement.
    - friendsofphp/php-cs-fixer v2.13.1 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.15) does not satisfy that requirement.
    - friendsofphp/php-cs-fixer v2.13.0 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.15) does not satisfy that requirement.
    - friendsofphp/php-cs-fixer v2.13.3 requires php ^5.6 || >=7.0 <7.3 -> your PHP version (7.3.15) does not satisfy that requirement.
    - Installation request for friendsofphp/php-cs-fixer ~2.13.0 -> satisfiable by friendsofphp/php-cs-fixer[v2.13.0, v2.13.1, v2.13.2, v2.13.3]

.

Anyone who can help me will be grateful.

Hugs


texts:
I am after taking over a Magento 2 site from another developer. Once a day they pointed their browser to a PHP script in the root directory that would create/update certain products.

Instead of entering that address each day into the browser I wanted to use a Cron job, however, when I set up the Cron job it will email me errors like:

  Warning: fopen(pub/media/Logs/time.txt): failed to open stream: No such file or directory in /public_html/file.php on line 22

and the script won't work. It does work and find that file when I enter the file path in the browser.

Why does it work with the browser but not with a cron job?


texts: How properly migrate Magento to a new server

texts:
I could not make Magento 2 work on a new server by copying the backup and DB and installing all required software. No links working for me from the homepage, as if something wrong with rewriting, and I could not find why yet. I made a new install in another directory and it is working.

What is proper procedure of migration of Magento setup to another server?


texts:
I just did a test order on my magento 2.0.0 store.
By creating a invoice for the PO order, i get the error "We can't save the invoice right now."

After testing and trying, i viewed the exception.log file which states the following:

Next Zend_Db_Statement_Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base_grand_total' in 'field list', query was: IN$
 LEFT JOIN `dxm2_sales_order` AS `sales_order` ON sales_invoice.order_id = sales_order.entity_id
 LEFT JOIN `dxm2_sales_order_address` AS `sales_shipping_address` ON sales_invoice.shipping_address_id = sales_shipping_address.entity_id
 LEFT JOIN `dxm2_sales_order_address` AS `sales_billing_address` ON sales_invoice.billing_address_id = sales_billing_address.entity_id
 LEFT JOIN `dxm2_sales_order_payment` AS `sales_order_payment` ON sales_invoice.order_id = sales_order_payment.parent_id WHERE (sales_invo$

should base_grand_total not have the prefix?

Its magento2 2.0.0. in developer mode. just did a transaction for first time.


texts: Extending a controller doesn't appear to work

texts:
I'm trying to externd a controller. The customer controller to be exact. I found a example on Inchoo But I can't get it to work.

I tried turning off all othermodules. I've checked everything multipletimes. Nothing seems to work.
We run Magento 1.9.0.1

app/code/local/MyModule/Custompasswordforget/controllers/AccountController.php

<?php
require_once(Mage::getModuleDir('controllers','Mage_Customer').DS.'AccountController.php')
//die('hit this file');  // doesn't work
class MyModule_Custompasswordforget_AccountController extends Mage_Customer_AccountController {
  public function forgotPasswordAction()
  {
    //die('hit this method');  // doesn't work

    parent::forgotPasswordAction();
  }
}

app/code/local/MyModule/Custompasswordforget/etc/config.xml

<?xml version="1.0"?>
<config>
  <modules>
    <MyModule_Custompasswordforget>
      <version>0.9.0</version>
    </MyModule_Custompasswordforget>
  </modules>
  <frontend>
    <routers>
      <customer>
        <args>
          <modules>
            <MyModule_Custompasswordforget before="Mage_Customer_AccountController">
              MyModule_Custompasswordforget
            </MyModule_Custompasswordforget>
          </modules>
        </args>
      </customer>
    </routers>
  </frontend>
</config>

app/etc/modules/MyModule_Custompasswordforget.xml

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

I'm afraid for a small oversight but I just can't find it.
Thanks in advance.


texts: How to get active filters attribute code in state.phtml

texts: I have been working on Magento C.E 1.9.0.2, and I am implementing custom AJAX product loader, I have achieved everything but I am not able to filter out my product collection as per the selected filters. All I need to have the attribute code of selected filters, which I think can be achieved from state.phtml, where we have the active filters. But, I am not able to get the correct method to to get the active filter's attribute code and current selected values. Need help....


texts: Magento 2: Adding fields/attributes to product "Assigned Sources"

texts:
A relatively new feature in Magento 2 is stock sources, where inventory can be held at multiple locations, like this:

Our client wants to store the location of the product within each store (aisle and shelf). Is it possible to extend the source functionality to achieve this?


texts: Add product with customized option in the cart through API

texts:
I'm having a problem adding a product with custom options in the Magento cart 2.3.1.

After defining a custom option as multiple selection, I tried to add the product to the cart with the following request:

POST /V1/carts/mine/items

JSON:
{"cartItem":
    {
    "sku": "Big Lanche-1",
    "qty": 1,
    "product_type":"simple",
    "quote_id": "631",
        "product_option": {
            "extension_attributes": {
                "custom_options": [
                    {
                        "option_id": "23",
                        "option_value": "106,107"
                    }
                ]
            }
        }
    }
}

However, the error is returned when sending a request:

{
    "message": "The product's required option(s) weren't entered. Make sure the options are entered and try again."
}

So I tried to make the following request:

POST /V1/carts/mine/items

JSON:
{"cartItem":
    {
    "sku": "Big Lanche-1",
    "qty": 1,
    "product_type":"simple",
    "quote_id": "631",
        "product_option": {
            "extension_attributes": {
                "custom_options": [
                    {
                        "option_id": "23",
                        "option_value": "[106,107]"
                    }
                ]
            }
        }
    }
}

Where I added brackets and the request was accepted. However, the sum of the values of the custom options in the quote does not occur, that is, it remains as if they were not applied.

Can anyone tell me what is the correct way to do this request?


texts: WebShopApps Matrix Rate exclude Zip/Postal Code From magento 2.4.0

texts:
WebShopApps Matrix Rate exclude particular Zip/Postal Code From magento 2.4.0
thanks for Advance help


texts: Magento 2: Google Recaptcha is not working in Customer's Login Page

texts:
I have enabled the Google Recaptcha and its working fine in Customer Creation page but its not showing at the Customer Login page.
In the configuration, I have enabled it for Customer Login page as well and am not sure what I have missed.

Hope I will get guidance to resolve this issue.
Thanks in advance.


texts: how to Change Uploaded Product image disabled value

texts:
I uploaded product image programatically by using following code.

$files = $_FILES['images']['name'];
$f = substr($files,0,1);
$s= substr($files,1,1);
$absolute_path = Mage::getBaseDir('media').DS.'catalog'.DS.'product'.DS.$f.DS.$s;
if(isset($files) && $files != '')
{
    try
    {
          if(file_exists($absolute_path.DS.$files))
          {
               $var = rand(0,99);
               $files = $var.'_'.$files;
          }
          // Starting upload
          $uploader = new Varien_File_Uploader('images');
          //Here 4 extention would work
          $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
          $uploader->setAllowRenameFiles(false);
          //false -> get the file directly in the specified folder
          //true -> get the file in the product like folders /media/catalog/product/file.gif
          $uploader->setFilesDispersion(false);
          //We set media as the upload dir
          $uploader->save($absolute_path, $files);

    }
    catch(Exception $e)
    {
          Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
    }

$absolute_path = Mage::getBaseDir('media').DS.'catalog'.DS.'product'.DS.$f.DS.$s.DS.$files;

$mediaArray = array(
        'thumbnail'   => $absolute_path,
        'small_image' => $absolute_path,
        'image'       => $absolute_path,
    );
    foreach($mediaArray as $imageType => $files)
    {
        $filePath = $files;
        if(file_exists($filePath))
        {
            try
            {
             $product->addImageToMediaGallery($filePath, $imageType, false);
            }
            catch (Exception $e)
            {
                echo $e->getMessage();
            }
        }
        else
        {
            echo "Product does not have an image or the path is incorrect. Path was: {$filePath}<br/>";
        }
    }
}

It is added in backend but in the table

  catalog_product_entity_media_gallery_value

uploaded images disabled column value is 1.

If I upload image from backend, the uploaded image disabled column value is set as 0.
How to fix this.


texts: What happens when I delete magento product?

texts: I want to delete some disabled configurable products in magento-1.7,I need to know if the deleting affects any statistics like sales,billing and order history.. etc.


texts: How to show EAV custom attribute of Category in PHTML file? - Magento 2

texts:
I have created a custom EAV attribute called "Force Grid Mod" using the script below. Now I don't know how to show its value in list.phtml. Its working on the backend. Does someone knows how can I show its value in my list.phtml ?

<?php

namespace VendorName\ModuleName\Setup;

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

/**
 * @codeCoverageIgnore
 */
class InstallData implements InstallDataInterface
{
    /**
     * EAV setup factory
     *
     * @var EavSetupFactory
     */
    private $eavSetupFactory;

    /**
     * Init
     *
     * @param EavSetupFactory $eavSetupFactory
     */
    public function __construct(EavSetupFactory $eavSetupFactory)
    {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    /**
     * {@inheritdoc}
     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
     */
    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        /** @var EavSetup $eavSetup */
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

        /**
         * Add attributes to the eav/attribute
         */

        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Category::ENTITY,
            'force_grid_mode',
            [
                        'type' => 'int',
                        'label' => 'Force Grid mod',
                        'input' => 'select',
                        'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
                        'required' => false,
                        'sort_order' => 30,
                        'group' => 'Display Settings',
            ]
        );
    }
}


texts: How to convert custom attribute from order item to invoice item?

texts:
I am creating a module to add a additional field (which is a custom product attribute) for invoice.

I have added the custom attribute for the product and then it is converted to quote item, also it is converted to order item. But I'm not able to convert it to invoice item from the order item. I have added the field for this attribute in sales_flat_invoice_item table. Even then, it is not getting converted to invoice item from order item.

In my config.xml, I have tried like below

<fieldsets>
            <sales_convert_quote_item>
                <revenue_account_number>
                    <to_order_item>*</to_order_item>
                </revenue_account_number>
            </sales_convert_quote_item>
            <sales_convert_order_item>
                <revenue_account_number>
                    <to_quote_item>*</to_quote_item>
                    <to_invoice_item>*</to_invoice_item>
                </revenue_account_number>
            </sales_convert_order_item>
 </fieldsets>

Can anyone help on this please?


texts: Magento 2 : Transactional mail going to spam (only Gmail)

texts:
I have configured SMTP Magetop - Marketplace Extensions using Sendgrid(Third party service) in M2 site(ver. 2.1.8).

When I trying a test for Gmail, mail is going to spam folder. But when I trying using Zoho, Yahoo and office365 the mail is going to inbox.

I did System > Configuration > Advanced > System > Mail Sending Settings > Set Return-Path to YES

As well as I am tried with Gmail SMTP.


texts: Shared wishlist items in email not display images in Magento 2

texts:
When I share List product in my wishlist to Friend list, Everything ok, but Image can't render in the mails.

The images are broken in the mails of the shared wishlist.


texts: Magento 2: is there any way to set order id incremented by 5 on next order?

texts:
I need to increase order id by 5 on the next order placed.

  For Example:

  First order id is #10000007 then the next order placed shall have the order ID as #10000012 and so on, incremented by 5 on every order.

Please share your suggestions.


texts: Reference for Differences Between Versions of Magento

texts:
As I understand it , there was a big change between Magento 1.3 and 1.4 - then the next big change was at 2 ( with maybe some sort of change in version 1.6 )

The problem I have is translating data from an old version of Magento to a new one. I want to know where to find the differences in attribute model ( or some idea as to where I would start looking ) . I'm a bit stumped on how to start with this , the documentation is very thin - and I've purchased a couple of extensions that supposedly do this , but the code / service is absolutely terrible.

So - my specific issue is that I need to map old data to new - and I can't find a good document or reference to show me the differences. specifically around Magento 1 for now.


texts: How to display pending orders in Magento dashboard graph

texts:
In my Magento 2 apps don't display the pending orders quantities and Lifetime Sales, Average Order,Tax,Revenue,Shipping values in the graph like they used to.

After some searching around, I figured it only displays "processing" (orders that have been invoiced) or "complete" orders since showing in charts.

I want to pending order details in graph.

Note: in Magento 1 available but not Magento 2 available

Any help would be greatly appreciated.
Thanks!!


texts: Show review count outside of review template

texts:
I have a review.phtml template that shows the review count of the current product using this code:

if($this->getReviews()):
  $rc = $this->getReviewCount();
if($this->getReviewCount() == 1):
  echo 'getLogoSrc() . '" /> (' . $rc . ' review)';
elseif($this->getReviewCount() > 1):
  echo 'getLogoSrc() . '" /> (' . $rc . ' reviews)';
endif;
endif;

I want to show the review count somewhere else on the page(same product) by putting the code in summary.phtml where the default "leave a review" link is.

This doesnt work as I am sure I need to change $this to where the review.phtml template is?


texts: Escaping subtotal from sucess-page in Magento don't work after upgrading from 1.7 to 1.9

texts:
In my success.phtml file I'm having a script that escapes the subtotal (among other) to an affiliateprogram. This used to work fine in version 1.7 but after upgrading to 1.9 it only outputs the value 0. Other values like order id is still being sent correct.

Here is the line of code that used to output the value:

transactionAmount: '<?php echo $this->__('%s', $this->escapeHtml($this->getSubtotal())) ?>',

Anyone knows why it fails to output the correct value, and how to fix it?


texts: Back end is not working magento Version 2.3.4

texts:
Any solution for below magento back end error

Notice: Undefined offset: 2 in /home/domains/public_html/vendor/magento/framework/Encryption/Encryptor.php on line 591


texts: How to use Magento Controller/Template in ModX?

texts:
I'm looking for a way to combine or to use a template from Magento in modx.
There is a template I had to use in several systems and I don't want to create it every time from the scratch. So I wonder if it is possible to call my Magento template in Modx.
But for now there are no helpful links in Google to get closer to this task.

So far I created a PHP file for Modx in which I require_once my Magento Controlle. But inside my Magento controller I use

extends Mage_Core_Controller_Front_Action

and Modx can't find this controller.


texts: get downloadable product hash in download link?

texts:
We're experimenting with "dynamic" downloadable files that all use the same SKU.
Is there a way to read the link_hash for the downloadable file in the final URL?
User sees this:
http://blah.com/downloadable/download/link/id/MC43sdfNTMwMCAxfjA4NzMxMDgzMTI0/

Backend Link URL is:
http://blah.com/filedownload.php

I'd like to be able to read the link hash in "filedownload.php"


texts: Magento 2 : What is use of observableArray in JS file with knockout JS?

texts:
I have checked observableArray word declared in js file at top position.

I have been seen
this function like this items: ko.observableArray([]). Is this function related to AJAX while response is getting and pushing json data in object ? or is it useful when pageload ? PLEASE someone clear this concept about observableArray

How it can be useful this function?


texts:
This is my first question, so please help! ;)
As you can see in commented lince i tried everything what i could found on the web. My code is placed in /app/code/[Vendor]/[Module]/Cron/GroupProducts.php and look like this:

public function __construct(
         \Psr\Log\LoggerInterface $logger
        ,\Magento\Catalog\Model\ResourceModel\ProductFactory $productFactory
        ,\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory
        ,\Magento\Catalog\Model\ProductLink\LinkFactory $productLinkFactory
        ,\Magento\Catalog\Model\Product $product
        ,\Magento\Catalog\Model\ProductRepository $productRepository
    //  ,CopyConstructorInterface $copyConstructor
    //  ,\Magento\Catalog\Model\Product\Copier $productCopier
    //  ,\Magento\Catalog\Model\Product\Copier $productCopier
)
{
    $this->logger = $logger;
    $this->_productFactory=$productFactory;
    $this->_productCollectionFactory = $productCollectionFactory;
    $this->_productLinkFactory = $productLinkFactory;
    $this->_prod = $product;
    $this->_productRepo = $productRepository;
    $this->om = \Magento\Framework\App\ObjectManager::getInstance();
//  $this->_productCopier = $this->om->create('\Magento\Catalog\Model\Product\Copier');
//  $this->copyConstructor = $copyConstructor;
//  $this->_productCopier = $productCopier;
}
public function groupProductBySku($group_sku){
    $products=$this->listProductsByGroupSku($group_sku)->load();
    $names = array(); $descriptions = array();
    $newProduct = null;
    foreach($products as $prod){
        if ($newProduct==null) {
            //$this->copyConstructor($prod, $newProduct);;
            $newProduct->setData($prod->getData());
        }
        $names[] = $prod->getName();
        //$descriptions[] = $prod->getDescription();
        $descriptions[] = trim($prod->getData('description'));
    }
    $newProduct->setName($this->getCommonStringPart($names)['result']);
    $newProduct->setSku(str_replace('_group','',$group_sku));
    $newProduct->setUrlKey(str_replace(' ','_',$this->getCommonStringPart($names)['result']));
    $newProduct->setTypeId('grouped');
    $newProduct->save();
}

In most tries i get error:

PHP Fatal error:  Cannot instantiate interface Magento\Catalog\Model\Product\CopyConstructorInterface in vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73

Please, can you tell me what am I doing wrong?


texts: Set Configurable Product Price for Magento 2

texts:
we migrated from magento 1 to magento 2.
and now we are having problems on configurable product price because magento 2 no longer allow a price on the parent product. the thing is we have more than 10 stores and the price was set differently on those stores. so now, when we add a new configuration(simple product) on a configurable. we need to generate the simple product first then edit the simple product for all store views.
all i need is to retain a price for the parent product so that when a configuration is created, it will just copy price of the parent product for all store views. like in magento 1. any idea on how we can make this work?


texts: Foreignkey integrity error while configurable product import magento 2

texts:
When I was trying to import some configurable products, magento admin shows the following error

General system exception happened
Additional data: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails
(`magento2`.`catalog_product_website`, CONSTRAINT `CAT_PRD_WS_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE), query was: INSERT INTO `catalog_product_website` (`product_id`,`website_id`) VALUES (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?) ON DUPLICATE KEY UPDATE `product_id` = VALUES(`product_id`), `website_id` = VALUES(`website_id`)

But the configurable product csv successfully passed the first validation check in the admin (Check data button). But when we click the import in next step, the above error is showing.

But the product information is inserted in the "catalog_product_entity" table. When I check the product detail page in admin, the configurable product variations are not listing and that product is not listing in store view.


texts: Magento 2 API for Mobile Application, Do i need to merge multiple APIs for mobile developer?

texts:
I am developing service contact in Magento 2 for Mobile Application purpose.

And i am getting data for specific APIs in POSTMAN like

Customer Account Data
Register | create Account
Add product in Cart
Get CMS pages data
Fetch Categories

And in response i am fetching precise data (POSTMAN using url)

Now my concern is How to merge all this REST APIs for mobile Application.

Like example for Mobile Application Home page.

I need to merge 5-6 APIs to give mobile developer.

Like an example for Home page

I need to give APIs like for Home page

Category [http://magento.host/rest/V1/categories/61]
Banners [http://magento.host/rest//V1/cmsPage/:pageId]
Recently viewed products
Top Brands (Custome module)

  So, how i can manage all this API in to one ?

  Do i need to merge all these APIs ?

  Or mobile developer will manage it by individual ?

Please help me out from this, Thanks in advance.


texts: Magento 2.3 checkout page hang up due to knockoutjs or underscore

texts:
After Magento 2.2.4 upgraded to Magento 2.3.0 checkout page is not working.
 Checkout page hang up browser and showing browser warning to stop it.
 When clicking on stop it is showing some jquery warning in the console  like:

  Error: Script terminated by timeout at:
  evaluateImmediate_CallReadWithDependencyDetection@https://192.168.0.73/pub/static/frontend/MYTHME/CHILD/en_US/knockoutjs/knockout.js:2122:1

Or sometimes it is showing warning from other js like underscore.js
And it is happening particularly in step 2 of the checkout page.


texts: Move disabled products to the end of the catalog product list

texts:
"Hi,

I need to push disabled products to the end of catalog list
Please guide me how to solve this problem.

Example: All enabled products at top but disabled products at bottom.


texts:
We have developed a custom module for appointment. We need to get date of the appointment. We have added the below code in my custom page xml and phtml files

In XML file:

<reference name="head">
    <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params></params></action>
    <action method="addItem"><type>js</type><name>calendar/calendar.js</name><params></params></action>
    <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><params></params></action>
    <block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/>
</reference>

In phtml file:

<input name="dob" id="_dob" value="" type="text">
    <img title="Select date" id="_dob_trig" src="<?php echo $this->getSkinUrl('images/calendar.gif')?>" class="v-middle">

and in footer section of the page:

<script type="text/javascript">
//<![CDATA[
 Calendar.setup({
        inputField : '_dob',
        ifFormat : '%m/%e/%y',
        button : '_dob_trig',
        align : 'Bl',
        singleClick : true
    });
//]]>
</script>

There is no JavaScript error, but calendar window does not open while clicking the calendar icon.

What I'm missing? Please help.


texts: How to Add a new step in checkout step, I want add new tab After shipping methods tab and before payment tabs in magento 1.9

texts:
I'am working  with magento 1.9, Now i want add new tab in checkout steps.
I want add new tab between shipping methods and payment method information.
I want add custom "mytabs" between two tabs with 2 to 3 custom fields.
 I want tabs like

"shipping methods"
  "Mycustom new tab"
  "payment method information"


texts: Magento on LocalHost - Links Not Working?

texts:
Eugh, i'm honestly banging my ahead against the brick wall with this.

I have my Magento site hosted on the localhost so that I can make changes without affecting the live site. Everything works perfectly EXCEPT none of the links seem to be working. If I click anything on the site, nothing even attempts to load.

Backend loads fine, but the frontend links won't work at all.

Any ideas? Pleaaaaase.

UPDATE: My unsecure site Base URL shows: http://127.0.0.1:8888/magento/
My secure site Base URL shows the same: http://127.0.0.1:8888/magento/

I access the frontend of my store by visiting: http://127.0.0.1:8888/magento/  or  http://127.0.0.1:8888/magento/index.php/
And I access the bankend of my store by visitng:http://127.0.0.1:8888/magento/index.php/admin


texts:
If customer zip/post code (123456) has no tax rate define in back-end it is possible to set tax rate of that state ?

Suppose customer selected Newyork and pin = xyz but this zip/post has no any tax rate in system, in this case I want to apply max tax rate of Newyork from back end. Is it is possible ?


texts: "There are no commands defined in the cron namespace" even though I don't have any crons running

texts:
I have the Magento_Cron module disabled, so as far as I know, no cron jobs should be running in my environment.

Every minute or so, the text...

There are no commands defined in the "cron" namespace.

Did you mean this?
   setup:cron

...gets appended to the file var/log/magento.cron.log (without me doing anything).

The posts that I've found about this issue mostly say that it's due to a missing /etc/module.xml file, but those posts seem to reference this error as a response to running some command line command.  Since in my case the error gets logged without me doing anything, I'm at a loss of how to figure out what's causing it.  Additionally, since the error is happening automatically in a log file, I don't know how to turn on any additional logging.


texts:
Is there any way to display header and footer in controller method without using
$this->loadLayout();
$this->renderLayout();

these two lines in a controller method.

I have created one template file for controller method but that template data is not displaying in my controller method.

When I am printing

 Zend_Debug::dump($this->getLayout()->getUpdate()->getHandles());

in controller method then it is printing an empty array.


texts: Magento2 Enable WYSIWYG On Email Templates Admin Panel

texts:
I know Magento has a WYSIWYG library but I am surprised that when you go to Marketing>Email Templates and click into one of the email templates the textarea is not WYSIWYG enabled.
Does anyone know what fileI would edit or an open source plugin that would enable that textarea to be a WYSIWYG


texts: How to Create Token based Router in Magento2?

texts:
I want to create Custom API through controller action.

How i can authenticate using token to make secure API.

Example:

http://www.example.com/webapiv1/getItems

http://www.example.com/webapiv1/getOrders


texts: Uncaught ReferenceError: Mini is not defined at (index):993 - magento 2 store

texts:
How do i trace and fix this error for my magento 2 store?

Uncaught ReferenceError: Mini is not defined at (index):993

i can not find the below code anywhere in my magento admin. it is not in header, footer, script sections, nor google api for analytics is enabled.

<p>
<script type="text/javascript" xml="space">// <![CDATA[
Mini// <![CDATA[
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-12345678-1', 'auto');
  ga('send', 'pageview');
// ]]></script>
</p>


texts:
How can we sort the shippingadressess in the checkout (backend) on firstname? Now they are not sorted at all (or just in order of creation)
Using: Magento 2.3.5-p2


texts: How to remove Add button from Admin Grid conditionally?

texts:
I want to remove "Add new" Button from Admin Grid conditionally. Condition is if it has flag for adding then button will display otherwise not

Kindly help.

Thanks.


texts:
I want to add a prefix like "abc-" in invoice number. (not in order number)

For this, I found,

Magento module: module-sales-sequence

File: /vendor/magento/module-sales-sequence/Model/Sequence.php

Function: getCurrentValue

How to use it in my custom module?

And I want to add prefix in only invoice number.


texts: POST data not seen in stores after 1.7 -> 1.9 upgrade

texts:
I recently upgraded our Magento from v1.7 to v1.9.3.2, and now I'm noticing something strange - none of the POST requests seem to be working on the stores, but they do work on the Magento admin backend.

A good example would be when I try to login to one of the stores, I'll fill the form out and click submit, and I can see via the Networking tab that the POST request does get sent, and I can see in the Apache logs that the request came in, but when the action page loads, it loads as if no POST data was sent/received. For example, when I try to login, I would expect it to either log me in, or show an error (EG: wrong password), but it just re-loads the form, with no alerts/errors. This is the same behavior for the registration form and password reset form.

Here's the Apache access log activity when I attempt to login to a store as a customer:

==> /var/log/httpd/magento_ssl_access.log <==
12.34.56.78 - - [10/May/2017:16:22:44 -0700] "POST /index.php/customer/account/loginPost/referer/aHR0cHM6Ly90ZXN0LmxpYmVydHlkaXN0cmlidXRpb24uY29tL2luZGV4LnBocC9jdXN0b21lci9hY2NvdW50L2luZGV4Lw,,/ HTTP/1.1" 302 20
12.34.56.78 - - [10/May/2017:16:22:45 -0700] "GET /index.php/customer/account/ HTTP/1.1" 302 20
12.34.56.78 - - [10/May/2017:16:22:45 -0700] "GET /index.php/customer/account/login/referer/aHR0cHM6Ly90ZXN0LmxpYmVydHlkaXN0cmlidXRpb24uY29tL2luZGV4LnBocC9jdXN0b21lci9hY2NvdW50L2luZGV4Lw,,/ HTTP/1.1" 200 3449
12.34.56.78 - - [10/May/2017:16:22:46 -0700] "GET /media//partner.jpg HTTP/1.1" 404 2638

  Note: I tailed /var/www/html/magento-app/base/var/log* and /var/log/httpd/*, but the only log file that had any activity was magento_ssl_access.log

Specs

Server version: Apache/2.2.15 (Unix)
PHP 5.6.30 (cli) (built: Jan 19 2017 08:09:42)
Zend Engine v2.6.0
Magento Version: 1.9.3.2

I'm not too sure where to go from here. I would think that if its something to do with Apache or PHP, then I would be able to replicate it on the admin backend, but thats not the case.

Any help would be appreciated. Thanks!


texts: The nature of the business we have is that stock is sometimes not kept on site and can be ordered in for next day, however we operate in a way that means our website displays as out of stock. Is there a extension that can change the "out of stock" to perhaps a button to call the store for a check of stock to then place a order over the phone?


texts: How do you upgrade from Magento 2.0.x to 2.1

texts:
Does anyone here know how to upgrade from Magento 2.0.x to Magento 2.1 without losing the changes I made to Magento 2.0.x?

when i type in php composer.phar update, the command prompt says that the requested package magento/product-community-edition could not be found in any version, there may be a typo in the package name


texts: Very simple question, can you fork Magento CE 1.9.x?


texts: Getting error when trying to import products from cli Magmi Importer

texts:
When i'm using Magmi Importer UI its working fine but when I'm trying to import the same from cli. I'm using magmi's 0.7 version in magento 1.7.0. I'm getting this error

     Call to a member function getRecordsCount() on a non-object in  /var/www/vhosts/Outletzon.secureserver.net/httpdocs/testdocs/magmi/engines/magmi_productimport engine.php on line 1404

I'm using this command to in cli

 php magmi.cli.php -profile=Default -mode=create -CSV:filename="/var/import/kids-baby.csv"


texts: Magento 2: get product through api using product name

texts: I want to get product information using product name in Magento 2


texts: How to place the order with ccsave details programatically in magento

texts: In magento I want to place order with credit card details using custom script.


texts:
My question is about how and when images get created inside the product image cache.  Specifically, if this code is executed:

$imageTag ='
init($product ,
                'small_image')->resize(75).'" border="0" />';

And the following directory exists with 777 permissions:

/media/catalog/product/cache/1/small_image/

But there is no 75x/ subdirectory, will that directory get created and the resized image stored at the correct place?  Or does that directory need to be available (through some other process) before attempting to get the URL for the resized image using the Magento helper?


texts: What is the event observer for system config page load in Magento 2

texts: We know that we can use custom_admin_system_config_changed_section_general for system config page save event. But is there any observer to the config page load event? Thanks.


texts: What Magento Version (2.x) support Multiple Inventory System

texts: I have more than one store, i need to update more than one store inventory for same product. May i know what Magento Version (2.x series) support multiple inventory System.


texts:
Is there any way to revert/rollback to 1.9.2.4?

I upgraded my dev site to 1.9.3 but it broke my image uploader and I did not notice until some days after. By then I had already done a lot of stuff because this was supposed to be a new site. It would take many days/weeks to start over from scratch. So I hope there is a way? Could I revert the files or would there still be some irreversible stuff in the database?


texts: How to override core catalog block product list?

texts:
I am trying to override core/catalog/block/product/List.php with following

Ref:http://www.magentocommerce.com/boards/viewthread/14692/

file: Ziva/Customcatalog/etc/config.xml

<config>
    <modules>
        <Ziva_CustomCatalog>
            <version>1.0.0</version>
        </Ziva_CustomCatalog>
    </modules>
    <global>
        <blocks>
            <catalog>
                <class>Ziva_CustomCatalog_Block</class> <!--this is a new block page for that custom module-->
                <rewrite>
                    <product_list>Ziva_Customcatalog_Block_Product_List</product_list>
                </rewrite>
            </catalog>
        </blocks>
    </global>
</config>

file: Ziva/Customcatalog/Block/Product/List.php

class Ziva_Customcatalog_Block_Product_List extends Mage_Catalog_Block_Product_List {

    public function __construct() {
        parent::__construct();
    }

    protected function _getProductCollection() { // trying to override this method
        echo __CLASS__;
        return parent::_getProductCollection();
    }

    public function holdthis() {
        echo __METHOD__;
    }

}

In exception log I am getting

exception 'Mage_Core_Exception' with message 'Invalid block type: Ziva_CustomCatalog_Block_Product_Compare_Sidebar' in C:\wamp\www\magento2\app\Mage.php:594

followed by

Invalid block type: Ziva_CustomCatalog_Block_Product_Price_Template
Invalid block type: Ziva_CustomCatalog_Block_Layer_View
Invalid block type: Ziva_CustomCatalog_Block_Category_View
Invalid block type: Ziva_CustomCatalog_Block_Product_List_Toolbar

And no products are displayed

EDIT:

I figured the problem

<class>Ziva_Customcatalog_Block</class>

Now I am rephrasing the question.

In a custom module you can only have one block class? But in core/catalog/block, we can see many.


texts: Magento 2: Edit special price for all variants of configurable product at once

texts:
Is it possible to change the special price of all variants of configurable products at once?
Backend is very slow in Magento 2, so loading f.e. 10 simple products variants (which are associated with a configurable product) and apply the same special price / discount on all products is very frustrating.

Is there an extension / feature which updates the special price of the simple products in an easy / fast way?


texts: When using multistore, is it possible to have different checkout configurations and other configuration options?

texts: WE are looking into doing a second domain with our Magento store and this would have a drastically different checkout behavior so I wanted to see if its possible to have a completely separate configuration on the backend for the second domain.


texts:
I have a list of taxes in Magento 1.9 and I need to display all this available taxes in the admin Order Grid. I found all this taxes in database in the sales_order_tax. Is there any way to display all this taxes?

My database table is look like this:

So the idea is: each tax must have their own column in the order grid

columns:

HST-ON;
HST-NS;
GST;
PST-BC;

I try something like this but is not work:

$collection->getSelect()->joinLeft(
    array('sf' => $resource->getTableName('sales_order_tax')),
    'sf.entity_id=main_table.order_id',
    array(
        'sf.code'

    )
);