texts: M2 - Cannot change deploy mode to Production

texts:
I am trying to set the deploy mode on an M2 instance to Production from Developer.
On my local environment however I keep getting the error message:

Command returned non-zero exit code:
'/Applications/MAMP/bin/php/php7.0.10/bin/php -f /Applications/MAMP/htdocs/JWM2/bin/magento setup:di:compile'

When it errors and escapes back to the prompt, I type echo $? and simply get 1 returned back.

On the recommendation of another post, I have tried increasing the php memory_limit which didn't help. I have also tried running the setup:di:compile command separately, but this completed successfully, however there were some errors relating to the dependancies already existing in context objects for a couple of modules.

When I try to change the deploy mode on the production server, the issue lies with the setup:static-content:deploy part of the process with the issue being with the Magento Backend theme.

If I add the flag --skip-compilation to the deploy:mode:set production then it slides in to the correct mode without problem.

Has anyone got any ideas how I can make this work with compilation?


texts: How to apply following Free Shipping cart price rule?

texts:
Magento2 need to apply following cart price rule($50 & above for specific config products) free shipping
I have $300 rugs & $30 Hand towel & $30 Face washer(Antalya Carnevale Grey) then free delivery be applied as $30 Hand towel & $30 Face washer are above $50
I have $300 rugs & $30 Face washer(Antalya Carnevale Grey) then free delivery be not applied as $30 Face washer is not above $50
How can I create such a rule?


texts: How to set first name & last name for guest customer order in Magento 2

texts:
In the guest order info customer name displaying as a guest and looked into the database table of sales_order here customer first name & last name storing as a null.

how can we set name before place order?


texts: style is not working at all front & backend

texts:
I have moved Magento 2.1.7 website to another host and domain.

I have correctly configured everything and it's working normally and now i'm on maintenance mode.

Style is not working on front and backend and the browser is giving alot of errors while loading resources and it's while viewing the website normally or on maintenance mode.

I have also tried to changing /symlink into .../copy from di.xml file but nothing happened.

anyone please help ????


texts:
I would like to make a bundled product promotion in my shop. (1.7.0.2) To explain it as an example:

Product A: 40$
Product B: 25$
Bundle (1x A + 2x B): Total Price is 70$ instead of 90$

I only want to give this offer with fixed quantities, so user shouldn't make any changes to item quantities. I've found the solution for this fixed quantity issue here:

https://stackoverflow.com/questions/7890908/grouped-product-with-fixed-sub-item-quantities

It lets me to use bundle product with no "user defined quantity" for each item.

I want to invoice each bundle item seperately. Like they are ordered seperately. When I create invoice as bundle product, it groups all sub products under main bundle product. Is this possible?


texts:
I'm adding a new action in orders grid (it works), but the action route gives 404 error (route error).

I have a custom config.xml like this (app/code/local/AAAA/MassActions/etc/config.xml).

<config>
    <modules>
        <AAAA_MassActions>
            <version>0.0.1</version>
        </AAAA_MassActions>
    </modules>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <AAAA_MassActions before="Mage_Adminhtml">AAAA_MassActions_Adminhtml</AAAA_MassActions>
                    </modules>
                </args>
                <frontName>massactions</frontName>
            </adminhtml>
        </routers>
    </admin>

Controller looks like (app/code/local/AAAA/MassActions/controllers/Adminhtml/MassActionsController.php)

<?php

