texts: I have the following problem in my store. I've added some simple products to my configurable product but the prices are the problem. Only for one attribute the price is static. For the other it isn't, not even in percentage. So there's no way to add the correct prices. Is there a way to use the price of the simple product?


texts: Magento 2.1.5: Customers who bought a specific product

texts:
Is there any idea (SQL-statement) or extension on how to show all customers that bought a specific product (id) in Magento 2.1.5

Thanks!


texts: CE 1.7.0.2 / After SUPEE-6788 / "Admin > Newsletter > Newsletter queue" results in 404

texts:
Since I applied the SUPEE-6788 patch to my CE 1.7.0.2 Magento installation, I can't access anymore the page of the admin "Newsletter > Newsletter queue". It results in a 404 error.
The admin URL of that page is the following:
http://domain.com/shop/index.php/admin/newsletter_queue/index/

I also fixed all other blocks & extension with the SUPEE-6788 Developer Toolbox (https://github.com/rhoerr/supee-6788-toolbox), but it cannot fix this specific problem.

Thx for your help, I cant send newsletters anymore...


texts: How to set a new color to Color Attribute using Rest API

texts: Hey i'm begginer at Magento 2 and i want to set a new color type to the Color Attribute using REST API. Is it possible? I know this can be done using the admin menu, but i would like to do this using REST API.


texts:
i am looking for a way to change the mode of Magento 2 Indexer.

The way it was done in Mage 1 :

$pCollection = Mage::getSingleton('index/indexer')->getProcessesCollection();

        foreach ($pCollection as $process) {
            $process->setMode(Mage_Index_Model_Process::MODE_MANUAL)->save();
            //$process->setMode(Mage_Index_Model_Process::MODE_REAL_TIME)->save();
        }

Is this even possible in Magento 2 ?


texts:
I'm using Magento 1.9

I want to activate a new store view for our office IP only because we want to make changes in that views.

How to make that?


texts:
I want to add Logs in Magento 2 Checkout Steps.

shipping Method Loading
Payment Methods Loading
Place Order

etc..

What should i use, Observers or should override the methods. Is there any plugin which can be used?


texts: How to configure correspondents info for the emails?

texts: Right now I have [Store Name] | [Department] showing in the correspondents when I receive the email from my website. I need to change it to [Store Name] - [Department]. How can I do that?


texts:
I wanted to make some changes in invoice pdf. For example, adding price + tax and display in the subtotal column. I have already created a custom module for editing the invoice. I have made some in the invoice like adding custom attribute value in the Invoice.

But I don't know how to add price and tax and display in the subtotal column.

In the DefaultInvoice.php, there is a draw function having items price values.

public function draw()
{
  ------------------------
  foreach ($prices as $priceData) {
        if (isset($priceData['label'])) {
            // draw Price label
            $lines[$i][] = ['text' => $priceData['label'], 'feed' => $feedPrice, 'align' => 'right'];
            // draw Subtotal label
            $lines[$i][] = ['text' => $priceData['label'], 'feed' => $feedSubtotal, 'align' => 'right'];
            $i++;
        }
        // draw Price
        $lines[$i][] = [
            'text' => $priceData['price'],
            'feed' => $feedPrice,
            'font' => 'bold',
            'align' => 'right',
        ];
        // draw Subtotal
        $lines[$i][] = [
            'text' => $priceData['subtotal'],
            'feed' => $feedSubtotal,
            'font' => 'bold',
            'align' => 'right',
        ];
        $i++;
    }

    // draw Tax
    $lines[0][] = [
        'text' => $order->formatPriceTxt($item->getTaxAmount()),
        'feed' => 495,
        'font' => 'bold',
        'align' => 'right',
    ];
}

Please let me know how to do addition.

Thanks.


texts: How to avoid HTML characters in contact form?

texts:
The problem is when user submit the form with special characters in the contact form (description field), in the mail it converts to HTML characters. After lot of debugging I nailed down the following file.

\vendor\magento\module-contact\view\adminhtml\email\submitted_form.html

the file contains

{{trans "Name: %name" name=$data.name}}
{{trans "Email: %email" email=$data.email}}
{{trans "Phone Number: %telephone" telephone=$data.telephone}}

{{trans "Comment: %comment" comment=$data.comment}}

I tried wrapping up %comment/$data.comment field with htmlspecialchars/ htmlentities functions. but it's not working.

For example, If I entered the following word (Hello' world") in the contact form, I receive as

Hello&#039; world&quot;


texts: modules are randomly disabled once in a while

texts:
I've got really weird situation at one site: modules at /app/etc/modules are randomly disabled once in a few days. Every time something else. Simply 'true' is replaced by 'false' at XML files. Nobody is supposed to touch this site (it's in development yet).

I've changed FTP password, admin password, etc. Still happens.

I didn't find any mention of such issue at the net. What could it be?


texts: customer custom filter is not working in customer grid admin

texts:
I added filter with custom table.i'm getting the all customers even i pass filter parameter.

backendurl/backend/customer/index/index/practitioner/22

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

       $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $practitionerId= $objectManager->get('Magento\Framework\App\RequestInterface')->getParam('practitioner');
   $table= $objectManager->get('Magento\Framework\App\ResourceConnection')->getConnection()->getTableName('patients');
    if($practitionerId){

     $this->getSelect()->joinInner(['pt'=> $table],'pt.customer_id = entity_id and pt.practitioner_id= '.$practitionerId,['patients_practitioner_id' => 'practitioner_id'])->group('main_table.entity_id');

        }
    }

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <arguments>
            <argument name="collections" xsi:type="array">
                <item name="customer_listing_data_source" xsi:type="string">MyModule\Patient\Model\ResourceModel\Customer\Grid\Collection</item>
            </argument>
        </arguments>
    </type>
</config>


texts: URGENT! Magento2 error The website with code default that was requested wasn't found

texts:
My website meets a problem. It shows error:

"0":"The website with code default that was requested wasn't found. Verify the website and try again.","1":"

I've check store,store_group, store_websites on my db table, and all is correct.

We have no idea how to fix, anyone can help this?

system: magento 2.2.8


texts: Magmi question assign products to different root category

texts:
I am uploading products through magmi, works fine but somehow he always adds my produts to my default root category, but he should add it to my second root category.

I just have the column categories with below value

rootcat2/category1/category2;;rootcat2/category2/category3


texts: Magento2 How to add(pass) Extra Fee in Authorize.net

texts: I have created a code for an extra fee of payment method and its working with all payment method except Authorize.net I have also configure with PayPal and pass the extra fee on this. I want same like create in Authorize.net. how to pass the extra fee in Authorize.net payment method.


texts: Magento 2.4 MSI - get total stock on product page

texts:
In our previous Magento version, without MSI, we used the following code to display the total qty.
$_product->getExtensionAttributes()->getStockItem()->getQty();

Sadly this does not work anymore with MSI enabled.
How can we get the total stock (Salable Quantity) on the product page?
Found this solution, but it is dirty and I do not want to use objectManager in templates:
<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $StockState = $objectManager->get('\Magento\InventorySalesApi\Api\GetProductSalableQtyInterface'); echo $StockState->execute($_product->getSku(), 6); ?>


texts: Magento 2.3 Inventory Management with Linnworks Integration Stock Levels Not Updating from Linnworks

texts:
I'm running Magento 2.3.4 and have successfully integrated it with Linnworks.  However, I believe I need to disable the inventory management in Magento 2.3 in order for the Linnworks to update the stock levels.