class AAAA_MassActions_Adminhtml_MassActionsController extends Mage_Adminhtml_Controller_Action
{
  public function massPaymentChange()
    {
        $method = (int)$this->getRequest()->getParam('method');

And my observer (working because is adding the mass) but the route problem probably is in this part of code (app/code/local/AAAA/MassActions/Model/Observer.php):

$block->addItem('massactions', array(
                'label' => 'Payment Method change',
                'url' => Mage::helper("adminhtml")->getUrl('adminhtml/massactions/massPaymentChange'),
                'confirm' => __('Confirm?'),
                'additional' => array(
                    'visibility' => array(
                         'name' => 'method',
                         'type' => 'select',
                         'class' => 'required-entry',
                         'label' => __('Payment Method'),
                         'values' => $methods
                    )
                )
            ));

IN my adminhtml looks like:

<?xml version="1.0"?>
<config>
    <acl>
        <resources>
            <all>
                <title>Payment Method Change</title>
            </all>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <massactions translate="title">
                                        <title>Payment Method Change</title>
                                    </massactions>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</config>

404 error url is in: example.com/index.php/admin/massactions/massPaymentChange/


texts:
I am trying to implement some custom form validation in Magento using jQuery but I am not sure if I have the correct method.

Basically, I need to validate the following:

Only number fields need to have .00 to validate 1 to 1.00
Letters need to be uppercase
Cannot have number greater than 9.99
No spaces in the fiels

I am thinking to use jQuery and have set about writing something up to validate the form:

<script>
    jQuery(document).ready(function() {
        jQuery.validator.addMethod("integer", function(value, element) {
            return this.optional(element) || /^-?\d+$/.test(value);
        }, "A positive or negative non-decimal number please");

        function(field, length) {
            if (!numericRegex.test(length)) {
                return false;
            }
            return (field.value.length <= parseInt(length, 4));
        },
    }
</script>

The problem is I cannot find the functions for the other validation fields and could do with some assistance please???


texts:
Refresh page after download PDF in custom module magento 2.
When the download is complete, the page is not f5. Please help me.

My function

public function createPDF(\Magento\Framework\Event\Observer $observer, $product, $printedAttribute) {
    $nameProduct = $product->getName();
    $attribute = $product->getData($printedAttribute);
    $qty = $observer->getQty();
    $orderNumber = $observer->getOrdernumber();
    $deliOrderNumber = $observer->getDeliordernumber();
    $pdf = new \Zend_Pdf();
    $page = $pdf->newPage(\Zend_Pdf_Page::SIZE_A4);
    $pdf->pages[] = $page;
    $style = new \Zend_Pdf_Style();
    $style->setLineColor(new \Zend_Pdf_Color_Rgb(0, 0, 0));
    $font = \Zend_Pdf_Font::fontWithName(\Zend_Pdf_Font::FONT_TIMES);
    $style->setFont($font, 15);
    $page->setStyle($style);
    $x = 30;
    $this->y = 850 - 100; //print table row from page top – 100px
    //Draw table header row’s
    $style->setFont($font, 16);
    $page->setStyle($style);
    $page->drawRectangle(30, $this->y + 10, $page->getWidth() - 30, $this->y + 70, \Zend_Pdf_Page::SHAPE_DRAW_STROKE);
    $style->setFont($font, 15);
    $page->setStyle($style);
    $page->drawText(__("Cutomer Details"), $x + 5, $this->y + 50, 'UTF-8');
    $style->setFont($font, 11);
    $page->setStyle($style);
    $page->drawText(__("Name : %1", "John Smith"), $x + 5, $this->y + 33, 'UTF-8');
    $page->drawText(__("Email : %1", "test@example.com"), $x + 5, $this->y + 16, 'UTF-8');

    $style->setFont($font, 12);
    $page->setStyle($style);
    $page->drawText(__("PRODUCT_NAME"), $x + 30, $this->y - 10, 'UTF-8');
    $page->drawText(__("COUNT"), $x + 150, $this->y - 10, 'UTF-8');
    $page->drawText(__("ORDER_NUMBER"), $x + 250, $this->y - 10, 'UTF-8');
    $page->drawText(__("DELIVERY_NOTE_ID"), $x + 380, $this->y - 10, 'UTF-8');
    $page->drawText(__($printedAttribute), $x + 30, $this->y - 80, 'UTF-8');

    $style->setFont($font, 10);
    $page->setStyle($style);
    $page->drawText($nameProduct, $x + 30, $this->y - 30, 'UTF-8');
    $page->drawText($qty, $x + 150, $this->y - 30, 'UTF-8');
    $page->drawText($orderNumber, $x + 250, $this->y - 30, 'UTF-8');
    $page->drawText($deliOrderNumber, $x + 380, $this->y - 30, 'UTF-8');
    $page->drawText($attribute, $x + 70, $this->y - 80, 'UTF-8');
    $page->drawRectangle(30, $this->y - 62, $page->getWidth() - 30, $this->y + 10, \Zend_Pdf_Page::SHAPE_DRAW_STROKE);
    $page->drawRectangle(30, $this->y - 62, $page->getWidth() - 30, $this->y - 100, \Zend_Pdf_Page::SHAPE_DRAW_STROKE);
    $style->setFont($font, 15);
    $page->setStyle($style);
    $page->drawText(__("Text"), ($page->getWidth() / 2) - 50, $this->y - 200);

    $fileName = 'name.pdf';

    $this->fileFactory->create(
            $fileName, $pdf->render(), \Magento\Framework\App\Filesystem\DirectoryList::VAR_DIR, // this pdf will be saved in var directory with the name example.pdf
            'application/pdf'
    );
    return $this->_redirect('*/*/index');
}


texts: How does getInvoiceCollection() work with orderCollectionFactory in Magento 2?

texts:
The following code works but how can we identify what methods can be called on the order collection result, such as getInvoiceCollection?

$collection = $this->orderCollectionFactory->create()
        ->addFieldToFilter('status', $processingStatus)
        ->setOrder('entity_id', 'ASC');
    $orders = $collection->getItems();

    foreach($orders as $order){

        foreach($order->getInvoiceCollection() as $_invoice){
            $invoices[] = $_invoice;
        }

    }


texts: Custom Tab not showing on product page. Magento 2

texts:
I am making a custom tab for the product page on Magento 2.

I followed this tutorial

  https://www.cloudways.com/blog/add-custom-tab-product-page-magento-2/.

At the end, the custom tab is showing up in more information section rather than a separate tab.


texts:
When I apply the above patch it is getting stuck at app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml at line 120. I have looked at the patch file and the code is

diff --git
app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
index 4ee6d76..47c3a79 100644
--- app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
+++ app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
@@ -120,6 +120,7 @@
                 <?php echo $this->__('Update Total') ?>
             </button>

+            <?php echo $this->getBlockHtml('formkey') ?>
     </form>
     <?php endif; ?>


texts:
From a default Magento install you are provided with a default category (a root category) and this usually has category ID 2.
How can I access the root category page using this as a URL: http://example.com/catalog/category/view/id/2. This always 404.

The reason for this is because I want to make this the homepage (without having to go do any CMS layout updates) using system config web/default/front as catalog/category/view/id/2.


texts:
we can see some tables have the suffix of _idx and _tmp in magento database,

but these tables doesn't have any data (whenever I see the tables using MySQL client),

what is the usage of these tables in magento ?


texts: When exporting products, what string should I type in the filter option to skip any product with a missing SKU?

texts:
I'm attempting to export one Magento store to another. Though my store has thousands of products – about 10% have missing SKU's. I'm not sure how they were created without SKU's – I'm guessing they were half created when the admin timed out.

The point is, I'm assuming I can use the export filter option to narrow my export and skip any products that are missing this 'requirement' for import.

I'm fairly new to Magento and have no idea what to type in the filter to accomplish this.

This is my first time using Stackexchange so any help would be greatly appreciated!


texts: Running php bin/magento setup:static-content:deploy for different languages

texts:
Whenever I run php bin/magento setup:static-content:deploy it always generates files for en_US.

I would like it to generate files for en_GB instead.

How do I achieve this?

And is there a reference manual for these command line instructions? I tried looking on the official Magento 2 website, but couldnt find anything.


texts: Move customer to other group when buying a product

texts:
Can you move a customer to a group after checkout if (s)he buys a specific product? (We will sell membership cards trough our magento store. When they buy a card, they should become part of the member group That i've created).

edit: i'm using Magento 2.1.7


texts: How can I select a store for pickup at checkout

texts: We're looking to insert a drop-down list at checkout so buyers need to select their preferred shop location so they can pick up the goods. We don't need an inventory management. Can anyone recommend an extension for this or is it a custom job?


texts: Magento 2 how to assign a custom order status when canceling an order with a specific payment method

texts:
I have created a custom status called "custom_canceled" and associated it with the "canceled" state.
I also have another status called "Canceled" associated with the state "canceled", this is the one used by default when an order is canceled.
I need that when canceling an order that has been made using the payment method "banktransfer" the order status will be "custom_canceled" and not "canceled" (default status) but I have no idea how I can do this.
I am working on Magento 2.3.5-p1. I appreciate any information to guide me.


texts: Magento 2 : Call custom block html in breadcumbs

texts:
Is there any way to call custom module block in breadcrumbs. I want to call certain html in product detail page's breadcrumbs. I am adding following code to catalog_product_view.xml.

  companyname/module/view/template/catalog_product_view.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body>
...
<referenceBlock name="breadcrumbs">
        <block class="Companyname\Module\Block\Product\View\test" name="product.view.test" template="Companyname_Module::product/view/test.phtml" >
    </referenceBlock>

...
 </body>
</page>

But this is not adding in breadcrumb.

Note: I am using custom theme.


texts:
Under Index Management, all categories were reindexed at the same time this morning. It was either someone did it, or the cron job did it.

But I confirmed that no one did it. I wonder if Magento cron job now reindex data. I know it didn't before, and I don't want any reindex in the cron job.

Here is my cron set up

*/5 *   *   *   *   /usr/local/bin/php /home/xxxx/public_html/cron.php -mdefault
*/5 *   *   *   *   /usr/local/bin/php /home/xxxx/public_html/cron.php -malways


texts:
I am trying to make a simple API call to get some information on an Order. The reason I am trying with SOAP is because a similar API request is returning empty values for some sales attributes so I am trying to see if I get a different result using SOAP but I keep getting

Fatal error: Call to a member function salesOrderInfo() on a non-object in

I've followed the information on the Magento WIKI

Here

But I keep getting this error, I've placed this file in the root of my Magento installation:

orderinfo.php

<?php

    $proxy = new SoapClient('http://www.mydomain.com/index.php/api/v2_soap?wsdl=1');

    $session = $proxy->login('user', 'password'); // connect to the API

    $result = $client->salesOrderInfo($session, '100000064');
    var_dump($result);


texts: ZainCash payment method - mobile payment API

texts:
I have magento 1.9
and want to add custom payment method with mobile payment through simple API that the mobile company provide.

Here is the documentation:
https://zaincash.iq/portal/en/web/mfs/integration-with-api

Can anyone help me with the code?


texts: Magento 1: Why Does the Price Indexer Use the Manage Stock Configuration Flag

texts:
In Magento 1's price indexer, the following method

#File: app/code/core/Mage/Catalog/Model/Product/Indexer/Price.php
public function matchEvent(Mage_Index_Model_Event $event)
{
    $data       = $event->getNewData();
    if (isset($data[self::EVENT_MATCH_RESULT_KEY])) {
        return $data[self::EVENT_MATCH_RESULT_KEY];
    }

    if ($event->getEntity() == Mage_Core_Model_Config_Data::ENTITY) {
        $data = $event->getDataObject();
        if ($data && in_array($data->getPath(), $this->_relatedConfigSettings)) {
            $result = $data->isValueChanged();
        } else {
            $result = false;
        }
    } elseif ($event->getEntity() == Mage_Customer_Model_Group::ENTITY) {
        $result = $event->getDataObject() && $event->getDataObject()->isObjectNew();
    } else {
        $result = parent::matchEvent($event);
    }

    $event->addNewData(self::EVENT_MATCH_RESULT_KEY, $result);

    return $result;
}

makes use of the _relatedConfigSettings property.  This property contains the XML path to the cataloginventory/item_options/manage_stock System Configuration path via the Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MANAGE_STOCK constant.

#File: app/code/core/Mage/Catalog/Model/Product/Indexer/Price.php
protected $_relatedConfigSettings = array(
    Mage_Catalog_Helper_Data::XML_PATH_PRICE_SCOPE,
    Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MANAGE_STOCK
);

Does anyone here understand the reindexing process well enough to understand 1. What this matchEvent is used for and 2. Why does it need to reference the global manage stock configuration flag.

I can come up with several theories myself -- but I'm looking for concrete answers to save myself a few days of digging through the code.


texts: Add custom attribute below title in Magento 2.1

texts:
I have checked all of other answers that have been accepted but can't seem to get this working correctly. I have created the custom attribute and set it up to display on the frontend. It is showing up fine on the spec table tab but I am also trying to add it to right below the title.

I found the title.phtml file and tested first with a test h2 tag and after clearing cache and deleting var folder content confirmed it displays on the front end, but when I try the code the title and my h2 addition dis-appears.

I've tried reading the dev docs and am stuck at this point. I'm not a certified developer or anything clearly, so please be kind in your criticisms of my attempt. Thanks for any help in advance I truly appreciate it and will stop banging my head against my monitor if you can solve this :)

The code below is pulled from the file in vendor\your_theme\module-theme\view\frontend\templates\html\title.phtml and my addition to the code is within the h2 tag

<div class="page-title-wrapper<?php /* @escapeNotVerified */ echo $cssClass; ?>">
<h1 class="page-title"
    <?php if ($block->getId()): ?> id="<?php /* @escapeNotVerified */ echo $block->getId();?>" <?php endif; ?>
    <?php if ($block->getAddBaseAttributeAria()): ?>
        aria-labelledby="<?php /* @escapeNotVerified */ echo $block->getAddBaseAttributeAria(); ?>"
    <?php endif; ?>>
    <?php /* @escapeNotVerified */ echo $title ?>

<?php /* @escapeNotVerified */ echo $_product->getResource()->getAttribute('manufacturer')->getFrontend()->getValue($_product); ?>

<?php echo $block->getChildHtml(); ?>


texts:
Another error recieving:
[2021-01-14 20:31:40] main.CRITICAL: Warning: Magento\Framework\View\Element\Html\Calendar::_toHtml(): Cannot load resource element 'fields' in [true path removed]/public_html/vendor/magento/framework/View/Element/Html/Calendar.php on line 111 [] []
Get this error on some pages, plus if try to go into store view > English in category


texts: Any way to shuffle the output of $this->getLoadedProductCollection()

texts:
Is there any way to shuffle this foreach?

I tried shuffle($_productCollection) and array_rand($_productCollection) but nothing worked :(

<?php  $_helper = $this->helper('catalog/output');
if ($_productCollection=$this->getLoadedProductCollection()): ?>
<?php $tpl=Mage::helper('config'); ?>
        <div class="slides row1">
        <?php foreach ($_productCollection as $_product): ?>


texts: How to add a register form inside the login popup during the checkout

texts:
I want to add a register form directly inside the login modal during the checkout (instead of the register link that lead to a register customer form page), so that the customer can quickly register without leaving the checkout process.
I'm aware of third party modules, i already checked this kind of solution but this modules enables a lot of features i don't want.

I have some theorical steps in mind, but i'm definitely not sure if it's the right way to do it, or even if it would work:

override the authentication popup ui module: add a register form inside the knockout view (html template) and send via ajax the data submitted (inside the knockout viewModel or directly inside the template?) to a new page
set up the route for the new page
create a controller for the route
inside the execute method of the controller, get the data submitted (getRequest()->getParam('data')) and create the account with the date using the customerFactory->create method.

If anyone could give me advices about it, that would be great :)

Thanks!


texts:
I have an import script for saving new products.

To save the image I use:

<?php
Mage::init();
$app = Mage::app('default');

[...lots of code...]

$tmpFile = 'tmp/' . $this->productInfo['SKU'] . '.jpg';
$this->product->addImageToMediaGallery( $tmpFile, array('image', 'thumbnail', 'small_image'), false );
$this->product->save();
?>

The product is added to Magento.

When I go to the images, I will see 2 images the first one works and the second one doesn't work and has the same image name but with _2.jpg. Also the second broken image is set as image, thumbnail and small image.

Why does it add two images?


texts: I need to add static block which I created from back end to specific pages like user dashboard, login page. Is this possible?


texts: alternative indexing solution , is there any suggestions?

texts:
the original magento indexing happened to be so slow  , in my case I had millions of SKUs need to be indexed , converted to flat table & url rewritten .

I am not talking about search indexing .

original magento indexing takes to many days & then it stop

after digging in the code I saw its very complicated task and usually it delete all the catalog_product_flat table causing the site to go offline

any suggestion to have custom indexer , faster indexer ???

Magento Version : CE

thanks for suggestion

to be clear :

I am importing my product using custom api , but these product need to be indexed ( in magento way ) to be added to url rewrite table , converted to flat .. etc  , these are magento specific tasks and they are so slow


texts: How can i change session save path? I need to save session data to my project folder, how can i change session save path?.thanks in advance for your valuable answers..


texts: I would like to calculate shipping rates relative to the weight or litres of a product

texts:
I ve created several products which have a dropdown field included in which the customer can choose between 3 options - they vary by litres f.E 250ml, 500ml ,1l

My first problem is calculating the weight from the option that the user has made.

My second problem is calculating shipping costs by productweight.

Currently all my products have the thestweight of "1"
and my csv looks like that :

although when i try to upload it i get the following error : File has not been imported. See the following list of errors: Invalid Table Rates format in the Row #2

Thank you for your help !


texts: In which table payment method information of order save

texts:
I am checking with admin panel order and suddenly when i view particular order. I get error

  Uncaught exception 'Mage_Core_Exception' with message 'The requested Payment Method is not available.' .

It is inserted in database corrected or not i want to check this. How i can remove this error method. I want to know location of database table in which all information holds regarding magento order. And also when i print order by collection and used following line of code then same error is coming for that order.

$orders->getPayment()->getMethodInstance()->getTitle();


texts:
Please note I have tried the reference post that is a possible duplicate. The error only happens in System config when I try to save a new Product Placeholder

I am getting the following error when trying to save a product place holder. I am able to save product images without an issue.

2015/10/01 12:48:58 [crit] 10749#0: *2 open() "/var/lib/nginx/tmp/client_body/0000000001" failed (13: Permission denied), client: 76.xxx.xxx.221, server: www.damin.us, request: "POST /index.php/someadmin/system_config/save/section/catalog/key/fb1b1054099c511522a4e2eb696cd55a/ HTTP/1.1", host: "www.domain.us", referrer: "http://www.domain.us/index.php/someadmin/system_config/edit/section/catalog/key/03a8b3dd274e9c375fa768d3f920fba0/"
2015/10/01 12:50:39 [error] 10749#0: *29 access forbidden by rule, client: 54.xxx.xxx.235, server: www.domain.us, request: "POST /app/etc/local.xml HTTP/1.1", host: "www.domain.us"

I have tried this without success
Getting “access forbidden by rule” error at magento in nginx server /app/etc/local.xml

UPDATES:

I have set my permissions on the entire site to 644 and 755 with my var, media and app/etc to set to o+w. Problem still is happening.


texts: Best way to bulk update stock and price for thousands of products?

texts: I am migrating a custom e-commerce site over to Magento.  We have well over a hundred thousand products.  Many are drop shipped from a number of suppliers.  Several suppliers can provide the same product.  Naturally they will all have different stock and provide different pricing.  We have a custom script that parses all the feeds from all the suppliers and create a single feed that contains the new stock and pricing for all the products.  With this volume we couldn't use Magento to import the changes.  Thus we are using Magmi.  Unfortunately Magmi, from what I can tell, will not zero out the stock if an item isn't in the feed.  I could just import the products into another table and do a SQL call to set stock = 0 where the products are not in the new table then run magmi against with the feed file.


texts: after install magento 2.4.2 fronend and backend not working properly

texts:
I have installed Magento 2.4.2 in ubuntu, but after the installation process when I run the front and backend URL, it's not working properly,
I have installed Magento 2.4.2 using the command line.
PHP 7.4 version,

please help me with this issue,
I have tried everything possible ways but it's not resolved yet.
thanks.


texts: Quick Simple Product Creation: Add new Custom Attribute of MultiSelect each time When I Want to Add New Simple Product

texts:
I’ve got a moderately specific question. I’d like to add a new field to the Quick simple product creation section, in associated products, when creating configurable products.

Here’s why (so if there is a better way to do this, please let me know): I have an attribute that needs to be set for every one of my products. Setting it as a configurable product would be convenient, but I do not want this attribute visible at all to customers, or required by customers. It’s a secondary condition category. So, if an item is ConditionA: new, it will also be ConditionB: new. I only want the customer to see the ConditionA settings, because ConditionB is essentially ConditionA, but with numbers instead of a text description, for exporting my products to ebay.

So if a customer wants a used product for example, they can pick used as a configurable option on my store. “condition” would be “used”. But The associated simple product, the “used” product if you will, also has an “ebay_condition” of “3000”, the ebay code for used.

I had this set up fine as a configurable product attribute, realized my customers would have to not only see the ebay settings on my store, but would have to pick an option] when purchasing, and removed it. I now have the attribute set as a dropdown, but non-configurable product attribute.

I want to be able to just “quick simple product creation” generate the associated simple products, with this attribute as well. Other attributes already included in the quick simple generation include… Name, SKU (both set to autogenerate), Weight, Status, Visibility, Condition, Package Status, Quantity, and Stock Availability.

Now, is there a specific setting I have to apply to the ebay_condition attribute to make it appear under Quick simple product creation, just like Visiblity, Weight, SKU, etc., or alternatively can I manually code it in?


texts:
directory structure.

app / design / frontend / Kidzie / theme / Magento_Theme / layout /default_head_blocks.xml
 app / design / frontend / [vendor] / [theme] / web / css /custom.css

I need to load custom.css file at last of all css files. so my custom style should apply over default magento 2's css.

<css src="css/custom.css" order="100"/>  Gives me error that order is not a valid property.


texts: How do i get random Cross Sell Products?

texts:
This is the piece of code that generates the cross products:

<?php $_helper = $this->helper('catalog/output'); ?>
<?php
    $_product = $this->getProduct();
   // echo get_class($this);
?>

<?php if($_crossSellProducts = $_product->getCrossSellProducts()): ?>

<?php echo $this->__('Suntem mandri sa va prezentam clientii TRENDfurniture:') ?>

        <?php foreach ($_crossSellProducts as $_item): ?>

            <?php
            $_item = Mage::getModel('catalog/product')->load($_item->getId());
            ?>

                <a class="product-image" href="<?php echo $_item->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_item->getName()) ?>">
                    <img src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail'); ?>" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" />

        <?php endforeach; ?>

<?php endif;?>

I tried to use:

 $_item ->getSelect()->order(new Zend_Db_Expr('RAND()'));
 $_item ->setPage(1, 4);

but with no result.This is the result of the get_class function : Mage_Catalog_Block_Product_View


texts: How to add year in sales order and invoice number

texts:
I like to get current year in my order and invoice number.

Now i'm getting order id example: "XX-000001" i need to get like "XX-190001" this (19) is current year that need to be change in dynamic.

Please let me know how to change?


texts:
I want to rewrite Mage/Payment/Block/Form/Container.php with another file inside my module.

In my module's config file, I have:

<global>
  <blocks>
     <payment_form>
         <rewrite>
            <container>Mynamespace_Module_Block_Form_Container</container>
         </rewrite>
     </payment_form>
  </blocks>
</global>

I've also tried this:

<global>
 <blocks>
   <payment>
     <rewrite>
        <form_container>Mynamespace_Module_Block_Form_Container</form_container>
   </rewrite>
  </payment>
 </blocks>
</global>

I have then, in my Module, Mynamespace/Module/Block/Form/Container.php

<?php

class Mynamespace_Module_Block_Form_Container extends Mage_Core_Block_Template
{
  protected function _prepareLayout()
  {
    echo "hello world";
  }
}

none of the above solutions are working. it's still picking up the old block inside Mage/Payment/Block/Form/Container.php

Could it be because my module lives in local code pool??


texts: CLI: What is the difference between "setup:static-content:deploy" and "dev:source-theme:deploy"?

texts:
I wanto to know the difference between:

php bin/magento setup:static-content:deploy

and

php bin/magento dev:source-theme:deploy

I know that second receives as options name of specific vendor, theme and language. And first one builds everything for all possible combinations of these options values. Am I right?

Are there any other differences in images, JS, CSS etc ?

Thanks in advance.


texts: Is it possible to determine which widget loads first on page?

texts:
When loading the homepage of my Magento 2 store it happens that the 2nd element is loading faster than the 1st element.

The 1st element is a slider widget and the 2nd a image html widget.

Is there a possibility to wait with loading the second (and following) element(s) before the first one is loaded?


texts: Invalid template file when installing theme

texts:
I have installed a theme into my Magento store and now I want to try to switch to that theme. After installing and setting the them in the configuration through the admin panel, I get the following error when I try to visit the store:

1 exception(s):
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: '/bitnami/magento/htdocs/app/design/frontend/Bege/bege1/Magento_Theme/templates/page/js/require_js.phtml' in module: '' block's name: 'require.js'

Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: '/bitnami/magento/htdocs/app/design/frontend/Bege/bege1/Magento_Theme/templates/page/js/require_js.phtml' in module: '' block's name: 'require.js'
#0 /opt/bitnami/magento/htdocs/vendor/magento/framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/bitnami/magent...')
#1 /opt/bitnami/magento/htdocs/vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml()
#2 /opt/bitnami/magento/htdocs/vendor/magento/framework/View/Result/Page.php(248): Magento\Framework\View\Element\AbstractBlock->toHtml()
#3 /opt/bitnami/magento/htdocs/vendor/magento/framework/View/Result/Layout.php(170): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#4 /opt/bitnami/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#5 /opt/bitnami/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#6 /opt/bitnami/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#7 /opt/bitnami/magento/htdocs/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(26): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#8 /opt/bitnami/magento/htdocs/vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#9 /opt/bitnami/magento/htdocs/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#10 /opt/bitnami/magento/htdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#11 {main}

I already checked permission, path and they both seems to be correct.
The content of require_js.phtm is as follow:

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
?>
<script>
    var require = {
        "baseUrl": "<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('/'); ?>"
    };
</script>

It seems valid php to me.

Am I missing something?


texts: After every setup:upgrade I need to give permission (Debien)

texts:
I'm using Magento2 on Debien 8, and after every change, I lunch the php bin/magento setup:upgrade.

The problem here is when I lunch this command I need to give permission to magento folder using this command on Debien terminal

chmod -R 0777 magento2 (the folder)

is there any solution to fix that ?


texts: Delete Surname in Orders and Returns page

texts:
i have a question about the page Orders and Return:
is possible don't have the input Surname in the form? I tried to remove the input surname in /app/code/core/Mage/Sales/Helper/Guest.php but the form response that i had a error in the form.
Can you help me?
Thanks :)


texts: Not able to install Magento because of these errors: php-pdo-mysql-version-minimum & php-intl-version-minimum

texts:
I am getting these error messages when attempting to install Magento using the auto install (installatron) with cPanel.

I've setup EasyApache 3 to already upgrade my PHP and MySQL versions but these two messages are still prohibiting me to proceed with the install. Any help would be greatly appropriated in finishing the setup of my Godaddy WHM

php-pdo-mysql-version-minimum v1 (detected: OFF)
php-intl-version-minimum v1 (detected: OFF)


texts: Can I make separate controller for AJAX actions? (Magento 1.x)

texts:
I have my custom module and everything works fine, but I would like to create separately controller for AJAX actions (AjaxController). Currently I Have only IndexController. Everytime I get:

{"error":true,"message":"Invalid Form Key. Please refresh the page."}

Code snippets are below:

Build URL:

<script type="text/javascript">
    RECALC_SP_URL = "<?=$this->htmlEscape(Mage::helper('adminhtml')->getUrl('*/productcreator_ajax/getSpecialPrice/'));?>";
</script>

**Part of config.xml*:*

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <productcreator after="Mage_Adminhtml">Aiti_ProductCreator_Adminhtml</productcreator>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

AJAX call:

jQuery( "#margin_percent" ).change(function() {
    var $_this = jQuery( this );
    var store_id = 0;
    new Ajax.Request(RECALC_SP_URL, {
        method: 'post',
        parameters: {
            storeId: store_id,
            margin: $_this.val(),
            productId: jQuery('#productcreator_product_id').val(),
        },
        onSuccess: function (transport) {
            var response = JSON.parse(transport.responseText);

            jQuery("#special_price").val(response['special_price']);
        },
        onFailure: function () {

        }
    });
});

Thank you for some help!


texts: how to make custom layered filter rules active by default?

texts:
Is it possible to do it programmatically and how ?

For example I need a basic price filter rule active on catalog from 0 to 500 USD (in real world i need customize custom layered filter model), so when i log in as customer and browse category, it only shows products which prices in this range.


texts: Get value of selected multiselect attribute

texts:
Take the following "car" product: Volkswagen Golf.

It has a multiselect attribute car_options with the following possible options and their ids:

Airco (id=123) selected
Radio (id=124) selected
Bluetooth (id=125)
Navigation (id=126)

Radio and Airco are selected for this product. How can I get those two values (radio, airco) and display them? $_product is given.


texts: Magento 2 - Cancel order incrementing 2 quantity of product

texts:
In Magento 2.2.5 EE

Before placing order:
Product quantity = 1
stock status = 1

After placing order:
product quantity = 0
stock status = 0

After cancel order:
product quantity = 2
stock status = 1

I have check in my code, there is no order_cancel_after or sales_order_save_after or sales_order_state_change_before observer in any custom module.

Any idea what would be the issue?


texts: Can I install 2 magento different version in single system

texts: I installed magento 2.0.0 in debian jessie via vagrant, I need to install magento 2.0.1 in same vagrant, It Possible?, if Possible suggest me how to do this.


texts: oauth_signature invalid error while using Magento Rest API with GET filters

texts:
I'm having a hard time fetching orders from Magento REST API when I use its GET filters like http://localhost/magento/api/rest/orders/?filter[1][attribute]=entity_id&filter[1][gt]=70&page=1&limit=100

It is giving a "error":[{"code":401,"message":"oauth_problem=signature_invalid"}]

When I try hitting the same API endpoint using a REST Client like Postman, I'm getting back the desired results JSON.

I suspect the square brackets in the filter query might be causing a problem in generating a Oauth signature. All the endpoints without GET filters are working fine. I'm using the Request node module to make the GET request with the oauth headers.

Is there any fix to avoid the signature invalid error?


texts: Magento 2 unable to send eMail, exeption error

texts:
I got this error message in my exception file.

First Name :test
2 exception(s):
Exception #0 (Magento\Framework\Exception\MailException): Unable to send mail.
Exception #1 (Zend_Mail_Transport_Exception): Unable to send mail.

<?php
/**
*
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace vendorname\modulename\Controller\Index;

use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;

class Index extends Action
{
 private $dataPersistor;
/**
 * @return \Magento\Framework\Controller\Result\Redirect|\Magento\Framework\View\Result\Page
 */

protected $context;

/**
 * @var \Magento\Framework\Mail\Template\TransportBuilder
 */
protected $_transportBuilder;

/**
 * @var \Magento\Framework\Translate\Inline\StateInterface
 */
protected $inlineTranslation;

/**
 * @var \Magento\Framework\App\Config\ScopeConfigInterface
 */
protected $scopeConfig;

/**
 * @var \Magento\Store\Model\StoreManagerInterface
 */

/**
 * @param \Magento\Framework\App\Action\Context $context
 * @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder
 * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
 * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
 */