I am using GoDaddy as my host... is there a way to run the below solution?  if not is there a way to disable it without going on the server where Linnworks will update the inventory stock levels (which it doesn't presently)?

Your help would be most appreciated.

I've seen this answer here ( How to Disable Inventory Management In Magento 2.x ):
"You need to run below command to disable MSI modules in Magento 2.3+ versions.


texts: Redirect to dashboard page while going to cache or users page in backend after upgrade to Magento 2.2.8

texts:
After I upgraded a Magento 2.2.6 to version 2.2.8, I can not enter the Cache Management and All Users pages anymore. If I click the link in the menu I will be redirected to the dashboard page. Other pages like the Content Pages page or Products page have no problems.

Even if I place die('test') in the execute method of the controller of the page vendor/magento/module-backend/Controller/Adminhtml/Cache/Index.php it redirects to the dashboard. So it should go wrong before it hits this point in the code. But I don't know where to start debugging from there.


texts: Retrieve custom fields from customer table using SQL

texts: I have two custom fields in my customer table, namely nickname and sponsor. I would like to create an sql query to select the two custom fields that I have in the table. What kind of query should I do?


texts:
I am using Magento ver. 2.1.5
And Store View on admin configuration page is not showing like there is no option to switch store views.

Do I need to enable some setting to make it visible ?


texts: How to get global messages in compare products page, getMessagesBlock is empty

texts:
I'm trying to get global messages in compare products page, but none of the messages get rendered, instead all of them appear in any subsequent page I'm going, after producing messages with for example removing product from comparsion. I understand that this is normal behaviour for Magento, because normally compare page has a popup template, but I setTemplate to 1column.phtml in my local.xml. Now I need global messages to appear there too. I included:

<?php echo $this->getMessagesBlock()->getGroupedHtml(); ?>

to catalog/product/compare/list.phtml, but messages only appear in any subsequent page and not in compare list page.
As I found out from here, you can add custom messages. So I did

$this->getMessagesBlock()->addError('Test Error!');
echo $this->getMessagesBlock()->getGroupedHtml();

Now this custom error gets rendered as it should, but none of the other messages show. How could I get all session messages to be shown in compare page?


texts: Change button text in modal popup minicart

texts:
When I remove an item in the Minicart, a modal popup pops up. This popup has two buttons: Cancel and OK. I want to change these strings to No and Yes, but I can't find the code where the modal is triggered.

I also don't want to translate Cancel and OK to No and Yes for obvious reasons. Where can I find the source for this?


texts: Pdf-file download link doesn't work on iphone browsers

texts:
I have a page with Print button. PDF-file should be downloaded by clicking on it.
It works on all devices except iphone. Downloading link is generated correctly. But when I try to follow it, Chrome on iphone shows err_failed and Safari shows empty page.

Controller fragment:

<?php
$this->fileFactory->create(
   $filename,
  [
    'type' => 'string',
    'value' => file_get_contents($file),
    'rm' => true
  ],
  DirectoryList::VAR_DIR,
  'application/pdf'
);

Print button:

Print

How can I solve this problem?
Thank you for answers.


texts: Magento 2 .html.html issue after update from Configuration > Catalog

texts:
I am trying to remove the .html.html from Products and Categories url.

I have gone procedure with the below steps after some research on this issue.

Stap 1.

SELECT * FROM `url_rewrite` WHERE `entity_type` LIKE 'product' AND `target_path` LIKE '%.html.html%'

//Than delete all the result rows

UPDATE url_rewrite SET request_path = REPLACE(request_path, '.html.html', '.html') where entity_type="product"

SELECT * FROM `url_rewrite` WHERE `entity_type` LIKE 'category' AND `target_path` LIKE '%.html.html%'

//Than delete all the result rows

UPDATE url_rewrite SET request_path = REPLACE(request_path, '.html.html', '.html') where entity_type="category"

I have tried but when I run indexer:reindex the issue is remain same.

After that, I have go to the Magento 2 Admin -> Catalog -> SEO -> Product URL Suffix and removed the .htmlfrom field and Save Config.

I have tried but when I run cache:flush. And go to the Magento 2 Admin -> Products -> Catalog and select all the products and do Updated Attributes. When I go to the url_rewrite table and check all the URL has removed the single .html.

The issue with the new products when I create new product it's not adding the .html suffix, for that I have again go to the Magento 2 Admin -> Catalog -> SEO -> Product URL Suffix and added the .htmlin field and Save Config.

After Save Config all the products urls added again .html.html.

How I can check this issue so that the existing products has single .html and when I add new product it will add the .html suffix. Or where I can check in this in the Module:

/vendor/magento/module-catalog-url-rewrite/

Please help me out this issue.

I am still not receive any answer on this question.


texts: Magento 2 table not found after Migration

texts:
Migrated data from Magento 1.9.3.8 using the migration tool
Attempt to access or index Customers

Expected result: (*)
re-index customers or load customer tab

Actual result: (*)

  Base table or view not found: 1146 Table 'larpwarr_SSwordsMagento2.mg2_' doesn't exist, the query was: DESCRIBE
  mg2_

Prior to the migration, this was looking into the **customer_grid** table correctly, 'mg2_customer_grid' however since the migration it seems to have dropped out the 'customer_grid' part and is now looking for a non-existent table.

Any ideas why, or where this value is stored/pulled from so I can look into altering it back to what it should be?


texts: Download image for a product in magento 2

texts: We need to download an image when customer clicks download button. we have coupons for products.for every product there is a coupon associated , coupon is image and in that image coupon code is there, how can i achieve this, as the coupon is for every product , do i need to create an attribute in product level ,if so what is the type of that attribute i need to create and how can i show it on frontend so the user can download it.please guide me how to do this.


texts: Magento 2.2.4 fullpage cache settings not appearing in the backend

texts:
Can anybody say why my fullpage cache settings is not appearing?

Thanks.


texts: Show Google Analytics in Backend of Magento

texts:
Is there a way to show a google analytics dashboard in the backend of magento?
So we can see the most relevant data easy and don't have to go to google analytics itself.

HO used to have an extension for this. But they used GAPI. Which isn't supported anymore by Google.

It would be great if it could be loaded in a window in the backend.

We use Magento 1.8.1 CE


texts: Custom Attribute added for Customer Object not getting saved

texts:
I added a custom attribute to Customer and it shows on admin forms as expected. But values not getting saved upon saving the form. Bellow is patch file I used to create the attribute.

<?php
namespace Vendor\Module\Setup\Patch\Data;

use Magento\Customer\Model\Customer;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Framework\Setup\Patch\SchemaPatchInterface;
use Magento\Framework\Setup\Patch\PatchRevertableInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Eav\Setup\EavSetupFactory;

/**
* Patch is mechanism, that allows to do atomic upgrade data changes
*/
class CustomerDataPatch implements
    DataPatchInterface
{
    /**
     * @var ModuleDataSetupInterface $moduleDataSetup
     */
    private $moduleDataSetup;

    private $eavSetupFactory;

    private $eavConfig;

    /**
     * @param ModuleDataSetupInterface $moduleDataSetup
     * @param EavSetupFactory $eavSetupFactory
     * @param \Magento\Eav\Model\Config $eavConfig
     */
    public function __construct(
        ModuleDataSetupInterface $moduleDataSetup,
        EavSetupFactory $eavSetupFactory,
        \Magento\Eav\Model\Config $eavConfig
    ) {
        $this->moduleDataSetup = $moduleDataSetup;
        $this->eavSetupFactory = $eavSetupFactory;
        $this->eavConfig = $eavConfig;
    }

    /**
     * Do Upgrade
     *
     * @return void
     */
    public function apply()
    {
        $eavSetup = $this->eavSetupFactory->create();

        $eavSetup->addAttribute(
            Customer::ENTITY,
            'customer_agreement_end_date',
            [
                'type' => 'static',
                'label' => 'Aggrement End Date',
                'input' => 'date',
                'sort_order'   => 20,
                'frontend' => \Magento\Eav\Model\Entity\Attribute\Frontend\Datetime::class,
                'backend' => \Magento\Eav\Model\Entity\Attribute\Backend\Datetime::class,
                'global' => 1,
                'visible' => true,
                'required' => false,
                'system' => false,
                'visible_on_front' => true,
                'unique' => false,
                'group' => 'General',
                'input_filter' => 'date',
                'position' => 20,
                'validate_rules' => '{"input_validation":"date"}',
                'note' => 'End date of the aggrement',
            ]
        );

        $customAttribute = $this->eavConfig->getAttribute(Customer::ENTITY,'customer_agreement_end_date');
        $customAttribute->setData(
            'used_in_forms',
            [
                'adminhtml_customer_address',
                'customer_address_edit'
            ]
        );

        $customAttribute->save();
    }

    /**
     * {@inheritdoc}
     */
    public function getAliases()
    {
        return [];
    }

    /**
     * {@inheritdoc}
     */
    public static function getDependencies()
    {
        return [

        ];
    }
}

Bellow is the database record created in eav_attribute table. I have got dob field (which comes from default Magento) as well for comparison.

The element is visible in Customer edit form in magento admin. But for some reason, values are not getting saved when I saving the customer. I expect the attribute value be saved upon saving the customer, without any observer or plugin code and Magento handles it itself. Please correct me if I'm wrong or please show me what I have done wrong. Thanks in advance.


texts:
I have created custom mail template and successfully send mail to the customer upon order complete.

I created new mail template from admin based on the custom one I added in code, to let the marketing team edit the mail and change style.

Now I need to get marketing team changes using the new template name but it gives error this mail template not found when I do

  $transport = $transportBuilder->setTemplateIdentifier('custom_email_template');

  Error: Email template 'custom_email_template' is not defined

Can I use the ID instead and how to set fall back if the template was deleted to send the template base file in my custom module?

Another query how to get the mail template preview in code as html string?

Thanks in advance.


texts: Magento 2: Backend Related, Upp-Sell and Cross-Sell Product Tab Filter Issue

texts: When I filter Product By Name in related product tab product filter Working Completed, but without product add called save function directly and page redirect to the Catalogue page.Any idea,please Help me.


texts: How to get Account management and Cart section only in Products page

texts: I want to show account management and cart section only in products page I removed it showing in other pages using header.phtml now I want it in products page ONLY please help me in doing this.


texts: Module that adds code snippet to every page on frontend

texts:
I'm working on a module for Magento 2, it's my first time writing a Magento module and I feel like there is something very basic I somehow fail to understand, I'm trying to add a code snippet to every page on the frontend, the code snippet is using data from the backend so I can't just add the script in default_head_blocks.xml, it has to be a PHTML file, but either I'm placing the file in the wrong location or not calling it correctly, I just can't seem to get anything printed on the screen, how can I achieve this?

All I want is to print a code snippet to the header of every page on the frontend, an example that adds

<script> alert(1); </script>

would be great help.

Pretty new to this Magento thing so any help, tip or advice will be welcome.


texts:
I want to add new field in my payment method. I have added the field in phtml file in module but now I want to rewrite the file in my module. How can I achieve that??
Also let me know how to rewrite JS file?


texts: Magento 2 External URL button in admin order

texts:
I made a custom button in sales->orders.

Which should direct to another external url(www.google.com).
In my app/code/vendor/module/Block/Adminhtml/Sales i have: CustomButton.php
<?php
namespace Vendor\Module\Block\Adminhtml\Sales;

use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
use Magento\Backend\Block\Widget\Context;
use Magento\Framework\AuthorizationInterface;

class CustomButton implements ButtonProviderInterface
{
    /**
     * @var AuthorizationInterface
     */
    private $authorization;

    /**
     * @var Context
     */
    private $context;

    /**
     * CustomButton constructor.
     *
     * @param AuthorizationInterface $authorization
     * @param Context $context
     */
    public function __construct(
        AuthorizationInterface $authorization,
        Context $context
    ) {
        $this->authorization = $authorization;
        $this->context = $context;
    }

    /**
     * @return array
     */
    public function getButtonData()
    {

        return [
            'label' => __('Custom Button'),
            'on_click' => sprintf("location.href = '%s';", $this->getBackUrl()),
            'class' => 'primary',
            'sort_order' => 10
        ];
    }

    /**
     * Get URL for back (reset) button
     *
     * @return string
     */
    public function getBackUrl()
    {
        return $this->context->getUrlBuilder()->getUrl('www.google.com', []);
    }
}

and in view/adminhtml/ui_component i have sales_order_grid.xml
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <settings>
        <buttons>
            <button name="CustomButton" class="Vendor\Module\Block\Adminhtml\Sales\CustomButton"/>
        </buttons>
    </settings>
</listing>

When i click the custom button to go www.google.com i get:

Could use some pointers on how to achive this.


texts: Magento V1.9 one page checkout not displaying credit card form - Rest ksort error

texts:
I'm having a few issues after upgrading to 1.9.2.2

When going through the checkout process when I get to payment method and select Credit Card no form appears.
If I click Continue then I get a popup saying Expiration date is wrong.

I also have 2 paypal errors (10001 and 10002), but will post them in a separate question.

Ultimo Theme (latest)
Same problem when I switched to default theme.

Payment Methods > Paypal Standard/Express and Authorize.net both enabled
Live API credentials in place
Sandbox/Testing = off.
System > Advanced = all enabled expect Moneybookers and Google Checkout.

System log error

ERR (3): Warning: ksort() expects parameter 1 to be array, boolean given  in .../downloader/lib/Mage/Connect/Rest.php on line 240

The section of the Rest.php is

$out = array();
        foreach ($return as $name=>$package) {
            $stabilities = array_map(array($this, 'shortStateToLong'), array_keys($package));
            $versions = array_map('trim', array_values($package));
            $package = array_combine($versions, $stabilities);
            ksort($package);
            $out[$name] = $package;
        }
        return $out;

Any ideas? This is a live site for a client and I really need to get it live again asap.


texts: Magento 2 Exported file format Doesn't work for "configurable_variations" field when import

texts:
I have installed Magento 2.1.3 with sample data, and export one configurable product with attribute size and color.

Next, I change necessary fields and import this file but product imported with the only size attribute color attribute not come.

By manually fixing the data I got import to work.

The export I got as below

sku=TEST-CONFIG-1-Blue-Small,size=Small|
sku=TEST-CONFIG-1-Blue-Medium,size=Medium|
sku=TEST-CONFIG-1-Orange-Small,size=Small|
sku=TEST-CONFIG-1-Orange-Medium,size=Medium

The export I wanted

sku=TEST-CONFIG-1-Blue-Small,color=Blue,size=Small|
sku=TEST-CONFIG-1-Blue-Medium,color=Blue,size=Medium|
sku=TEST-CONFIG-1-Orange-Small,color=Orange,size=Small|
sku=TEST-CONFIG-1-Orange-Medium,color=Orange,size=Medium

It is looking like Magento 2 bug.

Has anyone a solution for the same?


texts: Magento 2: Invoice PDF Can't Complete Download on Customer End "Failed - Network Error"

texts:
I have an extension by MageSpaceX that creates PDFs for Invoice/Order PDF. It works fine on the Admin End, I can hit "Print PDF", and it generates it perfectly. Downloads it, and I can do whatever I want with it as an admin.

But when I login on the customer-end and go to Order History, open the same order, and hit "Print Custom PDF" under Invoice, a new window opens, a download starts for the same PDF I was able to see on the admin side of things, but it keeps "downloading", it's a 53KB file, until it times out and states "Failed - Network Error" on Chrome and "Failed" on Safari. This has happened 20+ times, and it always works on the Admin end.

Does anyone have any ideas of the cause, and perhaps a fix for this? In Chrome, before the item times out, if I change the "incomplete file" to .pdf from .part, the file is fine. It opens perfectly. Something is just not letting chrome "finish" the download.


texts: How to move UPSELL block on product page?

texts:
All I want to do is moving the UPSELL block upwards on the Product Page so it will be displayed above the Reviews section.
I already can make it disappear just can't move it upwards whatever I do.
I was trying to modify the local.xml file.

Any help would be appreciated.


texts: Slow loading Category Page Magento 2.4.0

texts:
I am experiencing slow loading Category Pages using Magento 2.4.0. We have 27,000 products of which approximately 6,000 are for the Magento website.  The other 21,000+ are for eBay and Amazon. Normal load time for a Category page with 5,000+ products is less than 2 seconds.  Long load time for the same page can be 10+ seconds.  I have found that I can make the Category Page load normally again if I reindex these six indexes and then clearing any Invalidated Cache files (usually Page Cache will be invalidated after a reindex).

Category Products
Product Categories
Catalog Rule Product
Product EAV
Catalog Product Rule
Product Price

I must check our website for slow loading Category Pages every couple of hours.  I must reindex those 6 Product Indexes 3 or 4 times every day.  I have not been able to find an error in the logs when this happens.  And I have not been able to identify the cause.  Any ideas will be greatly appreciated.
The website is hillcountrycustomcycles.com.  We push a lot of graphics so the first page will take a couple of seconds to load. But after the initial load, the site should load quickly.


texts: Undefined Variable: Error in /Shipping/Model/Carrier/Ups.php on line 574

texts:
Today, on our live website, we encountered an issue around 10:00 AM CDT where our orders where not getting quotes from UPS, and to contact our office. Upon digging into the issue, and turning on logging (System > Configuration > Developer > Logging) we're getting this error being thrown:

ERR (3): Notice: Undefined variable: error in /var/www/html/website.com/app/code/local/SITE/Shipping/Model/Carrier/Ups.php on line 574.

When we start digging into these files, this line reads:

if(!$error instanceof Mage_Shipping_Model_Rate_Result_Error) {

Digging deeper, we find the Mage_Shipping_Model_Rate_Result_Error class in app\code\core\Mage\Shipping\Model\Rate\Result\Error.php:

class Mage_Shipping_Model_Rate_Result_Error extends Mage_Shipping_Model_Rate_Result_Abstract
{

public function getErrorMessage()
{
    if (!$this->getData('error_message')) {
        $this->setData('error_message', Mage::helper('shipping')->__('This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.'));
    }
    return $this->getData('error_message');
    }
}

I can't for the life of me, nor my colleagues, find our "undefined" variable.

Admittedly, I am a Magento n00b, but understand the basics, HTML, PHP, CSS, etc., so I'm sure I can work through any answers provided.

Thank you in advance for your time and help in solving this problem.


texts: Magento 1 how to get radio button value at payment method?

texts:
I have a custom payment with custom block and added two radio buttons

            <input type="radio" name=payment["opts"] value="global" checked>
            option 1

            <input type="radio" name=payment["opts"] value="local">
            option 2

but how do I get the options value inside the controller or block?


texts: In static block call .phtml file for specific product id

texts:
I have a template which uses banners on the homepage,these banners get filled by a static block like the following:

Product ABC

$99,99

            Buy Now

This is static however as I need to put in the image and write down the product name and so on by hand. What I would like to to from the stativ block is something like this:

    {{block type="core/template" name="product_id" pid="1" template="myfolder/product_id.phtml"}}

And then have a .phtml file where I get the product ID from the static block as follows:

<?php echo $this->getPid();?>

and then create the input for the banner there, so that I can just change the pid in the static block, because as far as I know I cannot get the image, product price and name of a product and URL in a static block or not?

UPDATE

I also would need to pass on a flag to the template file to differentiate between two types of products and the URL


texts: Getting ordered product list in invoice grid magento 2.3.2

texts:
I customised sales_invoice_grid section by adding some more fields.Telephone,city,state,country and products. How to get ordered product list by joining table.
app\code\Magento\Sales\Model\ResourceModel\Order\Invoice\Grid\Collection.php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

namespace Magento\Sales\Model\ResourceModel\Order\Invoice\Grid;

use Magento\Framework\Data\Collection\Db\FetchStrategyInterface as FetchStrategy;
use Magento\Framework\Data\Collection\EntityFactoryInterface as EntityFactory;
use Magento\Framework\Event\ManagerInterface as EventManager;
use Magento\Sales\Ui\Component\DataProvider\Document;
use Psr\Log\LoggerInterface as Logger;

class Collection extends \Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult
{
    /**
     * @inheritdoc
     */
    protected $document = Document::class;

    /**
     * Initialize dependencies.
     *
     * @param EntityFactory $entityFactory
     * @param Logger $logger
     * @param FetchStrategy $fetchStrategy
     * @param EventManager $eventManager
     * @param string $mainTable
     * @param string $resourceModel
     */
    public function __construct(
        EntityFactory $entityFactory,
        Logger $logger,
        FetchStrategy $fetchStrategy,
        EventManager $eventManager,
        $mainTable = 'sales_invoice_grid',
        $resourceModel = \Magento\Sales\Model\ResourceModel\Order\Invoice::class
    ) {
        parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $mainTable, $resourceModel);
    }

     protected function _renderFiltersBefore()
    {
    $joinTable = $this->getTable('sales_order_address');

   $this->getSelect()->joinLeft($joinTable, "main_table.order_id =
{$joinTable}.parent_id AND {$joinTable}.address_type = 'billing'",
  ['telephone','city','region','country_id']);

       parent::_renderFiltersBefore();
   }

}

This is the code. How to do this by joining which table. can you show the joining code?


texts: How to set height and width for image in Adminhtml grids in magento 2

texts:
I added a custom image field to magento2 adminhtml grid by following code.

$fieldset->addField(
    'diagram',
    'image',
    [
        'name' => 'diagram',
        'label' => __('Diagram'),
        'title' => __('Diagram'),
        'required' => true,
        'header' => __('Image'),
        'index' => 'diagram',
        'disabled' => $isElementDisabled
    ]
);

It renders the image with height and width if 22 px. now how could I set height and width to the image.


texts:
I'm trying to include Firebase in my website, so I decided to include the dependencies through requirejs. Thing is requirejs can't find my files for some reason.

What I first tried was to load the cdn directly with path:

//app/code/Vendor/Module/view/frontend/web/requirejs-config.js
paths: {
    firebase_app: 'https://www.gstatic.com/firebasejs/7.14.5/firebase-app.js',
    firebase_analytics: 'https://www.gstatic.com/firebasejs/7.14.5/firebase-analytics.js'
}

And then require it

//app/code/Vendor/Module/view/frontend/templates/myTemplate.phtml
<script>
require([
    'jquery',
    'firebase_app',
    'firebase_analytics'
], function ($, firebase, analytics) {

    const firebaseConfig = {
        ...
    };
    // Initialize Firebase
    firebase.initializeApp(firebaseConfig);
    firebase.analytics();
});
</script>

but this just adds an extra .js at the end of the url for some reason:

require.js:1895 GET https://www.gstatic.com/firebasejs/7.14.5/firebase-app.js.js net::ERR_ABORTED 404

So I tried to remove the file extension in the url, but then requirejs looks for the file inside my project folder ?

GET http://siteurl.com/pub/static/frontend/Vendor/Theme/fr_FR/@firebase/app.js net::ERR_ABORTED 404 (Not Found)

I then tried to download the files and place them inside my module directory, under app/code/Vendor/Module/view/frontend/web/js/lib, but I end up with the same results. The one thing I noticed is that the file url seems normal ONLY WHEN the file does not exist:

Correct path

//app/code/Vendor/Module/view/frontend/web/requirejs-config.js
var config = {

    paths: {
        firebase_app: 'Vendor_Module/js/lib/firebase-app',
        firebase_analytics: 'Vendor_Module/js/lib/firebase-analytics'
    }
};

//result
GET http://site_url/pub/static/frontend/Vendor/Theme/fr_FR/@firebase/app.js net::ERR_ABORTED 404 (Not Found)

Wrong path

//app/code/Vendor/Module/view/frontend/web/requirejs-config.js
var config = {

    paths: {
        firebase_app: 'Vendor_Module/js/lib/firebase-apppp', //does not exist
        firebase_analytics: 'Vendor_Module/js/lib/firebase-analytics'
    }
};

//result
require.js:1895 GET http://siteurl.com/pub/static/frontend/Vendor/Theme/fr_FR/Vendor_Module/js/lib/firebase-apppp.js net::ERR_ABORTED 404 (Not Found)
//actual directory ???

What am I doing wrong ?


texts: How to programmatically add a "region" to the "addresInformation" on the page of the "checkout" when ordering?

texts:
In my module, I add custom drop-down lists with states, cities and postal codes. Everything works well, but as soon as I select the US from the "Country" list, the data for "shippingAddress" and "billingAddress" change and "region" disappear.
Can you please tell us how you can programmatically add "region" when placing an order?


texts: M1 Error when adding products to website using Mage_Catalog_Model_Product_Website addProducts($websiteIds, $productIds)

texts:
I am trying to add products to a website using addProducts($websiteIds, $productIds). I have debugged the passed data and it looks fine (see below). The error we encounter is below.
What are we doing wrong here?
And it seems to error almost at random, sometimes when we update website 1 next time it is website 3 that results in an error
Maybe of interest, because of this error we introduced a stepped/sliced approach because this did seem to solve it temporarily.
Walk over array and update in steps to reduce the errors
* Function to execute filtering on collection
*/
function addProductsFunction($website, $ids) {

    $j =0;
    $slicesize = 10; // set the step value (in your case it will 100.)
    $steps = ceil(count($ids)/$slicesize);
    for($i = 0 ;$i<$steps;$i++) {
        $b = array_slice($ids, $j, $slicesize);
        $j = $j+$slicesize; // increment counter by to step position.
        Mage::getModel('catalog/product_website')->addProducts(array($website), $b);
    }
}

The original error
Fatal error: Uncaught Mage_Core_Exception: An error occurred while adding products to websites. in app/Mage.php:657
Stack trace:
#0 app/code/core/Mage/Catalog/Model/Product/Website.php(94): Mage::throwException('An error occurr...')
#1 cs/cronscripts/update_websites_membership.php(195): Mage_Catalog_Model_Product_Website->addProducts(Array, Array)
#2 cs/cronscripts/update_websites_membership.php(169): addProductsFunction(9, Array)
#3 cs/cronscripts/update_websites_membership.php(66): AddtoWebsites(Object(Mage_Catalog_Model_Resource_Product_Collection), 9, false, NULL, 'Start update at...')
#4 {main}
  thrown in app/Mage.php on line 657

addProducts functions
/**
 * Add products to websites
 *
 * @param array $websiteIds
 * @param array $productIds
 * @return $this
 */
public function addProducts($websiteIds, $productIds)
{
    try {
        $this->_getResource()->addProducts($websiteIds, $productIds);
    } catch (Exception $e) {

        Mage::throwException(
            Mage::helper('catalog')->__('An error occurred while adding products to websites.')
        );
    }
    return $this;
}

the array data we are passing
website id array(1) {
  [0]=>
  int(9)
}
product ids array(20) {
  [0]=>
  string(6) "115430"
  [1]=>
  string(6) "115431"
  [2]=>
  string(6) "115432"
  [3]=>
  string(6) "115433"
  [4]=>
  string(6) "115434"
  [5]=>
  string(6) "115430"
  [6]=>
  string(6) "115431"
  [7]=>
  string(6) "115432"
  [8]=>
  string(6) "115433"
  [9]=>
  string(6) "115435"
  [10]=>
  string(6) "115436"
  [11]=>
  string(6) "115437"
  [12]=>
  string(6) "115438"
  [13]=>
  string(6) "115439"
  [14]=>
  string(6) "115435"
  [15]=>
  string(6) "115436"
  [16]=>
  string(6) "115437"
  [17]=>
  string(6) "115438"
  [18]=>
  string(6) "115440"
  [19]=>
  string(6) "115441"
}


texts: Magento 1 : where is the responsible files for "Gift cards,Store Credit" in Sales > Order > Reorder > Order Total section?

texts:
I am trying to display the highlighted values into (values with base currency)
like US $0.00
I have checked this file-
app/design/adminhtml/default/default/template/sales/order/totals/default.phtml

But
I am not getting from where these values are appearing from using the above file?

Any thoughts ?


texts: Shipping method restrictions by category programmatically magento 2

texts: I want to add Shipping method restrictions by specific category in custom shipping method


texts: How to hide particular admin form field(UI Component) based on the value of select field?

texts:
I used the following script to hide/show 'schedule_date' based on select field option change, and it is working fine. But I want to hide/display the fields without changing the select field options.

define([
    'underscore',
    'uiRegistry',
    'Magento_Ui/js/form/element/select',
    'Magento_Ui/js/modal/modal'
], function (_, uiRegistry, select, modal) {
    'use strict';

    return select.extend({

        /**
         * On value change handler.
         *
         * @param {String} value
         */
         onUpdate: function (value) {

            var sdate = uiRegistry.get('index = schedule_date');

            if(value==1){

                sdate.show();
            } else {
                sdate.hide();
            }

            return this._super();
        }
    });
});


texts: Cron configuration without SSH - Magento 1.9.2.4

texts:
I'm trying to setup the cronjobs execution as I recently noted issues with the order mails not being sent due to the latest updates of Magento with mail handling.
Specifically, I was trying to get the AOE Scheduler module working, which requires these configurations to be added on the crontab on the server:

My problem is that I have no SSH access. My hosting admin panel offers though a way to execute periodically some URL.

Is there a way to get the cronjobs working through PHP?


texts: Fail to import large file on Magento 2 from admin

texts: I succeeded importing a csv file size 319KB with 357 products.  But failed to import a csv file size 571KB with only 349 products.   Please help me to fix the problem.


texts:
My problem:
I insert the product from management software into magento.
The problem is here:

->setStoreId(1)
->setWebsiteIds(array(1))

I have:
1 web site (id:1)
1 store (id:1)
3 view (id 1, 2, 3)

if i use

->setStoreId(1)
->setWebsiteIds(array(1))

I update only the view the view 1 but not upgrade the other view or store.

if i want update or insert product into main web site(global, what should I enter??

Thanks a lot

Alessandro


texts: Magento2 + modal confirmation popup after page load

texts: I want to open modal confirmation dialogue and based on that I'm operating some database operation as my need. So please suggest me the best way to open modal confirmation popup that should work even varnish cache or any cache is there.


texts: Static block not showing in left column of CMS page

texts:
I have a CMS page with Page layout of '2 columns with left bar'.  I'd like to display a static block within the left column of this page, however, i'm running into some difficulties.

In the Layout Update XML I'm inserting the following code:

This does not show up:

<reference name="left">
<block type="cms/block" name="cms_badges">
<action method="setBlockId"><block_id>cms_thing_badges</block_id></action>
</block>
</reference>

This, however, does:

<reference name="content">
<block type="cms/block" name="cms_badges">
<action method="setBlockId"><block_id>cms_thing_badges</block_id></action>
</block>
</reference>

Why is this and how can I fix it?


texts: Magento 2 : Change product price when enter value in custom textbox

texts:
I added one custom textbox in product view page. Now, I want to do like when add any text it should be calculate price and update product price.

and when I leave empty textbox it should be restore by default product price.

In Image, It's custom options. But, I want to do with custom textbox without custom options.

How to do that?

Please help me.

Thanks.


texts:
I installed magento 2.4.0 on sheared hosting with 1 click installation.
I understand that Magento 2.4.0 needs Elasticsearch to operate properly and I have set up an instance with AWS and I'm now trying and failing to configure my magento installation to connect to it.
I've entered the credentials into the back end but I'm still getting an error message about no active nodes on my cluster


texts: Owl carousel not working on product details page in Magento2

texts: I have used owl carousel for related products in magento2.1.8. It is working fine for desktop and iPad but not working on mobile. On mobile view product base image not display and owl carousel takes large width. If I remove owl carousel base image is coming and remaining page is working fine without scroll.


texts: Separating wishlist and compare on category pages

texts:
I'm working in catalog_category_view.xml and Magento_Catalog/templates/product/list.phtml, trying to move the "Add to Wishlist" button to the top of each product item while keeping the compare button with Add to Cart.

How might I accomplish this? I can reposition them as a pair (by getting the 'addto' child block, but I've been unable to render them independently.


texts: Display Custom CMS Fields in Magento 2 Template

texts:
I'm can't seem to find any documentation on how to get custom CMS fields in a PHTML template in Magento2. The following snippet did it in Magento2:
Mage::getBlockSingleton('cms/page')->getPage()->getContentCustom()

What is the Magento 2 equivalent?
(the custom fields have already been added to the admin page and are writing to the database.


texts: "Shipping address is not set" error when saving cart

texts:
I have a simple code, where i add a simple product to the cart

  $cart = $obj->get('\Magento\Checkout\Model\Cart');
  $cart->addProduct(5, 3);
  $cart->save();

but the last row, returns this error:
Fatal error: Uncaught Magento\Framework\Exception\StateException: Shipping address is not set

Why is necessary to add a shipping address to save the cart?

How i can add an address programmatically?


texts: Magento2.3: How to send a file to another server?

texts:
I have a requirement that is sending the customer details like their
  wish-list details, address, names, etc., to another server(I have all
  the credentials for that server with me). I want to send that file via
  admin panel so that admin can send it by one click.

  In order to do that, what are the things I have to do in Magento 2?

  Could anyone please help me with this?

  Your help will be greatly appreciated.


texts: How to add custom tab on home page to track order?

texts: I need to add 'track your order' tab in home page that will be visible to all but only logged in customer can use to track orders?


texts:
I want to upgrade magento 2 jQuery version from 1.9 to 3

do you think is an good idea?
how i do it for upgrade jquery build-in file who come with magento 2 ?


texts: Module showing up twice on the configuration page

texts:
So I am creating a block extension on a community module. Its a simple one line change and I thought i did everything right. However, i went to the advanced configuration page and it shows up twice in the list. I can't figure out why.

Here is my code:

app/etc/modules/Blizzardlabs_Affiliateplusext.xml
<config>
    <modules>
        <Blizzardlabs_Affiliateplusext>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
              <Magestore_Affiliatepluscoupon />
            </depends>
        </Blizzardlabs_Affiliateplusext>
    </modules>
</config>


texts: Magento 2.3.3 Incompatible argument type

texts:
Interception cache generation... 6/7 [========================>---]  85% 50 secs 351.0 MiBErrors during compilation:

  Vendor\Module\Model\ResourceModel\Brand\Collection
          Incompatible argument type: Required type:
          \Magento\Framework\DB\Adapter\AdapterInterface. Actual type:
          \Magento\Framework\Model\ResourceModel\Db\AbstractDb; File:
      /var/www/html/app/code/Vendor/Module/Model/ResourceModel/Brand/Collection.php

Total Errors Count: 1

In Log.php line 92: Error during compilation

setup:di:compile
 [] []

<?php

namespace Vendor\Module\Model\ResourceModel\Brand;

 class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection {
/**
 * store view id
 * @var int
 */
protected $_storeViewId = null;

/**
 * @var \Magento\Store\Model\StoreManagerInterface
 */
protected $_storeManager;

protected $_addedTable = [];

protected function _construct() {
    $this->_init('Vendor\Module\Model\Brand', 'Vendor\Module\Model\ResourceModel\Brand');
}

/**
 * @param \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory
 * @param \Psr\Log\LoggerInterface $logger
 * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
 * @param \Magento\Framework\Event\ManagerInterface $eventManager
 * @param \Zend_Db_Adapter_Abstract $connection
 * @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
 */
public function __construct(
    \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory,
    \Psr\Log\LoggerInterface $logger,
    \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
    \Magento\Framework\Event\ManagerInterface $eventManager,
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    $connection = null,
    \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
) {
    parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection);
    $this->_storeManager = $storeManager;

    if ($storeViewId = $this->_storeManager->getStore()->getId()) {
        $this->_storeViewId = $storeViewId;
    }
}

/**
 * get store view id
 * @return int [description]
 */
public function getStoreViewId() {
    return $this->_storeViewId;
}

/**
 * set store view id
 * @param int $storeViewId [description]
 */
public function setStoreViewId($storeViewId) {
    $this->_storeViewId = $storeViewId;
    return $this;
}

/**
 * Multi store view
 * @param string|array $field
 * @param null|string|array $condition
 */
public function addFieldToFilter($field, $condition = null) {
    $attributes = array(
        'name',
        'status',
        'click_url',
        'image_alt',
        'store_id',
    );
    $storeViewId = $this->getStoreViewId();
    if (in_array($field, $attributes) && $storeViewId) {
        if (!in_array($field, $this->_addedTable)) {
            $this->getSelect();
            $this->_addedTable[] = $field;
        }
        // return parent::addFieldToFilter("IF($field.value IS NULL, main_table.$field, $field.value)", $condition);
        return parent::addFieldToFilter($field, $condition);
    }
    if ($field == 'store_id') {
        $field = 'main_table.brand_id';
    }
    return parent::addFieldToFilter($field, $condition);
}

/**
 * Multi store view
 */
protected function _afterLoad() {
    parent::_afterLoad();
    if ($storeViewId = $this->getStoreViewId()) {
        foreach ($this->_items as $item) {
            $item->setStoreViewId($storeViewId)->getStoreViewValue();
        }
    }
    return $this;
}

/**
 * set order random by brand id
 *
 * @return $this
 */
public function setOrderByBrand()
{
    $this->getSelect()->order('order');

    return $this;
}

}


texts: Magento 2 Customer address attribute not saved while creating new order from admin

texts:
I have created one "Customer address" type of attribute name "Suburb", It successfully created.

It shows on Checkout, Customer create(admin) and Create New Order address(Admin) section, While It works fine with checkout as well as create customer but not working with Create new order.

Here install script:

$customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

            $customerSetup->addAttribute('customer_address', 'suburb', [
                'label' => 'Suburb',
                'input' => 'text',
                'type' => 'varchar',
                'source' => '',
                'required' => true,
                'position' => 70,
                'visible' => true,
                'system' => false,
                'is_used_in_grid' => false,
                'is_visible_in_grid' => false,
                'is_filterable_in_grid' => false,
                'is_searchable_in_grid' => false,
                'backend' => ''
            ]);

            $attribute = $customerSetup->getEavConfig()->getAttribute('customer_address', 'suburb')
                ->addData(['used_in_forms' => [
                    'adminhtml_customer_address',
                    'customer_address_edit',
                    'customer_register_address'
                ]]);
            $attribute->save();

I tried to create new Order and fill all required data including Suburb.

But when I tried to Submit Order It shows me error 'Suburb`  is a required value. It's shown that filled value of suburb is not being saved too.

Please help, Any suggestions would be appreciated. Thank you.


texts: Add tracking link to shipment email doesn't work

texts:
I've implemented the tracking block in

  System -> Configuration -> Sales Emails -> Shipment -> Shipment Email
  Template

{{layout handle="sales_email_order_shipment_items" shipment=$shipment order=$order}}
{{block type='core/template' area='frontend' template='email/order/shipment/track.phtml' shipment=$shipment order=$order}}

Now I want to trigger the email by calling
    Mage_Core_Model_Email_Template::sendTransactional()
 in my code.

But this doesn't work, the tracking information will not show up. I'm wondering if I also have to set the $shipment and $order parameter but sendTransactional() doesn't come with these parameter.

The email template will be used - I've already checked this.

Any ideas? Thank you very much!


texts: Magento 2 sitemap wrong paths in sitemap index when running on cron

texts:
I am using Magento 2.2.2.
Please see below the current settings of the sitemap.

It works correctly when we create sitemap by hitting generate button in admin. But when it gets generated automatically using cron it shows /public_html/ in sitemap index for sub-sitemaps, please see below image, its sitemap.xml

Thank you


texts: Magento 2.1:- Create Plugin but not working in custom module

texts:
I create plugin in my custom module to override the method collectCarrierRates($carrierCode, $request), below code is not working.
What mistake here?

app/code/Vendor/Shippingtest/etc/frontend/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Shipping\Model\Shipping">
        <plugin name="vendor-shippingtest-test"
                type="Vendor\Shippingtest\Plugin\Test"
                sortOrder="10"/>
    </type>
</config>

app/code/Vendor/Shippingtest/Plugin/Test.php

<?php

namespace Vendor\Shippingtest\Plugin;

class Test
{
    public function after(Magento\Shipping\Model\Shipping $subject, $result)
    {
        echo "Calling";
    }
}


texts: Order email sent to customer but not admin

texts:
When an order is placed, the order is sent to the customer and BCC'ed to the webmaster (different domain than the website) but the order is never received by the store admin (same domain as the website).

I checked the database core_email_queue and core_email_queue_recipients tables and see the messages and recipients there. They are not being deleted after the messages are sent.

Can anyone help me figure out why the message is not sent to the admin and why messages are not being deleted from the database? The store version is 1.9.2.3.


texts: How do I sort a product collection by custom product attribute on a category landing page?

texts:
I'm trying to sort a product collection by custom product attribute on a category landing page - the attribute is a number that corresponds to a number on an exploded view image.

at the top of the product listing block we have this:

$_productCollection = $this->getLoadedProductCollection();

which would seem to indicate that the product collection for the current category has already been loaded by something else. but I don't see that happening in either the template or parent block.

How can I replace the $_productCollection with a collection of products from the current category sorted by my custom product attribute "getexploded_view_ref"


texts: Don't charge tax to certain countries but still charge full price

texts:
My client has a bit of a situation with his tax...

Problem

He charges tax at 20% to all EU countries and this tax is included in his catalogue prices.

He doesn't charge tax to all other countries, but he would still like to charge the full price of his catalogue. However due to how the rules are set up, if a country is not tax applicable then it will deduct the tax amount from the price.

My Idea

My current idea is to force a store view change if certain countries are selected as the billing address during checkout. This store view will then have no tax class selected on the products.

I could potentially do this by intercepting the 'Place Order' script and programmatically setting the store view.

Does anybody know if there are any extensions or existing code snippets that will help me enable this?


texts: magento 2 Shipping modules does not update rate on zip code changes

texts:
I got the issue.
When i am enabling default shipping module with my custom shipping module, it is refreshing the shipping section.
But when i am enabling only my custom shipping code, it is not getting refreshed when i am changing pincode.

Is there any update for this issues.


texts: Magento 2.1 Load Product By ID and Change SKU Programmatically

texts:
I used a third party service to transfer products from woocommerce to magento, but many of the products don't have SKUs.

I attempted to do this using a CSV file containing a column of IDs and a column of SKUS. Help me make this happen.

<?php
umask(0);
if (($handle = fopen("skus.csv", "r")) !== FALSE) {
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $product_id = $data[0];
        $newsku = $data[1];
        $product = $objectManager->get('Magento\Catalog\Model\Product')->load($product_id);
        if($product) {
        echo 'working';
            $product->setSku($newsku);
            $product->save();
            echo  $product->getName() . ' SKU updated';
            echo "\n";
            }
    }
}
?>


texts: Conditional statement if attribute set id is

texts:
I know there are many ways to do things in Magento, could someone explain to be the best approach to show an asset within a product page if the attribute set ID matches?

I have used this before for a product attribute, but do not understand how to fetch and match an attribute set ID?

<?php if ($_product->getAttributeText ('bogof') == "Yes"): ?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('')->toHtml() ?>
<?php endif; ?>

Thank you


texts: Combine Layered Navigation and search by name

texts:
I am trying to add a searchbox on my category pages that my users can use to filter (by name) the products in category that they are looking at. It should also work with already existing filters that's already supported by Layered Navigation.
I've tried using a plugin and hooking into afterGetProductCollection, but it doesn't work. Here's what I've tried:
di.xml:
<type name="Magento\Catalog\Model\Layer">
    <plugin name="LayerPlugin" type="Vendor\Module\Model\Plugin\Layer"/>
</type>

Layer.php
public function afterGetProductCollection($subject, $collection)
{
    $search = $this->request->getParam('q');
    if ($search) {
        $collection->addAttributeToFilter('name', ['like' => '%' . $search . '%']);
        $collection->getSize();
    }

    return $collection;
}

If I don't include $collection->getSize() it seems to only filter on the first page.
There's a few things that still doesn't work even after adding the getSize statement though:

I am forever stuck on page 1 - is impossible for me to navigate to further even when setting the page number directly in the URL.
The last page number is incorrectly calculated in the pager.

Thank you


texts: Face issue to get data from sales_order_tax_item table

texts:
I am facing issue to get data from sales_order_tax_item table from checkout_submit_all_after event when place order using guest customer but for register customer, it works well.

When I try to get data from sales_order_tax_item table for the guest customer order at that time entry is not there in that table but for the register, user same code works well.

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $resource = $objectManager->create('Magento\Framework\App\ResourceConnection');
    $write = $resource->getConnection('default');
    $order = $observer->getEvent()->getData('order');
    $table = $resource->getTableName('sales_order_tax_item');
    $items = $order->getAllItems();
    foreach ($items as $key => $item) {
        $itemId = $item->getId();
        $taxItems = $write->query("SELECT * FROM " . $table . " WHERE item_id='" . $itemId . "'")->fetchAll();

    }

I have also add log in Magento\Tax\Model\Plugin\OrderSave.php after this statement. But I am getting an empty result for guest customer.

 $taxItem = $this->taxItemFactory->create();
 $taxItem->setData($data)->save();


texts:
I want to backup and restore only important data from database.

Do you which tables are must have or any other idea how to restore?

Thank you


texts: Magento Migrate only, really only customers data?

texts:
is there somebody out there having a working solution for migrating only customer data (name, addresses, city, birthday etc.) from 1.9.3.7 to 2.3.5?
I tried all possible solutions mentioned in other questions here, but none of them worked. EIther nothing imported or not only customers data.
I did aslo not find a real good explanation about the use of mapping files.
So, I am a little bit frustrated and as well, I do not really want to pay 400$ for module doing it (maybe).
So, does somebody have the working solutions and could provide this?
Best regards,
Chequille


texts: Magento 2 How to create another group like the Related Products one?

texts: I'm using Magento 2 and I'm trying to create another group, like the related products one , so when I'm on the product page , and I slide to bottom , I'm able to see both groups, Related products on one row , and my second group , is that possible to do ?


texts: Get product name and sku in grid using join

texts:
Here is my code

$vendorTableName = Mage::getSingleton('core/resource')->getTableName('marketplace/vendor');
    $vendorproductsTableName = Mage::getSingleton('core/resource')->getTableName('marketplace/vendorpro');
    $productsTableName = Mage::getSingleton('core/resource')->getTableName('catalog/product');
    $collection = Mage::getModel("marketplace/vendorpro")->getCollection();

    $collection->getSelect()
    ->joinLeft(array('ce1' => $vendorTableName), 'ce1.vendor_id=main_table.vendor_id', array('vendor_name','vendor_contact_email'));

    $collection->getSelect()
    ->joinLeft(
        array('prod' => 'catalog_product_entity'),
        'prod.entity_id = main_table.mageproduct_id',
        array('sku')
    )
    ->joinLeft(
        array('cpev' => 'catalog_product_entity_varchar'),
        'cpev.entity_id=main_table.mageproduct_id',
        array('name' => 'value')
    );

I am not getting correct data i have only two entry in database but it returns more than 2 where is my mistake?


texts: Why does adding an attribute prevent categories from expanding?

texts:
This code will add a dropdown just fine, but now I can't expand the category tree.  Any ideas why this would happen?

$installer->addAttribute('catalog_category', 'review_enabled',  array(
'input'    => 'select',
'required' => true,
'label'    => 'Review Enabled?',
'option'            => array ('value' => array(
    'optionone' => array('Yes'),
    'optiontwo' => array('No'))),
'global'   => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'group'    => 'Featured Review'));

I'm seeing this error in the console when I click on "expand" icon next to categories:

prototype.js:1530 POST http://<<mySite>>/catalog_category/categoriesJson/?isAjax=true 503 (Service Unavailable)


texts:
I`m trying to make a new theme and all steps are done:

Create theme directory app/design/frontend/MySite/MyTheme
Create theme.xml file under app/design/frontend/MySite/MyTheme
Add registration.php

And I found my theme in my admin panel , Now I overriding _theme.less file. but how the less will be compile? I'm using localhost (xammp)

I had to delete files inside these directories manually after finishing my edit but no result: pub/static/frontend/YourVendorName/YourTheme/, var/cache/ and var/view_preprocessed


texts: Magento 2: Recently order cannot add to cart

texts:
I recently noticed that the sidebar of recently order items has an add to cart button.  However, when I click on this, it does do anything other than check the box. Is there a place, that can make this into a active link and have it actually add to cart?

I noticed that, this widget is created with frontend\templates\reorder\sidebar.phtml. In the code I can see this,

  <input type="checkbox" name="order_items[]"
                                   data-bind="attr: {id: 'reorder-item-' + id, value: id}"
                                   title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>"
                                   class="checkbox" data-validate='{"validate-one-checkbox-required-by-name": true}'/>

and this

<button type="submit" title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>" class="action tocart primary">
                        <?php /* @escapeNotVerified */ echo __('Add to Cart') ?>
                    </button>


texts:
logged out immediately After login customer in front end .

i checked in system->configuration->session Cookie management and cookie life time is 36000000.
for only one website->store view only its not working properly.for other store views there is no problem with customer session management.

note:same instance in local also there is no problem at all.

can you any one give idea to resolve this issue.


texts: Magento 2.3 - Fixing "Cannot redeclare __()" error

texts:
Getting error PHP Fatal error:

  Cannot redeclare () (previously declared in
  /vendor/magento/framework/Phrase/.php:15) in app/functions.php on
  line 22

This error is coming while running Magento CLI commands in Magento 2.3 with PHP 7.2.16.


texts: Customer Custom Tab data cant save in admin

texts:
I have a custom module which is used to add a custom module in customer section in admin. I have added this tab successfully and now I am trying to save custom data that obtain through custom tab in a custom table. For that I am using an observer method and which is shown below

<config>
-----------------
<global>
    <events>
      <adminhtml_customer_prepare_save>
          <observers>
              <save_customnewtab_data>
                  <type>singleton</type>
                  <class>customernewtab/observer</class>
                  <method>saveCustomerNewTabData</method>
              </save_customnewtab_data>
          </observers>
      </adminhtml_customer_prepare_save>
    </events>
    --------------
 </global>
 ---------
 </config>

and my observer is shown below

<?php

class Mysite_Customernewtab_Model_Observer
{
    public function saveCustomerNewTabData($observer){

        if (isset($observer['customer']))
        {
            $customer = $observer['customer']->getData();
            echo "
";
            print_r($customer);
            die();

        }
        else
        {
            //Do something with the customer
        }
    }
}

this is the extract of phtml file which I am using to render the content of my custom tab

            <input id="customer_nick_name" class=" required-entry input-text required-entry" type="text" value="" name="customernewtab[customer_nick_name]" />

<?php /*profile pic section*/ ?>

                <input id="customernewtab_file_name" type="hidden" name="customernewtab[customer_photo]" value=""  />
            <input id="customnewtab_file" type="file" name="customer_prof_pic" value="" />

Now see my observer output, while editing an existing customer data with my custom data has set along with it.

Array
(
[entity_id] => 3
[entity_type_id] => 1
[attribute_set_id] => 0
[website_id] => 1
[email] => rajeev_ktomy@yahoo.in
[group_id] => 1
[increment_id] =>
[store_id] => 1
[created_at] => 2014-03-10T04:23:00-07:00
[updated_at] => 2014-03-12 07:22:00
[is_active] => 1
[disable_auto_group_change] => 0
[firstname] => test
[lastname] => test
[password_hash] => 4de63e833f14934a3c5fd4213496a13c:n0seA0z1a135nmY3rtbTkUAmkTpiomzw
[created_in] => English
[prefix] =>
[middlename] =>
[suffix] =>
[taxvat] =>
[dob] =>
[gender] =>
[is_subscribed] =>
)

As you can see my custom data is missing in the output. My question is

1) Why my custom datas customer_nick_name and customer_photo are not visible in the output ?
2)What is wrong in my code ?
3) Is this the correct way to save custom tab data ?


texts: overriding product page title and meta title in multi language store

texts:
I have Magento store with two languages, English and Arabic. When we inserted the products in the English store view, then translate the product title to Arabic. The product meta title, description and keywords remains in English.

So When I open a product page in Arabic store view the page title tag, meta title, meta description and meta keyword are in English. Is there I way to override the layout or create a plugin to override those value to the current product name. So the title,meta title will be product name based on the current selected store view, meta description will product description and meta keywords will be product title + description separated by commas.


texts: Magento 2 show custom table data on the admin order detail tab

texts:
I am building a custom module to store multiple rows of custom data while user placing the order. Following fields are in my custom table, “entity_id”, “order_id”, “sku”, “some_customvalue”, “create_at”, “updated_at”. Once user place the order, values are adding to the table without any issue, but I need to show this value in the admin order details page in a tab and customer account order details page in a tab.

I created the tab in the admin order details page but I don’t know how to show the data from the custom table belongs to each order.

Any help is appreciated,

Thanks.


texts: Where is row_id column definition in magento module-sales-rule module source code?

texts: I looks at salesrule table source code in Magento 2.3.3 vendor/magento/module-sales-rule/etc/db_schema.xml. In that file, it said the table primary key is rule_id column but actually the primary key is row_id. However, I cannot find any row_id text in that module. Where is row_id definition in salesrule table?


texts:
I am using the following to display image icons to represent the operating systems of a device.

<?php if($_product->getoperating_system()): ?>
<?php $os=$_product->getAttributeText('operating_system');
$osid=$_product->getoperating_system();
echo '
'.$os.'
' ;?>
<?php endif; ?>

Results are as shown here:

I would like to do the same with a multiple select attribute.

This code displays the attribute value ids:

<?php echo $_product->getData('printer_functions'); ?>

How do I modify the first code to display an icon for each selected value?


texts: Security patch SUPEE-1533 error "Patch can't be applied"

texts:
I am using Magento CE 1.9 and trying to install security patch SUPEE-1533 but it's giving me this error:

  Checking if patch can be applied/reverted successfully...

  ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php.rej
patching file app/code/core/Mage/Adminhtml/controllers/DashboardController.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Adminhtml/controllers/DashboardController.php.rej


texts: Changing store view (language) to the default store view, it goes back to homepage

texts: I have "Add to store code to url" enabled, I have two store views with different name and url of the category for each store view, now I'm in category page: example.com/en/category, when I switch language the system will redirect me properly to example.com/it/categoria but if I go back to the default language, it will redirect me to the homepage....


texts: Change Attribute value from 1 & 0 to Yes and No on Front End

texts:
I have an attribute whose value when input was 1 & 0, 1 = yes and 0 = no.

I have just upgraded to Magento 1.9.2 and on the front end, it is showing 1 & 0, instead of Yes or No.

Is there a simple coding I can do that will put Yes and No on the frontend instead of 1 & 0?

Any help would be greatly appreciated.


texts:
I followed the tutorial on this page

http://www.johannreinke.com/en/2012/01/30/add-custom-settings-in-magento-admin-panel/

While I was able to get the source code provided to work without a problem, I have not been able to get the edited version of the code to work. It is telling me

Warning: include(Mage/VMR/Batch/Model/System/Config/Source/Dropdown/Values.php) [function.include]: failed to open stream: No such file or directory

Here is the XML Block defining that model

                    <multiple_dropdown translate="label comment">
                        Multiselect
                        <comment>Multiselect with global scope.</comment>
                        <frontend_type>multiselect</frontend_type>
                        <source_model>VMR_Batch/system_config_source_dropdown_values</source_model>
                        <sort_order>40</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>0</show_in_website>
                        <show_in_store>0</show_in_store>
                    </multiple_dropdown>

Any Ideas on why it is looking in Mage/VMR/.... Instead of VMR/.... ?

Edit: Here is my XML Block For Models

<global>
<models>

    <batch>
         <class>VMR_Batch_Model</class>
         <resourceModel>batch_mysql4</resourceModel>
    </batch>

    <batch_mysql4>
        <class>VMR_Batch_Model_Mysql4</class>
        <entities>
          <batch>

vmr_batches

          </batch>
        </entities>
    </batch_mysql4>
</models>


texts: Magento 2 @escapeNotVerified vs. escaping methods in custom code

texts:
I want to combine two topics and ask someone more expirenced about tag @escapeNotVerified. I have read topics about this tag and also about different escaping methods.

Although I am not sure - if I write some custom code in templates and I will use some of escaping methods - should I match content with tag @escapeNotVerified? I understand, that my content is already escaped and I don't have to. Is this tag some temporal magento team members annotation to correct in future?


texts: How to change the required fields of review from true to false?

texts:
When I review a product, there is a required field of Review on the last. I want to change this field from required to not required.

I changed this field for backend by editing app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php.

$fieldset->addField('detail', 'textarea', array(
    'label'     => Mage::helper('review')->__('Review'),
    'required'  => false,
    'name'      => 'detail',
    'style'     => 'height:24em;',
));

Now I want to change it for frontend. How to do it?


texts: How to save data in custom table and then send that data in order email in magento 2?

texts:
Anyone can please help me how to save data in a custom table after successful order and send saved data in order email.

Thanks.


texts: Can I know the different between magento2 stable version which we can download at https://magento.com/ and development version at github. Which can I use for development of new CMS site and to do customizations?


texts: How to use grouped product attributes for simple products in layered navigation

texts:
I am working on a chemical catalog and I have created grouped products to add attributes like molecular weigt, CAS-Number and other chemical data. These data are all the same for my simple products.
In the layered navigation the grouped products are displayed with its attributes.
What I want now is, that when I click on the layered navigation option, my simple products are displayed too. Untill now, I see only my grouped product.
Therefore my question:
Is there a way to use my grouped attributes to select also my simple products?
Thanks Chris


texts: Magento 2 - GIF Images , Animation is not working on frontend

texts:
I am trying to upload .gif image for few products , image is uploading from admin panel successfully

and animation also working in admin panel.

But issue here is when i am checking this product on frontend - image is displayed but Animation is not working on frontend

I have also check same issue on github - https://github.com/magento/magento2/issues/8015

But unable to find any solution.


texts:
we have lot of attribute codes that need to be renamed.

if we use eav_attribute table and if we do manually it will take more time for lot of attributes.

so Is there any sql query to rename attribute code.

ex:

current attribute code : "mp_local_shipping_charge"

need to be renamed as : "local"


texts:
I have a problem with countdown timer in Magento 2 when Page Cache is enabled.

On page load the timer always start from the same time: e.g. 19:05:00
It's refreshed once if cache is flushed.

I have tried to use tag "cacheable="false" - but this disable FPC on page at all (the page load become too long).

I have also try to use $this->_isScopePrivate = true; in my block class, but this not help, such as timer depend on category attribute. (it use registry('category'))

Can anybody help with this?


texts: Keep the product in wishlist after the product added to the cart

texts: When I add the product to the cart at the wishlist page, the product automatically removed from the wishlist and the product was no longer in the wishlist page. Is there a way to keep the product at a wishlist after adding the product to the cart?


texts: How to create customize the email templates in magento 2

texts:
I wish to add custom email templates for the following

Welcome store email
Password reset email
Order confirmation email

If I created, email template from backend, But how do I call my custom templates instead of core email templates, Please provide me a solution.


texts: How to create a custom tab with custom attributes in Customer admin

texts:
I am a beginner in Magento (version 2.3).

I am looking for a solution to create a form with custom attributes, which would be displayed by clicking on a custom tab in Customer admin.

I have understood how to create a custom attribute and have seen how to create a new tab.

The problem I encounter is how to join these two?

I saw my attribute can be used_in_forms. Should I create a new form here? In this case, how to create and render the form?

Thank you for your help,

Jeremy


texts: Sort by price is not working on magento 2

texts:
This is a website link
https://magento-202257-609939.cloudwaysapps.com/catalogsearch/result/index/?product_list_dir=asc&q=wera

I am developing for my client and after a search of any product when we choose sort option by price its not working.

Can anyone give me solution for this?

Waiting!


texts:
I am working on implementing a new payment module using Magento 2.1.6 and want to understand the core concept behind this logic. I know I have to extend from Payment_Model_AbstractMethod or any of its children classes, but my problem is How does the payment module flow work (which functions are called specifically when pressing checkout and place order buttons). When to use and how to use capture and authorize methods in my model.
Finally, how can i check the transaction status is it failed or success?


texts: How to show customer data ( name, surname, address ) on my custom checkout step after shipping step?

texts:
I have created custom checkout step after shopping step.
Now i need to show there customer's information from shipping step (first name, last name, address, city, country, phone number, etc ) and his orders ( name of order and quantity ).
I don't know how to do it, please give any advices.


texts: Magento2 - Customer Session set one store to another store

texts:
Magento2  - I have setup 2 store like

        1: default store view (home page)
        2: English ( sub pages )

When I'm going to English store than login its working and get customer session but when i'm going to home page (default store view) than session is getting NULL.


texts: Checkout experience via REST API Magento2 - how to setup quote_currency

texts:
Here is the the situation:
I created the entire checkout flow using APIs (created empty cart, add products to cart, set shipping/billing address, shipping info, payment info and converting quote to order)
I need to change the currency for the quote if I use the Magento site it's very easy using the currency drop down but I need to do the same via API is possible?
I tried to save a quote with rest/V1carts/mine setting quote_currency_code to a different one (example EUR) but nothing happens.
It's possible what I want? Or I need to customize a new rest API call to do that.

[EDITED]

Here is the code used to update aquote:

url: http://[site-url]/rest/V1/carts/mine

body:

{
    "cartId":1,
    "store_id":1,
    "customer_id":1,
  "quote": {
    "id": 1,
    "is_active": false,

  }
}

This code update successfully the quote.
But when I try to update the quote currency code no error and nothing heppend

{
"cartId":1,
"store_id":1,
"customer_id":1,
"quote": {
  "id": 1,
"currency": {
    "quote_currency_code": "EUR"
  }
}  }

Thanks in advance.


texts:
I'm trying to override theme files in my custom theme based on the blank theme.

I managed to override the css with a custom css file. So i know my path correct. This path is:

<Vendor>/<Theme>/Magento_Theme/layout/default_head_blocks.xml

When i try to override the header.phtml nothing changes. I tried both urls:

<Vendor>/<Theme>/Magento_Theme/template/html/header.phtml
<Vendor>/<Theme>/Magento_Theme/templates/html/header.phtml

Both files are not picked up by the compiler or whatever blocks the rendering.

I'm in developer mode and I'm using the Bitnami magento 2 from google cloud launcher.

Am I missing something badly here?


texts: POS system and warehouse management in Magento?

texts:
We run an online store in Magento, and also a brick-and-mortar storefront where we sell our products to retail customers.  Recently we purchased a warehouse to handle inventory/processing specifically for orders in our online store.

We're looking for a way in Magento to manage our warehouse inventory separately from our storefront inventory, so that sales in the storefront decrement storefront inventory, and online sales decrement warehouse inventory.

Although there are a number of POS and warehouse extensions that both do their respective tasks well enough, finding a setup that allows for both to work in conjunction has been difficult.  My question is, are there any POS or warehouse Magento extension integrations where this kind of setup is a possibility?  I'm just looking for information as to whether such a setup is even achievable, and how.  Thank you!


texts: Show/Mask a admin grid different from a table

texts:
I have a admin grid in admin panel, which I created using Ultimate module creator.

This Module has following columns in database table:

1. id
2. ref_id
3. ref_type
4. position

Thus, the admin grid also has the same columns.

But my requirement is to show the admin grid differently i.e

1. name
2. email
3. location
4. position

I can change the columns by visiting {namespace}/{module_name}/Block/Adminhtml/{module_name}/Grid.php

But how to fill the values in newly added columns based on the old column values for each row?

I tried like this which didn't work:

    $this->addColumn('name', array(
        'header' => Mage::helper('modulename')->__('Name'),
        'index' => 'name',
        'type' => 'text',
        'value' => 'hello' //Here I am trying to manipulate this column using  "ref_id" and "ref_type"
    ));

Please help

PS: The user can edit only "position" field (which is the only visible field), when he/she clicks edit action.


texts: Change Fieldset Element Renderer using UiComponent

texts:
I have a form UI component I'm using in the backend of a Magento 2.2 installation.  I'd like to adjust some items across all elements within the fieldsets of this form.

In the pre-2.2 days, you could just override the Adminhtml\Block\Form class to specify in the _prepareLayout method:

    \Magento\Framework\Data\Form::setFieldsetRenderer(
        $this->getLayout()->createBlock(
            \My\Module\Block\Widget\Form\Renderer\Fieldset::class,
            $this->getNameInLayout() . '_fieldset'
        )
    );

But with the move to UiComponents, this way has been deprecated.  So how do we replicate this within the new UiComponent XML declarations?  Is it even possible within the XML, or will I have to use a plugin to change the renderers?


texts:
I want to delete all images from a few products via script. Here is what I got:

$mediaApi = Mage::getModel("catalog/product_attribute_media_api");
$items = $mediaApi->items($product->getId());

foreach($items as $item) {
  $mediaApi->remove($product->getId(), $item['file']);
}

This works for every image which is in the gallery except one. I just can't delete it. I am pretty sure it is because the last product image is stored for a specific store view. But calling

Mage::app()->setCurrentStore($store_id);

at the beginning does not help either. What can I do?


texts: Magento 2 Cron display out of stock product

texts:
I want to get list of all the products for particular categories irrespective of OUT OF STOCK or IN STOCK using cron.

Currently, if i execute the cron it list only IN STOCK product. I don't want to change the setting in backend "Display out of stock product" to "Yes".

Please advice...


texts: Magento 1.9.3.2 Upgrade to latest version not working

texts:
I have a Magento 1.9.3.2 website. I'm trying to upgrade it to the latest Magento 1.9 version which I think is 1.9.3.9. I went to the official website, and found this URL for downloading. https://magento.com/tech-resources/download I think they have changed it so we can not download the whole package as zip or tar file as we can earlier. Instead we need to download a downloader.php file now.

I donwloaded the downloader.php and upload it to my Magento root directory. I visited the downloader.php and followed the instruction.

This screenshot is the last step I seen. and When I click on continue, it will redirect me to my website. When I check the Magento version in admin panel, I can't see my Magento is upgraded, it still stay at 1.9.3.2.


texts: Magento 2 - List child SKUs of category on category page

texts:
I hope someone can help - editing the Magento_Catalog/templates/product/list.phtml most likely buy inserting a new phtml file, how can I list all of the child SKU's of the parent category on the category page?

Example...
Parent category - Electrical
8 child categories, 1 of which being Batteries
Batteries has 2 products assigned, SKU 1234 and 2345

What I would like, on the Electrical category page, the two SKU's (1234, 2345) listed on the Batteries category card

A visual example... http://i.ibb.co/VM1D222/Example2.jpg


texts: If a product has a special price add a new category

texts:
I'm trying to create a cron job that checks if a product has a special price and if it does it adds it to the sale category as well as the one it is currently in.

$category_id = 9;
$_product = Mage::getModel('catalog/product')->load($id);
$collection = Mage::getModel('catalog/product')->getCollection()
    ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
    ->addMinimalPrice()
    ->addFinalPrice()
    ->addTaxPercents();
$productposted = array();
foreach ($collection as $product){
    if(($product->getFinalPrice() < $product->getPrice()) && ($_product->getData('sale_expempt')==1)) {
        $productposted[$product->getId()]  = 9;
    }
}
$category = Mage::getModel('catalog/category')->load($category_id);
$category->setPostedProducts($productposted);
$category->save();


texts: Magento 2 Currency Switch Dropdown - Remove currency name

texts:
In Magento 2 (Luma child theme) when enabling multiple currencies you get a currency switcher dropdown in the frontend's header.
By default, it shows the currency code followed by the full name,

  e.g. GBP - British Pound Sterling.

I want to keep GBP, USD etc.
But remove the rest as I think it's unnecessary, customers can tell the currency from the code.
I am new to Magento 2 and can't find where in the template or layout files this can be changed.

Any idea?


texts: how can i set developer mode in magento2?

texts:
I installed magento2 on my localhost and trying to create simple theme but I have a problem with setting developer mode
Please, can anyone help me to set developer mode in magento2 ??


texts: How to call 404 page not found from view.phtml

texts:
I am developing a logic to accept sku of any product as value of a parameter skuval. In view.phtml

$spProduct = Mage::getModel('catalog/product')->loadByAttribute('sku',$skuval);

   if(!$spProduct) {
        Mage::app()->getFrontController()->getResponse()->setRedirect("test");
        echo "This gets printed when sku is incorrect";
    }

Then redirecting user to product page. If the product does not exist, it shows a blank page instead of 404 page not found error

How do I redirect user forcefully to 404 page?


texts: Catalog Input Type for Store Owner accepts numbers

texts: I would like to create a new input type in Catalog Input Type for Store Owner.


texts: Magento 1.9 - Searching with quotes adds " for next search

texts: So, whenever someone uses quotes in their search it works fine. However, when they go to search again the old search is stored in there and it replaces the quotes with their html entity ". This still works but is obviously annoying. Any ideas?


texts: Magento 2: What is purpose of StateInterface & when to use?

texts:
In vendor\magento\module-contact\Controller\Index\Post.php

They are using \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation

$this->inlineTranslation->suspend();
$this->inlineTranslation->resume();

When is the purpose, options & when I have to use in my Custom Post form & where?


texts:
just finished the CDN set up for our magento store.
Some images/css/js files are loaded fine from cdn server.
But some cdn versions redirect back to our hosting.

I mean some files can be accessed on cdn - example

http://cdn.domain.com/media/wysiwyg/logo-dark.png

Some redirect, example:

http://cdn.domain.com/skin/frontend/rwd/green/images/media/logo.png

redirects to

http://www.domain.com/skin/frontend/rwd/green/images/media/logo.png

What can be the reason for this?

The bytes by domain shows that about 40% sourced by cdn.domain.com and 55% by domain.com. I guess it's not like it supposed to work?

Here are the settings.

Found the problem.
It was caused by htaccess code:

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ http://www.domain.com/.com/$1 [R=301,L]

This code supposed to redirect /index.php/ to route.
Why does it mess around with cdn.domain.com?


texts: when i have add to product error display ReferenceError: Uploader is not defined?

texts: When click on browse Button pop up not open and Show me error in console.


texts: How do I add a search-box in a CMS Static Block, in Magento 2?

texts:
I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.

I want to display the search bar above the top links, at the right of the logo:

Not being able to do that by editing the theme's default.xml file, I have created a CMS Static Block ("Search") and placed it within a widget in the website's header.

How do I add the search box in this block?


texts: Show all products with layered navigation Magento 2

texts:
Now, to be able to show all the products, I have to make 1 main parent category to contain all the product category, but I think it's not the right thing to do.

Is there a page to show all the products in Magento 2 with layered navigation, or is there a block to load all products in magento 2 including the layered navigation so I can insert it in custom page?


texts: Cookie domain issue. Have to clear cache to log back in. HELP.

texts:
i'm new in Magento and this cookie session management really kick my arse off. I have no problem login on fresh browser BUT after I close my browser or logout, I can't log back in unless I clear the cache and it's getting too much. Here is my Session cookie management

and here is the screenshot of browser cookies


texts: I want to change the order of price details in cart

texts:
Here is the screen short i want to change the order of the price details on cart page.
How can i achieve it?


texts: How to get current currency symbol in magento 2 js

texts:
I want to use current currency symbol in custom module Js.

define([
'jquery',
'ko',
'uiComponent'
], function ($, ko, component) {
    'use strict';
    return component.extend({
        initialize: function () {
            this._super();
            this._render();
        },
        _render:function(){
            var self = this;
            console.log("need current currency symbol here.");
        },
        defaults: {
            template: 'Namespace_Modulename/product/view/price',
        },
    });
});

  Any suggestion would be appreciated.

  Thanks


texts:
Does anyone use or know of any solutions for deploying a magento site from a master copy?

Reason is, I produce a number of magento sites, and have a number of extensions I use each time, which need installing and often bug fixing to get them all to work together, and I have to do this each and every time I create a new site.

Is it possible for me to have a master magento install somewhere, and use this as my starting point each time I want to create a new site?

I'm using v1.9 if that's relevant.


texts: Adminhtml - How to add custom template for custom product attribute in magento

texts:
I want to add field image upload, file upload pdf, textarea field, date field

How can I add these fields in custom templatefor custom product attribute.

I saw below link

Adminhtml - How to add custom template for custom product attribute

but how to add images, editor for textarea, calender for date field.


texts: Apply cart discount if customer collects in store

texts:
My customer with Magento Community 1.7 would like to apply a discount to the total order value if the customer collects in their physical store.

So, they have the normal shipping rates, but if the customer selects 'Collect in Store' then they get eg 5% off the total.

Most things I have seen allow the shipping rates to be varied, but if the rate is already 0 how could a discount be applied?


texts: How to create product using SOAP API magento 2

texts:
I want to create product and update product using SOAP API , can anyone guide me how to do it with Magento 2.

I am using bellow code to create product

$wsdl = "http://thebetaserver.in/magento2/soap/default?services=catalogProductRepositoryV1";
$xml_post_string = '<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:def="http://thebetaserver.in/magento2/soap/default?services=catalogProductRepositoryV1">

<soap:Header/>
<soap:Body>
    <def:catalogProductRepositoryV1SaveRequest>
        <product>
            <sku>1005001</sku>
            <name>TEST PRODUCT</name>
            <attributeSetId>4</attributeSetId>
            <price>19.99</price>
            <status>1</status>
            <visibility>4</visibility>
            <typeId>simple</typeId>
            <weight>1</weight>
        </product>
    </def:catalogProductRepositoryV1SaveRequest>
</soap:Body>

$headers = array(
    "Content-type: text/xml;charset=\"utf-8\"",
    "Accept: text/xml",
    "Cache-Control: no-cache",
    "Pragma: no-cache",
    "Authorization: Bearer j7yny07y4ha209r7dqml3yt4kirvgclb",
    "Content-length: " . strlen($xml_post_string),
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_URL, $wsdl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_post_string);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
curl_close($ch);

$fp = fopen("soap.xml", "w");
fwrite($fp, $result);
fclose($fp);

var_dump($result);

But I am getting below error.

  string(299) " rpc:ProcedureNotPresentProcedure not present "


texts: Magento 2.3 - Using a Flat Catalog not recommended but much faster

texts:
We run a Magento 2.3.5 store with 125.000+ products. Magento no longer recommends to use flat catalog sinds 2.1.x (https://docs.magento.com/user-guide/catalog/catalog-flat.html)
But when we enable the flat catalog our entire store, especially the category and product page become much faster.
Load times drop from 1.5 ~ 2 seconds to 0.6 ~ 1.0 seconds.
Is there another way to achieve the same results, without enabling the flat catalog?
We are already running the store with Redis and Elasticsearch, production mode enabled and all JS/CSS settings.
The speed drop mentioned above, is with the same settings only the flat catalog enabled/disabled.