 public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder,
    \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation,
    \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
) {
    parent::__construct($context,$transportBuilder,$inlineTranslation, $scopeConfig );
    $this->_transportBuilder = $transportBuilder;
    $this->inlineTranslation = $inlineTranslation;
    $this->scopeConfig = $scopeConfig;
}

public function execute()
{
    $post = $this->getRequest()->getPostValue();

    echo "
";
    print_r($post);
    echo "
";

    $txt='';

    if($post['fname']){
        $txt.='Client Name :'.$post['fname'].'
';
    }
    if($post['address']){
        $txt.='Address :'.$post['address'].'
';
    }
    if($post['city']){
        $txt.='City :'.$post['city'].'
';
    }
    if($post['state']){
        $txt.='State/Province :'.$post['state'].'
';
    }
    if($post['zipcode']){
        $txt.='Zip Code :'.$post['zipcode'].'
';
    }
    if($post['phone']){
        $txt.='Phone :'.$post['phone'].'
';
    }
    if($post['email']){
        $txt.='Email :'.$post['email'].'
';
    }
    if(!empty($post['project_type'])){
        $projecttypearray = implode(",",$post['project_type']);
        $txt.='Project Type :'.$projecttypearray.'
';
    }

    if($post['comment']){
        $txt.='Comment :'.$post['comment'].'
';
    }
    echo $txt;

    $customerName=$post['fname'];
    $message=$txt;
    $userSubject='test mail';

    $fromEmail='admin@gmail';
    $fromName ='test name';

     $templateVars = [
                'store' => 1,
                'customer_name' => $customerName,
                'subject' => $userSubject,
                'message'   => $message
            ];
    $from = ['email' => $fromEmail, 'name' => $fromName];
    $this->inlineTranslation->suspend();
    $to = 'test@gmail.com';

    $storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;

     $templateOptions = [
      'area' => \Magento\Framework\App\Area::AREA_FRONTEND,
      'store' => 1
    ];

    $transport = $this->_transportBuilder->setTemplateIdentifier(1, $storeScope)
            ->setTemplateOptions($templateOptions)
            ->setTemplateVars($templateVars)
            ->setFrom($from)
            ->addTo($to)
            ->getTransport();
    $transport->sendMessage();
    $this->inlineTranslation->resume();

}

}


texts:
I'm trying to change a logo by a website developer...they no longer answer our calls and I really need help.  I found the area of the backend that allows you to change your logo, but i have no clue how to upload the picture because i see no upload button......or if its uploaded from a website i have no idea what website it is..is there a way to override or change everything so I can add on my own files from my computer?
1.

larger size screenshots
step1
[IMG]http://i60.tinypic.com/2ngtwg5.jpg[/IMG]

step2
[IMG]http://i57.tinypic.com/20ae7ti.jpg[/IMG]


texts: How to move/shift/translate content of existing PDF document?

texts:
I want to move/shift/translate the content of an existing PDF page to adapt it for printing. Specifically, I have a shipping label that has to be moved 1 cm to the right relative to the edge of the page.
I've already checked out Zend_Pdf_Page. But I could not find any documentation on this.
It does not have to be native Zend_Pdf_Page but any other external library.


texts: Scope problems with SOAP API and product url_key attribute

texts:
I have a EE 1.14 website whose product data we are updating with the SOAP API. I have come across an interesting problem related to 1.14 url keys and using SOAP. In 1.14 the url_key attribute must be set at store scope according to this document, http://devdocs.magento.com/guides/m1x/install/installing_upgrade_from-ee112.html. We have have multiple store views of which the url key is set at a global scope (the attribute is set to store scope, we just set it globally) so the product pages share the same url in different stores and this works fine AFAK. However when we update a product with the API only updating a couple of attributes, e.g

$data = array(
    'price' => 24.95,
    'special_price' => null
);

$product = $soap->catalogProductUpdate($session_id, "sku123", $data, 1, 'sku');

the whole product gets saved and all attributes that are set to store scope are saved with their global data, at the store scope passed. This would not be too much of a big deal for most attributes, just makes the db a bit bigger than it needs to be I guess, but for url_key in 1.14 it results in an error due to a unique key index on the value column of catalog_product_entity_url_key

If I updated at global scope the url_key doesn't get duplicated and all is fine. e.g

$data = array(
    'price' => 24.95,
    'special_price' => null
);

$product = $soap->catalogProductUpdate($session_id, "sku123", $data, null, 'sku');

So my question, is there a tidy way to only update the passed product attributes via the API and leave the rest of the product as is? Or some other kind of work around so that we don't set the url at store scope for every product we update with the API.

Update - Turns out this isn't only a problem when using the API. In admin on the edit product page, if the admin user changes the scope to store view and saves the same thing happens


texts: Get collection not working but query does

texts:
I don't know why this:

$attributeCollection = Mage::getResourceModel('myext/attributelist_collection')
//$attributeCollection = Mage::getModel('myext/attributelist')->getCollection()
    ->addFieldToFilter('to_export', array('eq' => 1))
    ->getSelect()->order('order DESC');

Isn't working, when the query I get with __getSelect() is correct and works when I execute it directly in the console.

The line commented is another try that doesn't work.

any idea?


texts:
we need some requirement regarding  shipping information :-

Eg we have purchased 1 pen then shipping add $15  one product.

other customer wholesaler  have purchased  400 pen shipping added 400*15
but my question 400 open pack in box and round tape  how to calculate box weight and how price include or not please confirm how can manage in magento


texts: Image Resize Command Issue in Magento 2.2.X

texts:
I have Magento 2.2.x running website which is having more than 50K products and each product has up to 27 additional Images.
When we run resize command (bin/magento catalog:images:resize), it takes approx 8-10 hours to execute it completely. 8-10 hrs is not acceptable anymore for resize and also it takes more load on server/sql.

Is there any way where we can resize images for some range of products or specific products (i.e product range or Limit)?

your help is really appreciated and we value your time.

Thanks!!


texts:
I want to use Registry class (vendor/magento/framework/Registry.php)
But above file mentioned something like this

  It's usage should be avoid. Use service classes or data providers
  instead.

Can you please anyone provide the best method to do this ?

Thanks


texts: Shared products DB between multiple Magento installations

texts:
Multiple magento installations with PRIVATE and SHARED DB.
Products on Shared DB will be managed ONLY by me, while they (stores admins) will be able to manage their own products DB and all the rest.

So every store will feature a catalogue of products coming from 2 DBs.

Is it possible?

THanks!


texts: Something went wrong while saving this configuration: Incorrect theme identification key when saving store theme?

texts:
I changed the site to Single Store Mode

It then defaults to no theme

So when trying to update the theme I get:

Something went wrong while saving this configuration: Incorrect theme identification key


texts:
Magento is designed to use PHP 7, newest versions even 7.1. Actually one of the most killing feature - return types doesn't work well with Magento implementation of Proxy object.

For example I create proxy for some dependency of class. This dependency has a few methods and at least one of them contains return type. It will fail later as the proxy won't copy return type at all, and declarations of methods in original and proxy class won't match. Has some figured out something to make it work? Or is it question for core team as request for bug fix?


texts:
While working M2EPRO extension in magento 2 for listing of product getting :
"The Price must be greater than 0. Please, check the Price, Quantity and Format Policy and Product Settings."
Unable to find any solution regarding this error please help !!


texts:
I add this field to cms Block. Now when I disable or enable this field, it gets updated in the database, but here always show disable. This is my code

$form = parent::_prepareForm()->getForm();
      $fieldset = $form->addFieldset('fieldset_cms', array('legend'=>Mage::helper('core')->__('Mobile')));
      $fieldset->addField('is_active_mobile', 'select', array(
            'name'      => 'is_active_mobile',
            'label'     => Mage::helper('cms')->__('Mobile Status'),
            'title'     => Mage::helper('cms')->__('Mobile Status'),
            'required'  => true,
           'options'   => array(
            '1' => Mage::helper('cms')->__('Enabled'),
            '0' => Mage::helper('cms')->__('Disabled'),
        ),
        ));

        return $this;


texts:
I want to change Invoice increment id from new series with the prefix.

I have checked sequence_invoice table in the database. I have found 4 table:

sales_invoice_0

sales_invoice_1

sales_invoice_2

sales_invoice_3

I have found entries only in sales_invoice_2 table like 1,2,3,4 and soon. So I am confused to change invoice number.

Can anyone suggest me?


texts:
I have created categories and products but not showing on frontend.

Please note that I am working on Commerce cloud environment, so before marking this question as duplicate, or anything else consider this.


texts: How write a Magento 2 standard Model class

texts:
I have create database table and want to create model,resource,Collection  class and know that how  to create.

Have follow the blog https://www.softprodigy.com/store/article/create-model-and-collection-for-custom-table-in-magento2/

Now, my question  if want use created model for API then

  What classes and interface need to add my Model, Resource,Collection    Class?
  What API classes are need to write?
  Should i create Factory class of those class?

In single word, how to write an standard Model class  to Magento 2

Can any one give a brief and describe answer


texts: Display all categories a product belong to on product page

texts:
I need to display all categories from one product on product view page.

This code I found, but it displays one category per line:

<?php $categories = $_product->getCategoryIds(); ?>
<?php foreach($categories as $k => $_category_id): ?>
<?php $_category = Mage::getModel('catalog/category')->load($_category_id) ?>
< <a href="<?php echo $_category->getUrl() ?>"><?php echo $_category->getName() ?>
<?php endforeach; ?>

But I need it this way:
cat 1
cat 2 > subcat 1
cat 3 > subcat 1 > subcat 2


texts: Image gallery area disappear in admin product

texts:
I am using magento 1.9.3.4
I'm trying to add images for product in catalog->Manage product->side bar/images option
But I can't see image gallery and upload button

So I have a look console log via dev tool of inspect of browser
I can see error log following

How do I go about this?


texts:
The below changes qty in sales_flat_quote_item to mu custom quantity but removed my custom pricing. How can I only update the qty?

 <?php
  $quote = Mage::getSingleton('checkout/session')->getQuote();
 $quote->updateItem($itemID, array( 'qty' => $qty));
  $quote->save();
?>


texts: Store wih diferent languages have broken images after programmatically product import

texts:
I have a script running in cron to import products.

This import creates simple products and then creates a configurable one with all these simple ones as children of that.

During this process, I insert images into the simple and configurable products and on the store's home page I list some of the products in a carrousel.

My store has three languages. EN, PT and FR. I created a controller where I can access the import script via a browser. When I run the script with the language in PT at the store's home, the images appear only in the PT language and in FR and EN the images are broken. If I run the script in EN, the images are broken in PT and FR and so on.

I tried using $magentoProduct->setStoresIds($storesIds) by passing an array of store ids to the products, but got no results.

I fetch my stores with:

$storesManager = $this->_objectManager->create(StoreManagerInterface::class);
/**
* @var $stores Magento\Store\Model\Store\Interceptor
*/
$stores = $storesManager->getStores();
if($stores){
   foreach ($stores as $store){
      $this->storesId[] = $store->getEntityId();
   }
}


texts: How do I” Pass variable between .phtml files?

texts: I have a variable in item.phtml file  (order approval extension) in my base folder and I want to pass It to another .phtml file (one called cart.phtml). I don’t think cart.phtml is a child of item.phtml. The variable is called $postdata and is just a simple PHP variable and I wish to display the text is holds on the same page as item.phtml but in another file.


texts: Magento 2: Product showing out of stock if default source has 0 qty in Multi Source Inventory

texts:
I need to use MSI (Multi source inventory) feature but i notice that if qty is 0 in default source then
product is going to out of stock even qty is already available in other source so how can i solve this?
i need to showing the product IN stock if any source store have the qty.
any idea, please share.


texts: Al magento 2 pages not found after successful installation

texts:
Installed Magento 2.3.0 on locally using Xampp, after installation and setup success, niether homepage nor admin page are found.
Giving 404 error.
I went through enabling rewrite mod in apache conf and also checked user permission, same issue.
What would be the possible cause and how to fix.
Thank you so much


texts:
How is it possible to test module setup in Magento2 ?
I have following setup class:

class InstallSchema implements InstallSchemaInterface
{
    public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $installer = $setup->startSetup();
        $quoteExtraFieldsTbl = $installer->getConnection()->newTable();

        $quoteExtraFieldsTbl->addColumn(
            'quote_id',
            Table::TYPE_INTEGER,
            null,
            [
                'primary' => true,
                'nullable' => false,
                'unsigned' => true
            ]
        );
        $quoteExtraFieldsTbl->addColumn(
            'delivery_date',
            Table::TYPE_DATETIME,
            null,
            ['nullable' => false]
        );
        $quoteExtraFieldsTbl->addColumn(
            'deliver_to_neighbours',
            Table::TYPE_SMALLINT,
            5,
            ['nullable' => false, 'default' => 0]
        );

        $installer->getConnection()->createTable($quoteExtraFieldsTbl);

        $installer->endSetup();
    }
}

How should be tested the proper creation of the table ?


texts: To create a different page and link from the category view page

texts:
Sorry for confusing in Title. I added some code in "category/catalog/view.phtml page" to display the Sub category and the description.

    <?php foreach ($this->getCurrentCategory()->getChildrenCategories() as $_subcat): ?>

            <a href="<?php echo $_subcat->getUrl() ?>"><?php echo Mage::helper('catalog/output')->categoryAttribute($_subcat, $_subcat->getName(), 'name') ?>
            <? $current_cat = Mage::getModel('catalog/category')->load($_subcat->getId()); ?>
            <?php if($current_cat->getId()) { ?>

<?php echo $current_cat->getDescription(); ?>

            <?php }?>
            Read More

    <?php endforeach ?>

But now i want to give an link to the "Read More", so that i can create the page for display more description about the category. After that i want to give the <?php echo $_subcat->getUrl() ?> link for displaying the category product listing page as the default magento.
Is it possible by creating a .phtml page? If yes, how can i give the link to the .phtml page.


texts: Creating helper object in the same class magento 2

texts:
How to create object in the constructor from the same class?

<?php
   namespace Vendor\CatalogSearch\Helper;
   use Magento\Framework\App\Helper\AbstractHelper;

   class Data extends AbstractHelper
   {
       public function __construct(
        \Vendor\CatalogSearch\Helper\Data $myHelper,  //here circular dependency error
       ....
   }


texts: M2: Preventing double cart entries when clicking "Add to Cart" twice

texts:
When clicking on "Add to Cart", my M2 website loads for 4 seconds and then redirects to the cart. Some visitors tend to click "Add to Cart" again after waiting 2 seconds. This causes the item to be added to the cart multiple times.
I'm looking for a way to automatically disable the "Add to Cart" button after button click, eventually with a loading indicator, so that the visitor knows the page is processing. I don't think this is a default M2 feature. Does anybody know how I can accomplish this?
I've seen a similar question/solution for M1 before (Limiting "Add to cart" to just 1 click / item), but not for M2.
I know I should focus on increasing the load speed. I will. I just really need this as a temporary solution first.


texts: Magento 2 Autoprefixer in production mode

texts:
Magento 2 comes with a preinstalled autoprefixer for Grunt.
But is it possible to use the autoprefixer in the production mode too?

I have a lot of CSS which does not work without the vendor prefixes in some browsers. I don't want declare a function for each property which has a vendor prefix, or add the prefix to each CSS class selector.


texts: Integrate a Micro Shop in a CMS out of Magento

texts:
We have a Magento 1.9.3 with different store views. Now i want to integrate a Micro Shop with only a few products on a partner website.
It should show the product grid, the product detail grid and the basket in the Micro Shop, for the checkout it could be linked on our normal Shop.

I was thinking to integrate it as a iFrame, a JS overlay or as onpage php. But i dont know what's the best case to do this.

I would appreciate any hints for the best way or a Module that serve this functionality already.


texts: CSS File Mod for changing "Shop By" SideBar Text Color not taking effect ?

texts:
I want to change the Font Colour & Style of the Shop By SideBar headings - see attachment.

[http://postimg.org/image/iovzfae1n/][1]

Code below is'nt working :

.block-layered-nav dt {   border-bottom: 1px solid #D5D5D5;    font-weight: normal;    padding: 0 7px 10px 0; text-transform:capitalize; font-size:14px;
color:#3d5d76; }

Thanks.


texts:
I using a custom option on the product detail a type file

I need limit this input to 10MB

It can be done from magento options or should I modify some file

Thank you


texts: Custom Admin form doesnt load layout file

texts:
I am developing a new module for Magento 2.1, the admin form for adding new entries doesnt load the correct layout. The layout that is loaded is as follows:

My Folder structure is as follows:

I have a NewAction.php in the Controller/Adminhtml/Post/NewAction.php:

<?php

 namespace Mageplaza\HelloWorld\Controller\Adminhtml\Post;

 use Magento\Backend\App\Action;
 use Mageplaza\HelloWorld\Model\Post as Post;

class NewAction extends \Magento\Backend\App\Action
{
/**
 * Edit A Manufacturer Page
 *
 * @return \Magento\Backend\Model\View\Result\Page|\Magento\Backend\Model\View\Result\Redirect
 * @SuppressWarnings(PHPMD.NPathComplexity)
 */
public function execute()
{
    $this->_view->loadLayout();
    $this->_view->renderLayout();

    $postData = $this->getRequest()->getParam('posts');

    if(is_array($postData)) {

        $post = $this->_objectManager->create(Post::class);

        $post->setData($postData)->save();

        $resultRedirect = $this->resultRedirectFactory->create();

        return $resultRedirect->setPath('*/*/index');
    }
}
}

The layout files for post_newaction.xml:

<?xml version="1.0"?>
 <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <update handle="posts_test_edit"/>
 <body/>
</page>

Also the layout posts_edit.xml file which loads my form(mageplaza_posts_form):

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<update handle="styles"/>
<update handle="editor"/>
  <body>
      <referenceContainer name="content">
        <uiComponent name="mageplaza_posts_form"/>
     </referenceContainer>
 </body>

I am completely stuck and out of ideas.


texts: Payment method - Zero Subtotal Checkout - hide all others

texts:
At the moment I have Paypal and Zero Subtotal Checkout payment methods enabled.

If the basket is €0 then Zero Subtotal Checkout will display however Paypal is displayed underneath it.

Whats the best way to hide all other payment methods besides from Zero Subtotal Checkout if the basket is €0


texts: Automatically use Default Value for category/product Changes (always inherit "All Store Views" scope)

texts:
Working on a pretty complex multi-store setup now, and I'm trying to find a way to set all fields as being checked to "Use Default" by default so that a product name change (or etc) wouldn't have to be done at every scope level.

Is there a way to set this up so that everything inherits by default, or a good (and safe) automated way to go through and set this for each field?

Edit: for specificity's sake, let's hone in on one field: "Category Name". How can I set this field to "Use Default Value" on every category, for every store view?


texts: Magento 2: Category name/url/desc not updating

texts:
Updated product category name/url/desc, cleared FPC but changes are not showing.

Running in single-store mode, flat catalog, cron indexing every minute.

Do I need to clear the flat catalog?


texts: How do I set Developer Mode in Magento 2

texts:
I'm trying to install Magento 2 but I am getting the following error:

  Error happened during application run. Could not write error message
  to log. Please use developer mode to see the message.

I have tried adding SetEnv MAGE_MODE developer to .htaccess as advised by Alan Storm http://magento-quickies.alanstorm.com/post/58757471044/magento-2-developer-mode but no luck.


texts: Overwrite phtml file from adminthml issue

texts:
How should I overwrite this phtml file tabs.phtml, in my custom module? This file is located in:

app/design/adminhtml/default/default/template/widget/tabs.phtml

is loaded from core from this class Mage_Adminhtml_Block_Widget_Tabs in the constructor:

    protected function _construct()
    {
        $this->setTemplate('widget/tabs.phtml');
    }

UPDATE:

<global>
        <blocks>
            <mynamespace_mymodule>
                <class>Mynamespace_Mymodule_Block</class>
            </mynamespace_mymodule>
            <adminhtml>
                <rewrite>
                    <widget_tabs>Mynamespace_Mymodule_Block_Adminhtml_Widget_Tabs</widget_tabs>
                </rewrite>
            </adminhtml>
        </blocks>


texts: Gallery Thumbnail (left/right) Scroll Performance Android Chrome Sluggish and Unresponsive

texts:
Preconditions (*)

Magento 2.2.7 and Magento 2.3 Product Gallery
Product page gallery with sample data is installed on the luma theme with additional images (minimum 5+).

Steps to reproduce (*)

Configure product gallery to use thumbnails on mobile.

<var name="breakpoints">
    <var name="mobile">
        <var name="conditions">
            <var name="max-width">767px</var>
        </var>
        <var name="options">
            <var name="options">
                  <var name="arrows">true</var>
                  <var name="navarrows">true</var>
                  <var name="nav">thumbs</var>
             </var>
       </var>
   </var>
</var>

Navigate to a product page with more than 5 images on Chrome Android or Chrome Dev in mobile mode.
Attempt to scroll through the thumbnail gallery and you will note sluggish/slow performance.

Expected result (*)

Smooth responsive behaviour

Actual result (*)

Sluggish and unresponsive

Additional information

Video of poor performance: https://www.dropbox.com/s/fjjnxsiohgsn8mf/20190206_095707.mp4?dl=0


texts:
We have a mobile app for our Magento store. On the web version, we are using Paypal Standard and Authorize.net as Payment options.

The issue here is how can I integrate Paypal Standard and Authorize.net or any other Magento Mobile compatible Payment gateway, in order to make the checkout process and experience the same as we are having in Web version.

Apart form that, let me know if I am on a wrong direction and how the above could be achieved in Magento.

I am unaware how payment gateways work in native mobile app for Magento store.

If anyone can shed some light or guide would be thankful.

Thanks.


texts: Magento 2: Add custom variable to email template

texts:
I added a "regular card number" attribute to the customer. It is essentially a unique code that when submitted by the customer gives a 20% discount. I would now like to send that code in an email to the customer, but Magento doesn't seem to add it.

{{trans "Regular card number: %card_number" card_number=$customer.getCardNumber()}} {{var customer.custom('card_number')}}

Any ideas on how to add this variable to an email template?
Thank you!

Full code of my template:

{{template config_path="design/email/header_template"}}

{{trans "%name," name=$customer.name}}

{{trans "Thank you for confirming your %store_name account." store_name=$store.getFrontendName()}}

    {{trans
        'To sign in to our site, use these credentials during checkout or on the My Account page:'

        customer_url=$this.getUrl($store,'customer/account/',[_nosid:1])
    |raw}}

{{trans "Email:"}} {{var customer.email}}

{{trans "Password:"}} {{trans "Password you set when creating account"}}

{{trans "Regular card number: %card_number" card_number=$customer.getCardNumber()}} {{var customer.custom('card_number')}}

    {{trans
        'Forgot your account password? Click here to reset it.'

        reset_url="$this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])"
    |raw}}

{{trans "When you sign in to your account, you will be able to:"}}

{{trans "Proceed through checkout faster"}}
/

{{trans "Check the status of orders"}}

{{trans "View past orders"}}

{{trans "Store alternative addresses (for shipping to multiple family members and friends)"}}

{{template config_path="design/email/footer_template"}}


texts: hide the zoom option for product images with less pixel size

texts:
please visit this link :

http://kidsdial.com/chair.html, you can see there is a zoom option on the products images

if we upload smaller images as like here :

http://kidsdial.com/microsoft-wireless-optical-mouse-5061.html

the product image is not zooming properly.

so i want to hide the zooming option for images with less than 400 * 400 pixels.

media.phtml = > this may be the code for this : http://pastebin.com/gAwfdtw7

please help me to find solution.

thanks in advance.


texts:
My phtml file is extended with this class:
class Select extends \Magento\Catalog\Block\Product\View\Options\AbstractOptions
{
    protected $_escaper;
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\Pricing\Helper\Data $pricingHelper,
        \Magento\Framework\Registry $registry,
        \Magento\Catalog\Helper\Data $catalogData
      ) {
        $this->registry = $registry;
        parent::__construct($context, $pricingHelper, $catalogData);
      }
    private function getCurrentProduct()
    {
        if (is_null($this->product)) {
            $this->product = $this->registry->registry('product');

            if (!$this->product->getId()) {
                throw new LocalizedException(__('Failed to initialize product'));
            }
        }

        return $this->product;
    }

When i call my function $this->getCurrentProduct() i get nothing, what i am doing wrong here. Its a product page


texts: Limit Maximum Qty Allowed in Shopping Cart for store/website scope

texts: When I go to System -> Configuration -> Catalog -> Inventory -> Product Stock Options, Limit Maximum Qty appears under Default, but not when I change to a specific store scope. Is there a way to set this limit on a store/website level? Or do I have to set this option specifically on all products using Update Attributes in the Catalog Product admin view? I would prefer to still use the config option if possible, as it doesn't involve a large query to the database.


texts: Product details page get product custom attribute and apply custom css

texts:
I have create a custom attribute for a product. The attribute name is "hide"
When product load at product detail page, if this product custom attribute is "hide", it will apply a css to hide certain class label in the product details page.
If I want to build this as a custom module, what is the proper way to do it?
anyone can give me samples or reference that I can follow?


texts: main.ERROR: Notice: Trying to access array offset on value of type int

texts:
Losing access to our admin panel and exception log is showing:
 main.CRITICAL: Notice: Trying to access array offset on value of type int in /home/andy/public_html/vendor/magento/framework/Session/Validator.php on line 132 {"report_id":"aeee1c0ff0afc07937a2ffe04c415f1c79a0c172c0074c8ae4b0d39e2e09d064","exception":"[object] (Exception(code: 0): Notice: Trying to access array offset on value of type int in /home/andy/public_html/vendor/magento/framework/Session/Validator.php on line 132 at /home/andy/public_html/vendor/magento/framework/App/ErrorHandler.php:61)"}

Anybody had similar or know a fix?


texts: Remove Shipping Method for Virtual Product Magento 2.3.2

texts:
We are having strange problem,
On checkout for Magento 2.3.2,
For Virtual products or gift card
(we checked if its gift card extension issue, but it is also happening for virtual product whose weight is set as this item have not weight)
 it is asking shipping address and shows shipping block
which is resulting in "No Quotes available"
Further resulting in unable to place order as there is no shipping method available

Because of which we are loosing sales

(This is also happening on Magento's Luma and Blank theme)


texts: What is the difference between scope website and websites?

texts:
I know Magento 2 have store, group, website, stores, groups and websites scopes type.

But my question when Magento use singular form and when it uses plural form.

Under core_config_data table sometimes it saves under website or sometime websites scope. How it decide this ?


texts:
I'm running Magento 1.9.3.3 and whenever I try to delete a product I get an HTTP ERROR 500 page. Everything else seems to work normally.

The error log says:

  PHP Fatal error:  Call to a member function joinRel() on boolean in
  /home/xxxxxxxx/public_html/app/code/core/Mage/Tag/Model/Tag.php on
  line 127

This is the relevant section from that tag.php file:

    protected function _getProductEventTagsCollection(Varien_Event_Observer $observer)
{
    return $this->getResourceCollection()
                    ->joinRel()
                    ->addProductFilter($observer->getEvent()->getProduct()->getId())
                    ->addTagGroup()
                    ->load();
}

I can't find any reference to this online at all and I'm completely stumped. Has anyone got any ideas, or suggest a fix?

Many thanks.


texts: Package Magento2 extension with custom theme?

texts:
I have the following structure:

app/code/Vendor/Module/....

app/design/adminhtml/Vendor/mythemename/...

In my composer.json I put something like this:

{
  "name": "vendor/module",
  "description": "A Magento 2 module that ...",
  "type": "magento2-module",
  "version": "1.0.0",
  "authors": [
    {
      "name": "Iunia ",
      "email": "iunia@test.com"
    }
  ],
  "license": [
    "OSL-3.0",
    "AFL-3.0"
  ],
  "require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "magento/framework": "100.0.*",
    "vedor/mythemename": "100.0.*"
  },
  "autoload": {
    "files": [ "registration.php" ],
    "psr-4": {
      "Vendor\\Module\\": ""
    }
  }
}

How do I package it so that it includes the module and the theme? It doesn't like the theme. Using validate_m2_package.php I get the following error:

  More than one top-level directory detected, number of directories =
  3. Top level directory expected to be the module directory.

Do I need to put
    "type": "metapackage",
in my composer.json?

If the answer is yes, how should my composer.json look?
Thank you in advance!


texts:
since a few days I am trying to install Magento with Docker, Composer on Windows 10.

So far, I got to the Web-Installation. A huge step for me...

After clicking the last step, Magento stuck by 0%.

The Logfiles shows something like:

  [2019-02-14 12:16:38] main.CRITICAL: The path
  "/var/www/html/generated/code/Magento/Paypal/Model/PayflowlinkFactory.php.86"
  cannot be renamed into
  "/var/www/html/generated/code/Magento/Paypal/Model/PayflowlinkFactory.php"
  Warning!rename(/var/www/html/generated/code/Magento/Paypal/Model/PayflowlinkFactory.php.86,/var/www/html/generated/code/Magento/Paypal/Model/PayflowlinkFactory.php):
  No such file or directory Class
  Magento\Paypal\Model\PayflowlinkFactory generation error: The
  requested class did not generate properly, because the 'generated'
  directory permission is read-only. If --- after running the
  'bin/magento setup:di:compile' CLI command when the 'generated'
  directory permission is set to write --- the requested class did not
  generate properly, then you must add the generated class object to the
  signature of the related construct method, only. [] [] [2019-02-14
  12:16:39] main.CRITICAL: The path
  "/var/www/html/generated/code/Magento/Paypal/Model/PayflowlinkFactory.php.78"
  cannot be renamed into
  "/var/www/html/generated/code/Magento/Paypal/Model/PayflowlinkFactory.php"
  Warning!rename(/var/www/html/generated/code/Magento/Paypal/Model/PayflowlinkFactory.php.78,/var/www/html/generated/code/Magento/Paypal/Model/PayflowlinkFactory.php):
  No such file or directory Class
  Magento\Paypal\Model\PayflowlinkFactory generation error: The
  requested class did not generate properly, because the 'generated'
  directory permission is read-only. If --- after running the
  'bin/magento setup:di:compile' CLI command when the 'generated'
  directory permission is set to write --- the requested class did not
  generate properly, then you must add the generated class object to the
  signature of the related construct method, only. [] [] [2019-02-14
  12:16:48] main.DEBUG: cache_invalidate:
  {"method":"POST","url":"http://m2.docker/setup/index.php/session/prolong","invalidateInfo":{"tags":["interception","CONFIG"],"mode":"matchingTag"}}
  [] [2019-02-14 12:16:53] main.DEBUG: cache_invalidate:
  {"method":"POST","url":"http://m2.docker/setup/index.php/session/prolong","invalidateInfo":{"tags":["interception","CONFIG"],"mode":"matchingTag"}}
  []"

If I should guess, its something wrong with docker but I can't figure out how to solve this. I found ONE question similar to this. It was asked in Januar and no one answered it till today.. No clue whats wrong.

Thank for you help!


texts: Downloadable link doesn't appear in email confirmation

texts:
The Issue

I have a bundled product with a downloadable product as a bundled item.   After purchase, I see the downloadable product in the order confirmation but the link DOES NOT exist to download the downloadable product.

Troubleshooting

1. I get the download link in the order confirmation when I purchase the downloadable product ONLY.

2. I also get the download link in the order confirmation when I purchase a single product AND the downloadable product.

3. I DO NOT get the download link in the order confirmation when I purchase the bundled product with the downloaded product as a bundled item.

Can someone tell me why?


texts: Wrong charset in Product options in Magento 2.1

texts: I upgraded to Magento 2.1.0 from Magento 2.0.7 and now on product page Product options-container have wrong charset. I tried already change to default theme but it didn't help. Elsewhere on the product page characters are displayed correctly.


texts:
I am trying to use Apache HTTPD to change the rewrite URL for any request to be re-written as catalogsearch/result/?q=

If I put these lines in .htaccess:

RewriteCond %{THE_REQUEST} \ /+catalogsearch/result/\?q=([^&\ ]+)
RewriteRule ^ /q/%1? [L,NE,R=301]
RewriteRule ^q/(.*)$ /catalogsearch/result/?q=$1 [L,NE,QSA]

it always results in a 404 error... (although the url is correctly rewritten).

Can you help me please to solve?


texts:
At the moment the My Account link is not being shown in my top header. I would like to have it shown when the customer is logged in. I am using the below code in customer.xml

<customer_logged_in>
    <reference name="top.links">
        <action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
    </reference>
</customer_logged_in>

I believe that the code is correct, but I guess it has previously been removed directly from a template file. In which template would it normally be defined?


texts: How can i use event before add to cart ? if it exists at all - Magento2

texts:
Is there an event to before_add_to_cart or add_to_cart_before?
Or What can I use instead of a before add to cart event ?
Thanks


texts: Magento 1: clarification regarding translation methods

texts:
I'm currently studying for the MFC and I've downloaded the guide from Demac Media.

One of the question to ask yourself (from the official Magento study guide) is which methods are available for translation ?

And according to the Demac Media guide it is the following:

Inline translation
Locale translation files (translation.csv)
core_translate package
JavaScript translate.js

But to me this list does not make sense because I don't know what is the difference between inline translation and core_translate package ?

AFAIK, when you use the inline translation system in Magento 1, the translations are stored in the core_translate table.


texts: Unit Test or Integration Test for this kind of functions?

texts:
I have the following resolve function in one of my classes:

public function __construct(
   \Magento\Catalog\Api\CategoryRepositoryInterface $categoryRepository,
   \Magento\Framework\Webapi\ServiceInputProcessor $serviceInputProcessor)
    {
        $this->categoryRepository = $categoryRepository;
        $this->serviceInputProcessor = $serviceInputProcessor;
    }

public function resolve($value, array $args, ResolveInfo $info)
{
    $inputParams = $this->serviceInputProcessor->process(\Magento\Catalog\Api\CategoryRepositoryInterface:class, 'save', $args);
    $result = $this->categoryRepository->save($inputParams[0]);
    return $result;
}

In order to test it I have created the following test case:

public function testResolve()
    {
        $categoryRepoMock = $this->getMockBuilder(\Magento\Catalog\Model\CategoryRepository::class)
            ->disableOriginalConstructor()
            ->getMock();

        $serviceInputProcessorMock = $this->getMockBuilder(\Magento\Framework\Webapi\ServiceInputProcessor::class)
            ->disableOriginalConstructor()
            ->getMock();

        $field = new AddCategoryField($categoryRepoMock, $serviceInputProcessorMock);

        // do asserts here
    }

What could I assert there in order to do a proper unit testing?

Should I do unit testing at all?

I am not invoking any my own function, so maybe I can omit unit testing and perform only integration tests?


texts:
I am trying to use Magento 2 Modal Widget like below but it was not working. It is not showing any error also.

<script>
    require(
        [
            'jquery',
            'Magento_Ui/js/modal/modal'
        ],
        function(
            $,
            modal
        ) {
            $("#ship_now").click(function() {
                $('#shipNowContent').modal({
                    autoOpen:false,
                    clickableOverlay:true,
                    type:'popup',
                    title:'Hello',
                });
            });
        }
    );
</script>

Could anyone help me in this regard?


texts: Magento 2 How to create a address custom attribute and show them in admin, checkout and account address box

texts:
I want to create a custom address attribute, I need them visible in all the following places.

Admin Addresses.
My Account Address Box
Checkout address and forms.

How can I implement to have them on billing and shipping address.


texts: Get the list of most seller combined products with its orders

texts:
I want to get the most frequently sold product combinations, along with number of orders ( and Orders if possible).

I have customized the Magento tables for my warehouse activities and the sample code will be like this,

SELECT
"Orders"."order_id",string_agg(pr.product_name:: character
 varying, ',') as Product_names
 ,Count(Distinct "Orders"."order_id") as ordercount
FROM
"data"."orders" AS "Orders"
LEFT JOIN  data.items i On i."order_id"="Orders"."order_id"
LEFT join  data.products pr on pr."product_id"=i."product_id"
 WHERE TO_CHAR("Orders"."created_at_order",'YYYY-MM-DD')
BETWEEN '2019-02-01' AND '2019-04-30'
ORDER BY  "Orders"."order_id"

A sample of the expected result is shown below:

Let's say there are three products: P1,P2& P3.  I want to find the combination of products which is selling the most, along with their orders.

Also I want to exclude the parent-child items, meaning if a customer bought a set which contains three items(Parent), and if the combination product is shown as it's child  then it should be avoided.  Also the P1,P2&P3 which is the most selling combination product should count the orders if the P1,P2&P3 is included with other products also.

Is there a way to get this using SQL?  I'm using Postgresql, but it's free be if someone can help me with MySQL query or tables in Magento side.


texts: Browser autocomplete for address fields in checkout

texts:
I am tryng to get browser autocomplete (The HTML autocomplete attribute
) to work for the checkout address fields but I am not having much success or many ideas.
Autocomplete does work for company and telephone fields but not for others - tested with chrome 86.
The only thing I tought to try was adding attribute autocomplete="given-name" to firstname field and that didn't work.
Has anyone done this already and can point me in the right direction?


texts: Small error in the translation of transactional email

texts:
In Magento 1.9.1 I've installed the German language pack. Everything looks fine except of a very small problem in the email subject for the shipping mail:

English:
Shipment # 100000001 for Order # 100000004

German:
Versand Nr. 200000002 für Bestellung Nr. {{var order.increment_id}

In the official Magento documentation you can read: "Only the en_US templates were updated to the new responsive email structure. To use the responsive emails for other locales, copy the en_US/template/email/ directory into the respective app/locale/[LOCALE CODE] directory and update the text strings to that locale."
http://devdocs.magento.com/guides/m1x/ce19-ee114/RWD_responsive_emails.html#localizing

I had a look in this folder but there were no German translation in it. Is there another location where I should look for it?
The problem is maybe only a missing }

I don't want to build up everything from the scratch. The other emails and translations are fine.


texts: Shipping Restriction Extension Error Magento 1.9

texts:
I purchased an extension from a company called Magebright called, Shipping Restrictions. Before I purchased it, I specifically asked if it would allow me to restrict the USPS shipping option of Media Mail so that if anything that did not qualify for Media Mail was in the shopping cart, it would disappear as a shipping option. They said it would, so I bought it. Once installed I noticed a problem, I could restrict all of USPS but not any specific shipping methods. So I contacted them and they said they would fix it. They went in and expanded the options so that I could restrict only Media Mail. However, now the extension crashes. I can put as many media mail qualifying items into the cart as I want and it works fine, but as soon as I attempt to add an item that does not qualify it takes me to a 404 error page. If I disable the extension, it all works fine (without restricting the shipping option of course). They said they would fix, but a month has gone by with nothing done.
  If I look at the error log, it gives me this:

 PHP Fatal error:  Call to a member function getCarrier() on a non-object in magento/app/code/local/Magebright/Shipingresriction/Model/Observer.php on line 44

If I open up the Observer.php file, lines 42-46 are as follows:

        if ($isEmptyResult){
        $error = Mage::getModel('shipping/rate_result_error');
        $error->setCarrier($lastRate->getCarrier());
        $error->setCarrierTitle($lastRate->getMethodTitle());
        $error->setErrorMessage($lastError);

Any ideas, suggestions on how to fix this, or how to proceed? I downloaded an extension called Modules Conflict Detector to see if any modules were conflicting, but according to the extension, they are not. Any help on how to proceed would be appreciated. Thanks!!

Also - I have not been able to find any other extension offered or way to do this. And I need this function for my site.


texts: Configuring Magento for Quick Offline Sales

texts:
I'm trying to setup Magento at an over-the-counter Pharmacy where patients come in with prescriptions and the sale for medications takes place quickly.

Had a look at the Magento POS extensions, but they're really expensive (while I'm looking for a free option).

Is there a way to configure Magento sales in such a way that we have a pre-configured client called "over-the-counter" and just have to:

Create a new order
Add Products under Items Ordered
Submit order (skipping the shipping and payment method)
Submit Order
Print order

Would really appreciate some help and advise on this, pls.


texts: Magento 2: Change error message on checkout "An error occurred on the server. Please try again"

texts:
Preconditions

Magento 2.1.4

PHP 7

Production mode

Steps to reproduce

Wanted to change the generic "An error occurred on the server. Please try to place the order again" to "We could not place this order. Please call us to complete."
Changed the text in vendor/magento/module-checkout/Model/PaymentInformationManagement.php
vendor/magento/module-checkout/Model/GuestPaymentInformationManagement.php
Cleared the static files, re-deployed static files, cleaned and flushed the cache. Also re-compiled for good measure.

Expected result

When an error occurs in checkout the error message should read "We could not place this order. Please call us to complete."

Actual result

Same error message occurs everytime "An error occurred on the server. Please try to place the order again."

Has anyone successfully changed the error message at checkout, to their own custom message?


texts:
Purchase order payment method available for all customer groups except Non-Logged-in customers on the checkout page.
can we display Purchase Order as a payment method for non-logged in customers also?


texts: how to display warning message for wrong entry of zipcode?

texts:
how to display warning message for wrong entry of zip/postal code? actually it is default in magento2 but in my case it is not showing any warning message except this("This is a required field.")

1: https://i.stack.imgur.com/BNvwG.png i need warning message like this

 this is my case here i'm not getting warning message


texts:
I am having timezone = 'Asia/Jakarta' everywhere in

Magento admin
Database
checked in phpinfo
Server

But still in the CRON logs I am getting UTC time only, I need this to be in 'Asia/Jakarta' only.

I managed to check app/bootstrap.php and found

date_default_timezone_set('UTC');

On commenting this line CRON runs in correct timezone, but order listing in Magento (Sales > Order) becomes in UTC now.

Tried various solutions in app/bootstrap.php (no one is working) as:

ini_set('date.timezone', 'Asia/Jakarta');
date_default_timezone_set( ini_get('date.timezone') );

and

date_default_timezone_set('Asia/Jakarta');

Any idea why is it so ?


texts:
I am getting error like below

Recoverable Error: Argument 1 passed to Mage_Adminhtml_Controller_Action::_addContent() must be an instance of Mage_Core_Block_Abstract, boolean given,

My indexAction code is like below

public function indexAction()
    {
        // instantiate the grid container
        $brandBlock = $this->getLayout()
            ->createBlock('digitech_brandlogo_adminhtml/brandlogo');

        // Add the grid container as the only item on this page
        $this->loadLayout()
            ->_addContent($brandBlock)
            ->renderLayout();
    }

In this case my Question is What does it mean by "

$brandBlock = $this->getLayout()
                ->createBlock('digitech_brandlogo_adminhtml/brandlogo');

" ??

I would like to know about block and layout structure/arrangement for this.


texts: Magento 2.2.6 how to develope loggedin customer only show price in website

texts: I am using Magento 2.2.6 I need to customize and if any plugin available for logged-in customer show only price not show for guest user in Magento website. if anyone idea reply me. I have try to one module integrate but not hide price in listing and detail.


texts:
My company picked up a project where we have to edit a clients existing Magento site. I am a WordPress developer and have NEVER used Magento.

I looked at the docs for the CSS Preprocessing on Magento but they just aren't clear. All I really want to do is just ass a LESS file of my own and just start cleaning up some of the styles.

They are using the Ultimo theme and I went into the css folder there and made a custom.less file but I don't know how to link it to the head and have it process to a CSS file. Also read something about being in developer mode? I am making these changes to the live site (I know horrible practice, just need to get these changes done fast). Any help or direction is much appreciated.


texts: Upgrade Magento with Live Data / How to upload changes on live site with ZERO DOWNTIME

texts:
I am having an issue with Magento Data Upgradation. I need your suggestions for best possible way to achieve the following

How can I upgrade Magento with older version to newer version with LIVE data ?
How I can I upload my changes on LIVE Server with ZERO Downtime ?

Please do not downvote or mark this as duplicate, because I have searched many forums and could not get the best feasible solution/way to achieve the above functionality.


texts: Categories already saved in a product appear empty when editing that same product

texts: When trying to edit a product in Magento 2, the categories that are already saved in the product do not appear, they are empty. If we save without reselecting the categories, then the product is without them, so we need to reselect the categories every time we edit a product.


texts: How to show the shipping and handling fee directly on the cart total?

texts:
I have only one shipping method - Table rate on which I calculate two different aspects.

for over $200 - shipping price will be $0.00 that is free.
below $200 is $9.50.

Now I get these calculation processed only after I trigger estimate shipping form or co-shipping form. Is that possible to load the shipping fee automatically once the page loads? and show up the result on cart total box.


texts:
I'm working on a new Magento 2 installation with the Porto theme and have noticed that when you first visit the site or have the browser cache disabled you get a lot of of jQuery conflict errors. Below are examples of these errors from both the theme and core Magento2.

examples:

(index):394     Uncaught TypeError: $(...).swMegamenu is not a function
dataPost.js:13  Uncaught TypeError: $.widget is not a function

When I look how these jQuery functions are being initiated, I see it's using requireJs correctly to load jQuery.

<script type="text/javascript">
    require([
        'jquery',
        'Smartwave_Megamenu/js/sw_megamenu'
    ], function ($) {
        $(".sw-megamenu").swMegamenu();
    });
</script>

AND

define([
    "jquery",
    "mage/template",
    "jquery/ui"
], function($,mageTemplate){

    $.widget('mage.dataPost', {......

I can fix it by adding var $ = jQuery.noConflict(); at the beginning of the function block (but this seems redundant as $ is already passed as a parameter to the function, it works though!)

Also, I can fix it by Merging all JS as suggested in answer to this question.

Merging the JS seems to be a good fix but I'd like to better understand why this is happening and the best approach to solving it.


texts:
Fatal error: Declaration of
  \ModuleName\Block\Adminhtml\ModuleName\Grid\Renderer\Image::render()
  must be compatible with
  Magento\Backend\Block\Widget\Grid\Column\Renderer\RendererInterface::render(Magento\Framework\DataObject
  $row) in
  C:\wamp\www\magento2\app\code\\ModuleName\Block\Adminhtml\ModuleName\Grid\Renderer\Image.php
  on line 59

<?php
namespace <vendor-name>\ModuleName\Block\Adminhtml\ModuleName\Grid\Renderer;

use Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer;
use Magento\Framework\Object;
use Magento\Store\Model\StoreManagerInterface;

class Image extends AbstractRenderer
{
   private $_storeManager;
   /**
    * @param \Magento\Backend\Block\Context $context
    * @param array $data
    */

   public function __construct(\Magento\Backend\Block\Context $context, StoreManagerInterface $storemanager, array $data = [])
   {
       $this->_storeManager = $storemanager;
       parent::__construct($context, $data);
       $this->_authorization = $context->getAuthorization();
       echo "test";
   }
   /**
    * Renders grid column
    *
    * @param Object $row
    * @return  string
    */
   public function render(Object $row)
   {
       $mediaDirectory = $this->_storeManager->getStore()->getBaseUrl(
           \Magento\Framework\UrlInterface::URL_TYPE_MEDIA
       );
       $imageUrl = $mediaDirectory.'/FolderPathName'.$this->_getValue($row);

       return '<img src="'.$imageUrl.'" width="50"/>';
   }
}


texts:
I have overwritten this template magento_catalog/templates/product/list.phtml in my own theme. I have the following code to show a random number.

  $number = mt_rand(1000,9999);

I print this number below the name of the product (code extract)

        <a class="product-item-link-list" href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>">
            <?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>

<?php echo $number; ?>

But when I enter the category if I refresh the page, it always shows me the same number. it does not refresh...

What should I do to refresh that part?

Regards


texts: Magento 2 :: Creating and Customising home page

texts:
My client wants to have a custom editor so that they can edit or add images, videos blocks over homepage. What can be the best approach to do this?

He might need slider, special products slider, image blocks?
How to make it work as easy as it can ensuring all the aspect like the slider is from the different module, special product slider will be the widget and then image blocks. Some blocks can be disabled then they should get auto-managed.

The best way to achieve it?

Should I use static blocks and call them on home page?

Should I create different widgets?