texts: Magento Custom Module in CMS Page Not Working

texts:
I am trying to create a custom module and enabling it in a CMS Page.

I've already done this before and everytime some issue comes up and I could figure this out anyhow.

I couldn't figure out what's the issue this time. Below are the code that I've been trying to make it work.

**app/etc/modules/Vickythegme_CMS.xml**

<?xml version="1.0"?>
    <config>
        <modules>
            <Vickythegme_CMS>
                <active>true</active>
                <codePool>local</codePool>
            </Vickythegme_CMS>
        </modules>
    </config>

Module config XML

**app/code/local/Vickythegme/CMS/etc/config.xml**

<?xml version="1.0"?>
<config>
    <modules>
        <Vickythegme_CMS>
            <version>0.0.1</version>
        </Vickythegme_CMS>
    </modules>

    <frontend>
        <routers>
            <vickythegme_cms_render>
                <use>standard</use>
                <args>
                    <module>Vickythegme_CMS</module>
                    <frontName>tryon</frontName>
                </args>
            </vickythegme_cms_render>
        </routers>
        <layout>
            <updates>
                <vickythegme_cms>
                    <file>vickythegme_cms.xml</file>
                </vickythegme_cms>
            </updates>
        </layout>
        <global>
            <blocks>
                <vickythegme_cms>
                    <class>Vickythegme_CMS_Block</class>
                </vickythegme_cms>
            </blocks>
        </global>
    </frontend>

</config>

Design Layout XML File

**design/frontend/base/default/layout/vickythegme_cms.xml**

<layout version="0.1.0">
 <default>
  <reference name="content" />
</default>
<vickythegme_cms_render_index_index>
 <reference name="content">
  <block type="cms/tryon"  name="tryon_tryon" template="cms/tryon.phtml" />
</reference>
</vickythegme_cms_render_index_index>
</layout>

Block tryon.php file

**code/local/Vickythegme/CMS/Block/tryon.php**

class Vickythegme_CMS_Block_Tryon extends Mage_Core_Block_Template
{
 public function methodblock()
 {
     return 'testing block';
 }
}

Controller File

**code/local/Vickythegme/CMS/controllers/IndexController.php**

class Vickythegme_CMS_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }

    public function methodAction()
    {
        echo 'test method';
    }
}

tryon phtml file

**design/frontend/base/default/template/vickythegme/cms/tryon.phtml**
test content

I've cleared the cache and tried as well. Its not working.

The url that I am checking

http://magento-15667-34663-87261.cloudwaysapps.com/try-on

try-on is the CMS Page that I created with the block code

{{block type="cms/tryon" name="tryon_tryon" template="cms/tryon.phtml"}}

And the page url that I should be checking directly gives me 404 error.

http://magento-15667-34663-87261.cloudwaysapps.com/tryon/index

And btw, I've enabled logging, still I don't get any error in the log related to this module.

I'm not even sure whether the module is running or not.

I'm not sure what's happening. If you guys could help me out in this issue, it'd be really awesome.

Thanks in advance.


texts: I am unable to view details of products in admin panel. I got this below error, how to resolve this error?


texts: How to display Swatches into product list page into custom modules with add to cart functionality

texts:
How to display Swatches into the product list page into custom modules with add to cart functionality.

We need to display properly selected options with the configuration product into cart.


texts: How to add condition in cart price rule?

texts:
Function to generate cart price rule

public function generateCoupon($value='')
{
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$coupon['name']     =   'PROMO1';
$coupon['desc']     =   'Promotion one';
$coupon['start']    =   date('Y-m-01');
$coupon['end']      =   date('Y-m-t');
$coupon['max_redemptions']  =   1;
$coupon['discount_type']    =   'by_percent';
$coupon['discount_amount']  =   30;
$coupon['flag_is_free_shipping'] = 'no';
$coupon['redemptions']      =   1;
$coupon['code']             =   "PROMOPROMO2";
$coupon['store_labels']     =   '3k-4.9k 30% discount'; //this code will normally be autogenetated but i am hard coding for testing purposes

$shoppingCartPriceRule = $objectManager->create('Magento\SalesRule\Model\Rule');
$shoppingCartPrice = $shoppingCartPriceRule->setName($coupon['name'])
        ->setDescription($coupon['desc'])
        ->setFromDate($coupon['start'])
        ->setToDate($coupon['end'])
        ->setUsesPerCustomer($coupon['max_redemptions'])
        ->setCustomerGroupIds(array('1',))
        ->setIsActive(1)
        ->setSimpleAction($coupon['discount_type'])
        ->setDiscountAmount($coupon['discount_amount'])
        ->setDiscountQty(1)
        ->setApplyToShipping($coupon['flag_is_free_shipping'])
        ->setTimesUsed($coupon['redemptions'])
        ->setStoreLabels(array('40% Discount For First Order','40% Discount For First Order'))
        ->setWebsiteIds(array('1'))
        ->setCouponType(2)
        ->setCouponCode($coupon['code'])
        ->setUsesPerCoupon(NULL);
        $shoppingCartPriceRule->save();}

The above function create coupon code successfully. But there is a condition, I have to add a condition that order amount is greater than 5000. Then only coupon is accessible. How can i add this condition?


texts:
I am using Magento ver. 1.14.2.4
I am trying to get order detail's for 6-7 orders, want to log their data into (var/log)
What's the best way to do it ?


texts: Show Shipping costs on product page while using table rates?

texts:
i'm using table rates to calculate the shipping costs for our products. Now i would like to show the shipping costs on the product page.
Does anybody know an extension or solution therefore? Point would be, that the people would have to do type in their zip code on the product page, before the shipping costs could be calculated. Idea?


texts:
Im developing a B2B Store.  I have a number of customers which have special prices for SOME products.  At the moment I have set them up under 'Customer Groups' and applied group prices to the products.  On the front end, when the customer is logged in, their special price is shown alongside the standard price which has greyed out/strikethrough style.

I want my site to HIDE the standard price when there is a group price available instead of strikethrough/grey out, but still show standard price where there is no alternative group price.  Does anyone know of an extension for this or will this need to be hand coded?

I'm only looking to HIDE normal price when there is a group price available.

I'm using standard Madison Island template.


texts: Magento 2: Error 500 with correct Password in Magmi.ini

texts:
My issue is very closely related to Magmi for magento2 and this question here Fatal Error with Magmi for Magento2.

I've noticed when I enter my database credentials correctly in the magmi_engine.php file that the password I enter is stripped of capital letters.

If I manually amend in the magmi.ini file I get a 500 server error. Remove the capitals and the magmi page displays again. It is a requirement to have Capitals in the MySQL user password though so not sure how to resolve?


texts: Magento 2 Sample Data shows as an installed module, but I can't see it

texts:
So I installed a fresh Magento, loaded a couple of products into it, then found out about the sample data, so I wanted to use that. I tried the sampledata:deploy command, but it was giving me an error: "Could not find matching version of module-widget-sample-data"
I then tried to install it by cloning the github repository. I got it to the point where all of the sample data modules show up, and show up as activated, but I cannot see it on the frontend or in admin. I have used di:compile, static content update, and setup:upgrade, but nothing has changed.


texts: Magento - Expected Delivery date on Product Page

texts:
In magento, how to setup Expected Delivery date option in the product page itself. Choosing this date(Expected Delivery) and then add the product to cart.

If the customer has order more than 1 products,(ie) if the cart have 3 products then 3 products may have different delivery date.

The customers can able to place a single order with multiple different dispatch dates? I.E Product A, B & C dispatched on Tuesday, Thursday & Friday.

If the delivery date is selected from the customer then it(delivery date) should display in cart / checkout and order pages.

The Customer can choose their delivery date as they prefered in the product page.

Any Ideas?


texts:
I'm looking for a script that allows me to retrieve the list of orders for 6 months with the products sold.
The csv file should look like this:

Salutation,First Name,Last name,Email,Transaction Id,Product Id,Product name,Transaction Timestamp,Telephone

Mr.,John,Doe,JohnDoe@example.com,11800,001,Product Name 1,,020-123-45678
Mr.,John,Doe,JohnDoe@example.com,11800,002,Product Name 2,,020-123-45678
Mr.,John,Doe,JohnDoe@example.com,11800,003,Product Name 3,,020-123-45678
Mr.,Sam,Smith,SSmith@example.com,11801,001,Product Name 1,,
,Jane,,Jane1985@example,11802,001,Product Name 1,009287654321
,Jane,,Jane1985@example,11802,002,Product Name 2,009287654321.

Being a beginner on magento2, I do not know how to develop the script myself.
I hope you can help me

Thank you very much


texts: Unable to upgrade from Magento 2.3.4 to 2.3.5

texts:
Preconditions
Magento enterprise edition 2.3.4 ("magento/product-enterprise-edition": "2.3.4") installed using composer method.
PHP version is 7.2.
Steps to reproduce

Remove current vendor folder and composer.lock file
Run composer require magento/product-enterprise-edition=2.3.5 --no-update
Run composer install

Expected result
composer install should complete successfully without errors
Actual result
Composer runs fine until this error:
  [InvalidArgumentException]
  Package is not installed: magento/project-enterprise-edition-2.3.5.0

Exception trace:
 () at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:114
 Composer\Installer\LibraryInstaller->update() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:193
 Composer\Installer\InstallationManager->update() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:160
 Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:597
 Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:229
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:122
 Composer\Command\InstallCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:245
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:835
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:185
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:267
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:106
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:61


texts: We want to mirror Image file structure from existing site to Magento

texts:
We are rebuilding our site from an HTML site front end with shopping cart back end to a full Magento store.  We currently come up high in Google's image results for a variety of our product photos and want to keep a similar folder structure in Magento if possible.
Currently we have this type of file structure, with each image category defined: (I am using turtle and dolphin jewelry as an example):

/images/turtle-jewelry/jade-turtle-earrings.jpg
/images/dolphin-jewelry/silver-dolphin-necklace.jpg

This is the file path which Magento is assigning by default:

/media/catalog/product/cache/1/image/650x/040ec09b1e35df139433887a97daa66f/a/r/jade-turtle-earrings.jpg"

Is there any way to do this? I would really like to keep images organized as well. Or, would we be better off using .htaccess redirects for our images until Google finds them?
Thank you for any help or advice!


texts: Magento2 tier price on configurable products

texts:
I have an configurable product for example T-Shirts in size small, medium and large. And all have same price and we have tier price like:
Buy 10 for 5.50 and save 10%
Buy 20 for 5.00 and save 20%

Now a customer buys 5 medium T-Shirts and 10 large. So he has total 15 articles of this T-Shirt. Default Magento is now only take tier price of 10 large T-Shirts, but not for 5 medium T-Shirts.

Is there any way - maybe an extension (did not found one yet) - to add also tier price for 5 medium T-Shirts?

Thanks!
martin


texts:
I am attempting to upload images to my products on a Magento site. It is a fresh install of Magento, running on a GoDaddy shared hosting server. It has been previously running on this server, set up by somebody else, so I know it to be possible with some tweaks. I do not know if the tweaks are needed to be made to the server, to Magento, or what. So here it is:

In Catalog > Manage Products > Product > Images - I have a flash interface for uploading images for the chosen product. I have the browse and upload buttons, and I elect my image and then press "Upload Files" button. I get a red box that states "File was not uploaded.". I have done hours of research into this issue and there seems to be no clear answer but I will lay out the solutions I have tried:

Change browser, computer, clear local cache and cookies etc.
Check permissions for /media/ folder (tried 777 and 755).
Read and implemented changes to .htaccess for GoDaddy servers as explained by the .htaccess file in Magento root
Disabled store view, flushed cache, logged out from Magento, deleted cache from /var/cache/ and then re-enabled store view, cleared cache again
Uploaded and called an earlier version of Prototype.js
Uploaded a local version of jQuery as I read that Prototype and jQuery can conflict and this was the suggested solution
Checked that the GD extension is installed in my server's PHP build.

I must note that Magento is installed in a subdirectory on my server, however it has not moved from when I first installed it so I don't think there should be any issues with the pathing getting messed up.


texts: Magento 2 : Using default store, view, themes

texts:
I've been working with magento 2.2 for about 2 months.  Another individual set up our website to this point.  He used the "main website" in Stores|Settings|Stores.
He used the default Store view, and he used the default Luma theme.
And... he made all of his edits to the website in the default luma theme.

As I've been reading I've realized that this is not good policy, and at least a new theme should have been created.

So here are my questions:

is it ok to use the default main website store?
is it ok to use the default store view?
is there a way for me to copy the edited Luma theme into a new theme?
if I'm missing the point, what is the best way to resolve this issue?

Thanks for everyone's input.


texts: Input field validation in ui_component magento 2

texts:
I have below code in my form ui component , but it is not validating number

<field name="fsa_eligible_position">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string">FSA-Eligible Position</item>
            <item name="visible" xsi:type="boolean">true</item>
            <item name="dataType" xsi:type="string">integer</item>
            <item name="formElement" xsi:type="string">input</item>
            <item name="dataScope" xsi:type="string">fsa_eligible_position</item>
            <item name="source" xsi:type="string">category</item>
            <item name="validation" xsi:type="array">
                <item name="required-entry" xsi:type="boolean">true</item>
                <item name="validate_number" xsi:type="boolean">true</item>
            </item>
        </item>
    </argument>
</field>


texts: how to display image in megamenu(static content) magento 2

texts:
I am trying to display image on megamenu dropdown,
so I am adding an image on static contents option which provides an option to insert image too,

MGS -> Manage MegaMenu Items
 and under various items, I added an image under static contents in the right content position

But on local testing, image has no content,

url for generated image is

http://webster-staging.s3.amazonaws.com/wysiwyg/Screenshot_2018-12-26_at_12.09.07_AM.png

Image doesn't display in the local

I am able to resolve why this url http://webster-staging.s3.amazonaws.com/wysiwyg/Screenshot_2018-12-26_at_12.09.07_AM.png generated by megamenu static content, doesn't work
Am i missing something?


texts: Magento move attributes to top of product view page

texts:
Quick question, my attributes are now displayed at the bottom of the page below (long) description. But I want them to be displayed at the top of the page below the add to cart button.

I searched view.phtml, but I can't figure out how attributes.phtml is called. I also considered moving it to the topo with CSS but that will give a messy result with different numbers of attributes.


texts: How to load a discount rule by id in Magento 2

texts:
I try to take the discount ammount from a discount rule by id.
My discount rule it's  coupon code, and i got the id like this:

$ids = $this->checkoutSession->getQuote()->getAppliedRuleIds();

Does anyone know how to load this rule by his id?


texts: Magento 1.9 : How to add video in product image gallery

texts: I have created product attribute name is video. But, I want to display video in product image gallery in product page.


texts: Posting price for New, Reconditioned and Repair

texts: Hello everyone! I'm attempting to create this function in magento yet I'm a little confused as how to start or where to put the code, please help! The code I've added is what I have so far but I'm not sure how correct it is or if it'll do what I need it too.


texts: Magento 2.3 recaptcha not available as described in official guide

texts:
Official Magento documentation mentions Recaptcha feature can be found in Stores > Configuration > security
https://docs.magento.com/user-guide/stores/security-google-recaptcha.html
No such option exists. Guide does not mention if requires commerce or specific version of Magento or that any additional software is required.


texts:
I want to add color to order grid on magento2.4 admin panel, sales -> orders.
Each status should have own color, forexample status "complete" shows purple and all rows who has complete status become purple


texts: Magento 2 change Invoice PDF Font and Add logo and mailing Address in Footer

texts:
I want to change Invoice Pdf format.In default magento footer part is not added in pdf invoice.I want to add footer and in footer there will be logo and mailing addres.Also I am looking for update fonts with Open Sans.

I am looking for any solution but not getting exact answer.Should I go through custom module and override pdf module Or is there any solution is available in back-end?

If anyone do it please let me know.

Thanks.


texts:
I have several mismatches with session_id in my production website :

if I add a simple product to my cart with a freshly created customer, the session_id in the store switcher urls is not updated (the session_id is re-generated by magento by add to cart process) and when I switch to another store the session is lost
when I login with an existing customer and add a configurable product to my cart, if I go to checkout process, the session_id is re-generated again in the onepage controller but the first ajax query loads with the previous session_id instead of the newly one

Some information about configuration :

sessions are stored in files mode under /var/session/
session file permissions are 660
sid on frontend is enabled
cookie domain is "*.mydomain.com"
cookie path is empty
cookie lifetime is 86400
http only is off
website is fully https

Anybody has already faced this problem ?


texts: Catalog price rule not working for customer groups with group price set

texts:
I set a rule:

It working fine. However, I have group pricing set for the products that the rule covers and the rule is not working for groups where they have a price set. For the groups without a price set, the rule is working fine.

This is my pricing for the products:

Rule works on groups without the price set.

Is this normal behaviour? Is there a workaround?

UPDATE:

The rule seems to be working for some of the groups with prices on but not for others...

Magento ver. 1.9.2.4


texts: Order confirmation mail stopped working suddenly

texts: I am running magento 1.9.1. I was getting order confirmation emails till yesterday. Not sure what happened, all of sudden I am not getting emails for new orders. But I am getting email when I change the status of new order from pending to processing. I installed AOE scheduler to investigate. Couldn't read much from the scheduler view. Can anyone help looking at the attached AOE scheduler list view. Do I need to delete or kill any tasks. Also i don't understand why multiple core_email_queue_send_all tasks are running.


texts: Suppose i have one order with multiple items.How to check order-status of each items individually  particular order in Magento-2.1.12?


texts: Magento2 : purchased Theme inside testimonial module using when add testimonial than getting error

texts:
I am using magento2 and purchased theme inside testimonial module enable after add testimonial than frontend side getting error

 Fatal error: Uncaught Error: Cannot instantiate abstract class Rokanthemes\Testimonial\Controller\Form\Index in /home/XXXXX/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:111 Stack trace: #0 /home/XXXXX/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Rokanthemes\\Tes...', Array) #1 /home/XXXXX/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create('Rokanthemes\\Tes...', Array) #2 /home/XXXXX/public_html/vendor/magento/framework/App/ActionFactory.php(40): Magento\Framework\ObjectManager\ObjectManager->create('Rokanthemes\\Tes...') #3 /home/XXXXX/public_html/vendor/magento/framework/App/Router/Base.php(297): Magento\Framework\App\ActionFactory->create('Rokanthemes\\Tes...') #4 /home/XXXXX/public_html/vendor/magento/framework/App/Router/Base.php(158): Magento\Framework\App\Router\Base->matchAction(Obje in /home/XXXXX/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 111

If any one idea please reply me this error comes only live environment in staging working add testimonial functionality.

below my file path Rokanthemes/Testimonial/Controller/Form

<?php
/**
* Copyright © 2015 tokitheme.com. All rights reserved.

* @author Blue Sky Team <contact@tokitheme.com>
*/

namespace Rokanthemes\Testimonial\Controller\Form;

abstract class Index extends \Rokanthemes\Testimonial\Controller\Form {
    /**
     * @var \Magento\Framework\Controller\Result\ForwardFactory
     */
    protected $resultForwardFactory;

    /**
     * @param \Magento\Framework\App\Action\Context $context
     * @param \Magento\Framework\Controller\Result\ForwardFactory $resultForwardFactory
     */
    public function __construct(
        \Magento\Framework\App\Action\Context $context
    ) {
        parent::__construct($context);
    }

    /**
     * Renders CMS Home page
     *
     * @param string|null $coreRoute
     * @return \Magento\Framework\Controller\Result\Forward
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function execute($coreRoute = null)
    {
        $this->_view->loadLayout();
        $this->_view->getLayout()->getBlock('testimonialform');
        $this->_view->renderLayout();
    }
}


texts: What are the cases in which $this from a custom theme's template does not recognize the theme's appropriate block?

texts:
Pardon me for my lack of Magento knowledge in advance. I'm adding custom functionality to a theme like this:

app/code/local/Myvendor/Mymodule/Block/Catalog/Product/View.php:

class Myvendor_Mymodule_Block_Catalog_Product_View extends Mage_Catalog_Block_Product_View
{
  public function myCustomFunction() {
    // Custom functionality
  }
}

This function is called in a template like this:

  app/design/frontend/myvendor_mymodule/default/template/catalog/product/view/options/wrapper.phtml

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

However, in Xdebug, $this always points to Mage_Catalog_Block_Product_View

What are the cases in which the custom module's block is not recognized, and $this defaults to the Mage block instead?

The custom module is active at app/etc/modules/Myvendor_Mymodule.xml
The custom block is specified at app/code/local/Myvendor/Mymodule/etc/config.xml:

<blocks>
<myvendor_mymodule>
    <class>Myvendor_Mymodule_Block</class>
</myvendor_mymodule>
</blocks>

The public function name does not conflict with any other function names.
It's necessary for the template to be located inside the myvendor_mymodule package.


texts: How to add multi select Custom Attribute Options Programatically

texts:
I am working on to create custom attribute, While creating the attribute i need to add multiselect custom attribute option via code.

     $eavSetup->addAttribute(

            \Magento\Catalog\Model\Product::ENTITY,
            'c_bathrooms',/* Custom Attribute Code */
            [
                'group' => 'Product Details',/* Group name in which you want to display your custom attribute */
                'type' => 'text',/* Data type in which formate your value save in database*/
                'attribute_set' =>  'Chennai',
                'backend' => '',
                'frontend' => '',
                'label' => 'Bathrooms', /* lablel of your attribute*/
                'input' => 'multiselect',
                'class' => '',
                'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
                'visible' => true,
                'required' => false,
                'user_defined' => true,
                'default' => '',
                'searchable' => true,
                'filterable' => true,
                'comparable' => true,
                'visible_on_front' => true,
                'used_in_product_listing' => true,
                'unique' => false,
                'visible_in_advanced_search' => true,
                'filterable_in_search' => true,
                'option' => array('values' => array("1", "2","3","4","5","6"))

            ]
        );

i try to give option via code, that custom attrbute are created but our option only added in admin side and Default Sored view

reference:

i tried two ways:

'option' => array('values' => array("1", "2","3","4","5","6"))
'option' => [
                'values' => [
                    '1',
                    '2',
                    '3',
                    '4',
                    '5',
                    '6'
                ]
          ]

The Above two methods created custom attribute with multiselect but only added option values in admin side not in Default stored view

Suggest me How to create custom attribute with option that option will add Admin and Default Store View in admin side.

Edit:

i need to add options to both places Admin and Default Store View

Reference:

I tried Options class way that also same result

http://webkul.com/blog/magento2-how-to-create-product-custom-attribute-from-installer-in-custom-module/


texts: Magento show wrong image when products doesn't have one

texts:
I have a problem with products with no image.
I have set the Product Image Placeholders in the backend at

  System > Configurations > Catalog > Product Image Placeholders

It works well with the majority of products with no image.

But often it happens that instead showing the placeholder, Magento shows a random product's image.

Tracking the problem I realised that the catalog media cache has this wrong photo, even when the backend shows that the product has no photo at all. This is an example path:

  /media/catalog/product/cache/1/image/483x398/9df78eab33525d08d6e5fb8d27136e95/1/7

I cleared all the caches and the wrong image is regenerated again. The only solution I could find is: select the product in the backend, and without changing anything, hit the "save" button.

I hope I explained myself clearly.


texts: I want to make a functionality by which a user can download file of any type from my magento store. I have displayed file link. Is there any magento default helper by which I can make it possible ?


texts:
How to clear cart and minicart programatically in Magento 2??
I am using this code

$quoteId = $this->_checkoutSession->getQuote()->getId();
$quoteModel = $this->objectManager->create('Magento\Quote\Model\Quote');
$quoteItem = $quoteModel->load($quoteId);
$quoteItem->delete();

this clears cart but minicart items are still showing.. Can anyone please help me to fix this issue??
thanks


texts: Cron reindexer always gets stuck in "processing" when reindexing catalog URL rewrites index

texts:
Every time Magento's cron runs the reindexer, it always gets stuck in Processing for the catalog url rewrites index. As a result, the reindexer stops and leaves the other indexes in "Reindex Needed".

However, if I run the indexer in SSH, it will finish.

Why is this happening?


texts: Disable "Proceed to Checkout" button on cart page magento 2

texts:
In my custom module I have to check some conditions and have to disable "Proceed to Checkout" button from the Cart page.

I know it's coming from

magento\vendor\magento\module-checkout\view\frontend\templates\onepage\link.phtml

I can override this but I have to also override block for this. Is there any other way to achieve this?


texts: How do i add children to a block in cms page?

texts:
In the page builder I added an html element with "{{block class="Vendor\Module\Block\Block" template="Vendor_Module::template.phtml"}}" as it contents to render a custom template.
When I load the page, the block is showing, but none of the children, like form.additional.info.
Iv'e been searching and searching, but without success.
If there is anybody with help, it's much appreciated.


texts: Full Tax Summary rounding issue in pdf invoice

texts:
For some reason our Magento rounds the individual tax rate's amount wrong in PDF invoice. In shopping cart and in order email the amount is right.

Here is the wrong version:

VAT 24%: 1.93
ALL TAXES: 1.94

The "all taxes" in that example is the right amount of tax.

We have these settings:

Tax calculation method based on: Total
Tax Calculation based on: shipping origin
Catalog prices: including tax
Shipping prices: including tax
Apply customer tax: after discount
Apply discount on prices: including tax
Apply tax on: original price only
Enable cross border trade: no

Invoice display settings:

Display prices: including tax
Display subtotal: including tax
Display shipping amount: including tax
Include tax in grand total: yes
Display Full Tax Summary: yes
Display Zero Tax Subtotal: no


texts:
Looking at the core Magento 2 code, there seems to be two ways of setting up an admin route.

The first

#File: vendor/magento/module-media-storage/etc/adminhtml/routes.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="admin">
        <route id="adminhtml">
            <module name="Magento_MediaStorage" />
        </route>
    </router>
</config>

is similar to Magento 1.  You add your module to a list of modules in the adminhtml route, and Magento checks it for you.

The second

#File: vendor/magento/module-cms/etc/adminhtml/routes.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="admin">
        <route id="cms" frontName="cms">
            <module name="Magento_Cms" before="Magento_Backend" />
        </route>
    </router>
</config>

has you setting up a new route (id cms above), and then adding your module to it.

Is one of these the "right/preferred" way of doing this in Magento 2?  If not, what are the difference between the two?  i.e. when would you use one over the other?

Asking not to solve a specific problem, but to make sure I'm creating my routes in the correct way and that problems similar to Magento 1 modules (pulling in ajax libraries, security, etc.) are avoided.


texts: Magento 2.0 Programmatically get the prefix used for Tables

texts: I am doing some raw sql opertaions and would like to know if there is a way to get programmatically the Prefix used for the tables (the prefix you set during the Magento installation)?


texts: Filter if CMS page is available for store view

texts:
I was trying to filter CMS pages for my multi-language website.

I was filtering CMS pages, because some of them are only for one store.

So i was trying to filter like this:

$name_page = Mage::app()->getFrontController()->getRequest()->getRouteName();
if ($name_page == 'cms') {
    $cms_page = Mage::getSingleton('cms/page')->getIdentifier();
    $active = Mage::getModel('cms/block')->load($cms_page)->getIsActive();
    if($active != 1){
        return null;
    }
}

As far as i know, $active returns 1 or 0 for positive or negative.
Instead of these, my examples continue going to the stores with the cms in other languages.

Edit :

As first answer say:

  $name_page = Mage::app()->getFrontController()->getRequest()->getRouteName();
  if ($name_page == 'cms') {
        $cms_page = Mage::getSingleton('cms/page')->getIdentifier();
         $active = Mage::getModel('cms/block')->load($cms_page, 'identifier')->getIsActive();
        if(!$active){
            return null;
        }
    }

I try this code, but my method is still returning the url.

My languages code:

<?php $_stores = $this->getAllStores(); ?>
<?php if (count($_stores) > 1): ?>

    <?php echo ( $this->__('Switch language')); ?>

        <?php foreach ($_stores as $_store): ?>
        <?php

        $_store->setTranslatedName(Mage::helper('catalog')->__($this->htmlEscape($_store->getName())));
        $country = strtolower(substr($this->htmlEscape($_store->getLocaleCode()), 3));

        $url = Mage::helper('youngdogs_alternate')->rewriteUrlForStore($_store->getId());
        if (!$url) {
            $url = $_store->getBaseUrl();
        }

        $identifier = Mage::getSingleton('cms/page')->getIdentifier();
        $pageId = Mage::getModel('cms/page')->checkIdentifier($identifier, $_store->getId());
        if($pageId){
            $url = $_store->getBaseUrl();
        }

        ?>

            <a href="<?php echo $url ?>">
    <?php $store_id = $_store->getId();
    $logo_src = Mage::getStoreConfig('design/header/logo_src_small', $store_id)
    ?>
            <img class="mini-icon" src="<?php echo Mage::getBaseUrl('skin') ?>frontend/default/venauto/<?php echo $logo_src ?>" />
            <img class="mini-lang" src="<?php echo $this->getSkinUrl("images/flags/flag_$country.png") ?>" />
            <span class="span-lang" title="<?php echo $_store->getTranslatedName() ?>"><?php echo $_store->getTranslatedName() ?>

    <?php endforeach; ?>

<?php endif; ?>


texts: Xdebug PhpStorm: Explain about the step into and step out

texts: I want to understand about what is step into and step out in xdebug phpstorm, and what is the difference between them, and what should i use most in debugging with xdebug phpstorm.


texts: Magento 2.3 - Product filter with multi select custom attribute

texts:
I trying to do filter the product collection with my custom attribute(Type : Multi select).

It is not working.

Kindly help me


texts:
I have created a custom module for searching.
I am using JQuery for post url like below

var url = "/ymm?year="+year+"&make="+make+"&model="+model;
jQuery(location).attr('href',url);

my custom url created like below :

http://domainname.com/ymm?year=123&make=test&model=test1

But I want to create url like : /ymm/123-test-test1

I am using below code for rewrite url in root .htaccess file but it's not working. it's goes to catelogsearch result page.

RewriteCond %{REQUEST_URI} ^/ymm [NC]
RewriteCond %{QUERY_STRING} ^year=(.*)&make=(.*)&model=(.*)
RewriteRule (.*) http://domainname.com/ymm/%1-%2-%3? [R=301,L]

Please advise me.
Thanks.


texts: Multiple FinalPriceBox Block customizations

texts:
I have 2 customizations of the FinalPriceBox block, one I would like to be the default for the site, the other only on the product view page. I've added a layout update view/frontend/layout/catalog_product_prices.xml to my custom module; in there I specify a custom block FinalPriceBoxGeneral and template final_price_general.phtml

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
    <block class="Magento\Framework\Pricing\Render\RendererPool" name="render.product.prices">
        <arguments>
            <argument name="default" xsi:type="array">
                <item name="prices" xsi:type="array">
                    <item name="final_price" xsi:type="array">
                        <item name="render_class" xsi:type="string">Moxune\Amazing\Block\Catalog\Pricing\Render\FinalPriceBoxGeneral</item>
                        <item name="render_template" xsi:type="string">Moxune_Amazing::product/price/final_price_general.phtml</item>

This works to change the block & template everywhere on the site.

I've now tried to get change the block and template on just the product view page by adding to view/frontend/layout/catalog_product_view.xml in my plugin

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="render.product.prices">
            <arguments>
                <argument name="default" xsi:type="array">
                    <item name="prices" xsi:type="array">
                        <item name="render_class" xsi:type="string">Moxune\Amazing\Block\Catalog\Pricing\Render\FinalPriceBoxDetail</item>
                        <item name="render_template" xsi:type="string">Moxune_Amazing::product/price/final_price_detail.phtml</item>

However this seems to have no effect on the product view page.


texts: Now i am login with email id only. But i would like to login with mobile number also. So, how to login with mobile number in magento-1.9.1.1? I have tried "Netgo_UserandMobile" Extension from magento connect manager, But it is not working.Any solution for this one.


texts:
I need some help.

How to override the magento2 enterprise edition folder to app/design theme folder "module-customer-custom-attributes".

Anyone, please help me.


texts: How to add Price per sqft in Product page and exact price in Magento 2?

texts: How to add the price in per sqft in Catagory Page and search page? On the product page, the actual price will be shown as per the size chosen in the drop-down.


texts: Change Magento2 attribute code Programmatically

texts:
In Magento 2, there is a product attribute code with space.(I know, Magento will not allow to create product_attribute_code with space or with Capital letters).

Now, I need to change/update that product_attribute_code (code alone) to without space.

How to do this.


texts:
Issue
My client has added their product titles in UPPERCASE, and as such the og:title property is also in uppercase.

For example: 'MY T SHIRT'

Current Code

<meta property="og:title" content="<?= $block->escapeHtmlAttr($block->stripTags($block->getProduct()->getName())) ?>" />

Desired Result: I want the title to be output in Propercase.

For example: 'My T Shirt'

Can anyone please suggest an update to the code to get this working as desired?


texts: How to get the values from different rows and same table in mageno2

texts:
I want to get filter_options(804) value based on the condition filter_ids=13 and filter_ids=7 and filter_options=575 for the same sku.

How to do that.

Thanks.


texts:
I developed whats-app share extension.
and I want to share image can any one help me how to share product image to whats-app.

<?php

include 'app/Mage.php';
Mage::setIsDeveloperMode(true);

Mage::app(); // Mage_Core_Model_App

Mage::getSingleton('core/session', array('name'=>'frontend'));

$productId = '100';
    $product = Mage::getModel('catalog/product')
        ->load($productId);
?>

 <meta property="og:title" content="<?php echo ($product->getName()); ?>" />
 <meta property="og:type" content="product" />
 <meta property="og:image" content="<?php echo Mage::helper('catalog/image')->init($product, 'small_image')->resize(200,200);?>" />
 <meta property="og:url" content="<?php echo $product->getProductUrl(); ?>" />
 <meta property="og:description" content="<?php echo strip_tags(($product->getShortDescription())); ?>" />
 <meta property="og:site_name" content="<?php echo Mage::app()->getStore()->getName(); ?>" />

 <a href='<?php echo 'whatsapp://send?text=https://magecomp.com/dev/magento-2-custom-stock-status.html%0A%0A'; ?>' >
    hello


texts: Sharing a wish list button is missing in my wish list magento 2

texts:
On the my wishlist page, I am not able to see the Share wish list button in the Magento 2 frontend. Previously it worked but now that button is not appearing suddenly.

Help me.


texts: admin grid is not displaying all rows from database

texts:
I have created an admin grid, but it is only displaying a single row from the database. At the top of the table it displays

Total 1 records found

but there are three rows in my database. I have checked my code and it seems to be okay.

When looking for an answer to this problem I found this but I cannot get his solution to work for me.

What I have

class Namespace_Module_Block_Adminhtml_Module extends Mage_Adminhtml_Block_Widget_Grid_Container
{
    protected function _construct()
    {
        $this->_blockGroup = 'namespace_module';
        $this->_controller = 'adminhtml_namespace';
        $this->_headerText = $this->__('text');
        $this->_addButtonLabel = $this->__('button text');

        parent::_construct();
    }
}

class Namespace_Module_Block_Adminhtml_Module_Grid extends Mage_Adminhtml_Block_Widget_Grid
{
protected function _construct()
{
    parent::_construct();
    $this->setId('namespace_module_list');
    $this->setDefaultSort('id');
    $this->setUseAjax(true);
}

protected function _prepareCollection()
{
    $collection = Mage::getModel('namespace_module/shop')->getCollection();
    $collection->getSelect()->join(
            array('la' => 'shop_locator_area'),
            'main_table.area_id = la.area_id',
            array('area' => 'la.name')
        )
        ->join(
            array('lr' => 'shop_locator_region'),
            'main_table.region_id = lr.region_id',
            array('region' => 'lr.name')
        )
        ->join(
            array('lm' => 'shop_locator_media'),
            'main_table.shop_id = lm.shop_id',
            array('media' => 'lm.location')
        );

        $this->setCollection($collection);
    return parent::_prepareCollection();
}

protected function _prepareColumns()
{
    $this->addColumn('shop_id', array(
        'header'   => $this->__('ID'),
        'sortable' => true,
        'width'    => '60px',
        'index'    => 'shop_id'
    ));

    $this->addColumn('area', array(
        'header'   => $this->__('Area'),
        'sortable' => true,
        'width'    => 'auto',
        'index'    => 'area'
    ));

    ...other columns here .....

    $this->addColumn('action', array(
        'header'   => $this->__('Action'),
        'width'    => '50px',
        'type'     => 'action',
        'getter'   => 'getId',
        'actions'  => array(
                        array('caption' => $this->__('Edit'),
                              'url'     => array('base' => '*/*/edit'),
                              'field'   => 'id'),
                        array('caption' => $this->__('Delete'),
                              'url'     => array('base' => '*/*/delete'),
                              'field'   => 'id'),
                      ),
        'filter'   => false,
        'sortable' => false,
        )
    );

    return parent::_prepareColumns();
}

public function getGridUrl()
{
    return $this->getUrl('*/*/grid', array('_current' => true));
}

public function getRowUrl($row)
{
    return $this->getUrl('*/*/edit', array('id' => $row->getId()));
}

}


texts: what is best source to learn Magento 2 including PDF,videos etc

texts: I want to learn magento 2.Can anyone tell me what is best learning source including PDF,video,Online Tutorials.


texts: What is the steps to include custom fonts in a newly created theme in magento 2 using typography.less?

texts:
I am adding a custom font in my newly created theme in magento 2. Below are the steps which i am doing:

1. Placed custom fonts in

/app/design/frontend/Vendor_name/Theme_name/web/fonts

2) Added_typography.less in

/app/design/frontend/Vendor_name/Theme_name/web/css/source

and added
    the font-face mixin in it.

3) Now, overriding the Font-face variable in _theme.less

But somehow its not working. I tried defining the font-face mixins and adding font-face-base variable in _extends.less.

Still not clear what is the best way to define a custom font. Can somebody suggest the standard way.


texts: Trying to add an order_item attribute into the REST API

texts:
I'm having trouble trying to add in a custom attribute to the api/rest/orders output.

In the checkout we collect a PO Number for each row of items in the basket and save this in the sales_flat_quote_item table in the column itemchsponumber.

I've tried multiple things to get this value output into the API and although I can get far enough to overwrite each order item xml completely I cannot seem to find a way to extend the order_item xml. (this overwrites the whole order_item row for each product on the order, ideally i'd like to just extend it to show another field)

To overwrite it I changed:

$items[$item->getOrderId()][] = $itemsFilter->out($item->toArray());

to

$items[$item->getOrderId()][] = 'OVERWRITE';

but if I try to add any other items into this nothing happens. It seems that the API/ACL/Resource/Filtering stuff stops the item being added into the API. I could be caused by system -> web services -> rest attributes but I've checked and my attribute doesn't appear in the list. (this maybe because it's not a product attribute but an order one? :/)

I also have a another field under the table sales_flat_order_payment and the column po_number but this isn't setup with a custom module so I'm not 100% if this is an attribute or if it's just hacked into the DB/Adminhtml :S

NOTES:
Magento ver. 1.9.1.0
API Type: Rest


texts: Magento printout pdf editing style and layout

texts:
Our pdf invoice printout table columns are not aligning properly and I don't know how to fix it
A bit I would like to edit the style also to get rid on the dark gray
For example Where is this?
Mage_Sales_Model_Order_Pdf_Items_Invoice_Default

Update2
I managed to change the header color to white
But the alignment still remains
I went to mage/sales/model/order/pdf/items/invoice/default.pdf
And I edited the alignments, It did changed the pdf, but it gave so unexpected results that it still looks the same :(


texts: 500 error at System > Configuration > Shipping Methods

texts:
Fatal error: Call to a member function toOptionArray() on boolean in /Users/camdixon/Sites/snowcommerce/dfs/dfs.dev/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php on line 463

When I click on System, configuration, and then "Shipping Methods" I get this error on my local machine.  I do not get this error for any other links. How would you go about fixing?


texts: SUPEE-9767 V2 - V1 Patch reversal errors

texts:
I'm trying to reverse SUPEE-9767 V1, but it fails:

sh PATCH_SUPEE-9767_CE_1.7.0.2_v1-2017-05-25-09-31-32.sh -R
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Admin/Model/Session.php
patching file app/code/core/Mage/Adminhtml/Block/Checkout/Formkey.php
patching file app/code/core/Mage/Adminhtml/Block/Notification/Symlink.php
patching file app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php
patching file app/code/core/Mage/Adminhtml/Model/Config/Data.php
patching file app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php
patching file app/code/core/Mage/Checkout/controllers/MultishippingController.php
patching file app/code/core/Mage/Checkout/controllers/OnepageController.php
patching file app/code/core/Mage/Checkout/etc/system.xml
patching file app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php
patching file app/code/core/Mage/Core/Controller/Front/Action.php
patching file app/code/core/Mage/Core/Controller/Request/Http.php
patching file app/code/core/Mage/Core/Model/File/Validator/Image.php
patching file app/code/core/Mage/Core/etc/config.xml
patching file app/code/core/Mage/Core/etc/system.xml
patching file app/code/core/Mage/Customer/Model/Session.php
Unreversed patch detected!  Ignore -R? [n]
Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file app/code/core/Mage/Customer/Model/Session.php.rej
patching file app/code/core/Mage/Dataflow/Model/Convert/Adapter/Zend/Cache.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Container/Abstract.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Xml/Excel.php
patching file app/code/core/Mage/ImportExport/Model/Import/Uploader.php
patching file app/code/core/Mage/Sales/Model/Quote/Item.php
patching file app/code/core/Mage/Widget/Model/Widget/Instance.php
patching file app/code/core/Mage/XmlConnect/Helper/Image.php
patching file app/design/adminhtml/default/default/layout/main.xml
Hunk #1 succeeded at 120 (offset 1 line).
patching file app/design/adminhtml/default/default/template/notification/formkey.phtml
patching file app/design/adminhtml/default/default/template/notification/symlink.phtml
patching file app/design/adminhtml/default/default/template/page/head.phtml
Hunk #1 succeeded at 10 (offset 3 lines).
patching file app/design/frontend/base/default/template/checkout/cart/shipping.phtml
Hunk #1 succeeded at 109 with fuzz 1.
patching file app/design/frontend/base/default/template/checkout/multishipping/billing.phtml
patching file app/design/frontend/base/default/template/checkout/multishipping/shipping.phtml
patching file app/design/frontend/base/default/template/checkout/onepage/billing.phtml
patching file app/design/frontend/base/default/template/checkout/onepage/payment.phtml
patching file app/design/frontend/base/default/template/checkout/onepage/shipping.phtml
patching file app/design/frontend/base/default/template/checkout/onepage/shipping_method.phtml
patching file app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml
patching file app/etc/config.xml
patching file app/locale/en_US/Mage_Adminhtml.csv
patching file app/locale/en_US/Mage_Core.csv
patching file app/locale/en_US/Mage_Dataflow.csv
patching file downloader/Maged/Connect.php
patching file downloader/Maged/Controller.php
patching file downloader/Maged/Model/Session.php
patching file js/varien/payment.js
patching file skin/frontend/base/default/js/opcheckout.js

Any ideas where I should be looking to fix the reversal?


texts: How do I use Bonsai.io for Elastic Search for Magento?

texts:
I'm trying to setup Magento to leverage bonsai.io elasticsearch. I've installed the following module: https://github.com/jreinke/magento-elasticsearch and entered the configuration in the control panel, but it isn't able to proceed.

I got this working locally with a test install of ElasticSearch on the same machine as the Magento install. Not sure if this is a limitation with the extension or with my config. Note that for the server value, I'm putting the whole authenticated url. ex: https://user:pw@elasticsearchcluser.bonsai.io

Any help would be appreciated.


texts: Magento 2 Trying to switch from Developer to Production breaking website

texts: My website is working just fine on Developer mode, whenever I try to switch to Production my website is not loading js or icons/images. I am attaching an image so you can see the errors in chrome devtools. In addition I am following the guideline from here: Set the Magento mode I have not deleted the .htaccess file. I've tried to follow this Magento 2 issues with no success again.


texts: Magento 2.3 - isSaleable returns true when ProductSalableQty is 0

texts:
We have many template files (based on the core) that use:

if ($_product->isSaleable()):

For determining whether or not to show the add to cart buttons. However, we've found if we have 10 of an item and a customer orders 10 (a stock reservation is made making the salable quantity 0) but isSaleable still returns true.

Attempting to add an item to the cart causes an error as this uses the new IsProductSalableForRequestedQtyInterface

What is a reliable way (if using MSI) to determine stock levels in phtml? is it not safe to isSaleable anymore or is this an oversight?

Thanks


texts: How to remove firstname, lastname validation (magento 1.9)

texts:
I want only Email, and Password field in registration form (persistent/customer/form/register)

I have also removed rest of the fields.

Still required validation for Firstname and Lastname is still automatically popping up.

Now how to remove these validation for register page.


texts: Magento 2.3.1 not decreasing quantity when order is placed

texts:
I recently upgraded to magento 2.3.1. After update, I noticed that product quantity is not decreased when order is placed (even though Decrease Stock When Order is Placed is set to Yes) so I decreased quantity via a cronjob. But now when I try to mark an order shipped I get error Not all of your products are available in the requested quantity, any suggestions on how to fix that, please?

thanks


texts: Magento 2: Not receiving all post params in ajax call

texts:
I have an issue with an ajax call in magento 2. I am unable to receive the whole data from this ajax call in my Post params. As you can see in the images below

These are the params sent over in ajax

in my controller I have done

    $params = $this->getRequest()->getParams();
    echo '<pre>';print_r($params);exit;

I get the following result

I even tried printing the whole $_POST, but get the same result

The site is setup on nginx. I have tried the following, but whatever values i use i get the same result

    client_body_buffer_size 1024K;
    client_header_buffer_size 1024k;
    client_max_body_size 1024m;
    large_client_header_buffers 2 1024k;

I need to get all post values.


texts: need to hide attributes if attribute value is " "

texts:
http://pastebin.com/6uzYgauE

we are using above attributes.phtml file to display the attibutes in frontend.

app/design/frontend/default/theme/template/catalog/product/view/attributes.phtml

suppose if attribute value is empty , than thiose attributes will not display in frontend for the

particular product .

but if we give some empty space in the attribute text field, than those attributes are displaying in the frontend.

if we gave empty space as attribute values , than we want to hide those attributes for the particular product.

ex: if attribute manufacturer = "" than color will not display in frontend

if attribute manufacturer = " " than color will display in frontend. we want to hide color here....

please help me to find solution.


texts: Magento 2 | Remove telephone from checkout address

texts: How can I remove the telephone field from the address fields in checkout (without CSS)?


texts: Magento 2: Customising Checkout page – not working!

texts:
I am trying to remove input fields (Company and Telephone) from the Checkout page. I have followed what is explained on the M2 site here under 'Disable a component'. I have done the below but nothing is changing on the Checkout page:

I copied the checkout_index_index.xml file from vendor/magento/module-checkout/view/frontend/layout/ and placed it in VENDOR/THEME/Magento_Checkout/layout/.

I updated this new file (checkout_index_index.xml) by adding the below to the company item:

<item name="config" xsi:type="array">
   <item name="componentDisabled" xsi:type="boolean">true</item>
</item>

Resulting in it looking like this:

<item name="company" xsi:type="array">
   <item name="config" xsi:type="array">
      <item name="componentDisabled" xsi:type="boolean">true</item>
   </item>
   <item name="validation" xsi:type="array">
      <item name="min_text_length" xsi:type="number">0</item>
   </item>
</item>

Once I saved this file, I deleted all the content from:

var/di
pub/static/
var/cache/
var/generation/
var/page_cache/
var/view_preprocessed/

Then ran:

php magento setup:static-content:deploy
php magento cache:clean

Refreshed the browser... and nothing. No change at all. What am I doing wrong?


texts: How to recreate a core magento file in my own theme?

texts:
Due to a bug in CE 2.1+ (See Here, I am trying to replace a core Magento file:

\vendor\magento\module-catalog\Pricing\Render\FinalPriceBox.php

with my own version.  However, I have tried inserting this into several different existing theme locations and it doesn't get picked up.

How can I replace this core file with my own version (You can see what I did in the above linked github thread).

Any help is appreciated.


texts: I uninstall smashingmagazine_brand, but I still have this error when I tried to edit a product

texts:
I have removed all files of smashingagazine_brand and also i deleted tables  'smashingmagazine_branddirectory_brand' and deleted following from core_resource table: 'smashingmagazine_branddirectory_setup' and 'smashingmagazine_brandexample_setup'

But still i'm getting error in admin when i go to

Catalog->Manage Products->and click on any products

Below i have given snapshot of error page
Sttil any tables is leftout then help me out


texts: How we can Override Magento\CustomerCustomAttributes\view\templates\customer\form\edit.phtml in custom module

texts:
I want to Override Magento\CustomerCustomAttributes\view\templates\customer\form\edit.phtml file in my custom module.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
       <referenceBlock name="customer_edit">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">I95Dev_CustomerAttributeDisable::customer/form/edit.phtml</argument>
            </action>
        </referenceBlock>
        </body>

This is the core code

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="customer_form_template_handle"/>
<body>
    <referenceBlock name="head.components">
        <block class="Magento\Framework\View\Element\Js\Components" name="customercustomattributes_account_edit_head_components" template="Magento_CustomerCustomAttributes::js/components.phtml"/>
    </referenceBlock>
    <referenceBlock name="customer_edit">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">Magento_CustomerCustomAttributes::customer/form/edit.phtml</argument>
        </action>
        <block class="Magento\CustomerCustomAttributes\Block\Form" template="Magento_CustomerCustomAttributes::form/userattributes.phtml" name="customer_form_user_attributes" cacheable="false">
            <action method="setFormCode">
                <argument name="code" xsi:type="string">customer_account_edit</argument>
            </action>
            <action method="setEntityModelClass">
                <argument name="code" xsi:type="string">Magento\Customer\Model\Customer</argument>
            </action>
        </block>
    </referenceBlock>
</body>


texts: Showing custom address attribute in sales order grid

texts:
I would like to add additional text field as Landmark in Billing Address and Shipping Address.

So I created a simple module as below

app/etc/modules/

<?xml version="1.0"?>
<config>
    <modules>
        <Ucs_CustomField>
            <active>true</active>
            <codePool>local</codePool>
            <version>0.0.1</version>
        </Ucs_CustomField>
    </modules>
</config>

app/code/local/Ucs/CustomField/etc/config.xml

<config>
    <modules>
        <Ucs_CustomField>
            <version>0.0.1</version>
        </Ucs_CustomField>
    </modules>
    <global>
         <resources>
            <landmark>
                <setup>
                    <module>Ucs_CustomField</module>
                    <class>Mage_Sales_Model_Mysql4_Setup</class>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </landmark>
        </resources>
        <fieldsets>
            <sales_convert_quote>
                <landmark>
                    <to_order>*</to_order>
                </landmark>
            </sales_convert_quote>
            <customer_address>
                <landmark>
                    <to_quote_address>*</to_quote_address>
                </landmark>
            </customer_address>
        </fieldsets>
    </global>
</config>

app/code/local/Ucs/CustomField/sql/landmark/mysql4-install-0.0.1.php

<?php
$installer = $this;

$installer->startSetup();

$this->addAttribute('customer_address', 'landmark', array(
    'type' => 'varchar',
    'input' => 'text',
    'label' => 'Landmark',
    'global' => 1,
    'visible' => 1,
    'required' => 0,
    'user_defined' => 1,
    'visible_on_front' => 1
));
Mage::getSingleton('eav/config')
    ->getAttribute('customer_address', 'landmark')
    ->setData('used_in_forms', array('customer_register_address','customer_address_edit','adminhtml_customer_address'))
    ->save();

$tablequote = $this->getTable('sales/quote_address');
$installer->run("ALTER TABLE  $tablequote ADD  `landmark` varchar(255) NOT NULL");

$tablequote = $this->getTable('sales/order_address');
$installer->run("ALTER TABLE  $tablequote ADD  `landmark` varchar(255) NOT NULL");

$installer->endSetup();

After Creating this, I modified System->Configuration->Customer Configuration->Address Template

For Text added {{depend landmark}}Landmark {{var landmark}}{{/depend}}

Text One Line , {{depend landmark}}Landmark {{var landmark}}{{/depend}}..

But From admin side in Sales->Order Grid or Customer side my account View Order, Print order, I cant see newly created field?

What is wrong with my code?


texts: Magento 2 - Bootstrap4 and Popper Tooltip

texts:
I have create my requirejs-config.js under my theme main folder vendor/theme

    var config = {
    deps: [
        'js/custom'
    ],
    paths: {
        'popper': 'js/bootstrap/popper.min',
        'bootstrap': 'js/bootstrap/bootstrap.min'
    },
    shim: {
        'popper': {
            'deps': ['jquery'],
            'exports': 'Popper'
        },
        'bootstrap': {
            'deps': ['jquery', 'popper']
        }
    }
};

I have create my custom js under vendor/theme/web/custom.js

define([
  'jquery','popper'
],
function($, Popper) {
        "use strict";
         window.Popper = Popper;

        $( function (){
            $('[data-toggle="tooltip"]').tooltip();
            console.log('Tootip done');
    });
});

console.log is ok. If i copy
    jQuery('[data-toggle="tooltip"]').tooltip(); on browser console it works

but it des not works on theme. Version Magento 2.2.3


texts:
For some reason the first checkout step "Shipping" is not visible.
I checked all settings, but was not able to find the solution.
Thanks for any hint.


texts: Magento2: How to set default payment method?

texts:
I want to set the default payment Credit Card option on the checkout page.

Please help.


texts: Magento1.9 to magento2.4 customer password migration

texts: I have Magento2.4 but I need my Magento1.9 customers password what should I do?


texts:
Each time I attempt to login into admin panel, it redirects me to the same page with empty fields. This is happening just after I moved my server to another. I've checked all the internet for a solution, but I couldn't find one.

it sometime come up with different error that page load for long time and on the end it got me ERR_TOO_MANY_REDIRECTS can any one help please ?


texts: On Magento2, is it better to declare Interfaces on Api/Data before create Model and Ressource?

texts:
I'm creating a custom module, and I want to know if it's better to create a module with this structure :

Api/Data/CustomInterface.php
Model/Custom.php
Model/ResourceModel/Custom.php
Model/ResourceModel/Custom/Collection.php

My model implements the interface, and I create every getters and setters inside.

The other solution is this structure :

Model/Custom.php
Model/ResourceModel/Custom.php
Model/ResourceModel/Custom/Collection.php

No interfaces, no getters, no setters, few methods like Magento 1.

The first is slower, but cleaner.
The second is faster, but messier.

Which is the best for you ?

Thank you


texts: Images disappear after import thru Magmi on Magento 1.9.1

texts:
I am having an abnormal issue after i upload the images, i can see them in the front and back end. However, after few minutes pass, the images disappear from the backend  and the product no longer show image under manage prodcut page in the IMAGES tab. Perhaps its a magento issue then magmi?

One scenario, when i manually uploaded the images for configurable and simple product. This actually held up and kept the images from disappearing. I cant open and save all the products manually, any other way to mass update images?

Does anyone have any idea why the images arent staying put after importing thru magmi? I am using magmi v0.7.22_git (latest git version) I tired other older verions but the problem remains. This started happening, i believe after i upgraded magento to 1.9.1 from 1.9.0.1, but haven't heard from anyone else having this issue.


texts: Magento How to Change Validation Custom error message

texts:
In Magento 2 How to change Sign up Error message

I want to change this Minimum of different classes of characters in password is 3. Classes of characters: Lower Case, Upper Case, Digits, Special Characters. Where i need to change this error message


texts: Magento 2 - Get product image url in API

texts:
I am creating custom API in magento 2 and I need to get image URL of product.

I have used this code to get image URL:

$imageUrl = $this->listProductBlock->getImage($product,"category_page_grid")->getImageUrl();

Where $this->listProductBlock is the instance of \Magento\Catalog\Block\Product\ListProduct

With this I am getting url like this: ..static/version1574919158/webapi_rest/_view/en_US/Magento_Catalog/images/product/placeholder/.jpg

I have also tried imageBuilder class, but didn't work either.

Please help me solve this issue.


texts: While saving getting error and product is not saved In Magento 2

texts:
While creating the new product, entering all the values trying to save the

product below error is displayed not saving the product.

https://prnt.sc/ireqyg.

Any Help would be appreciated.


texts: Magento Multishop with 2 domains - how to block one from Google?

texts:
I am running a Magento 1.9.2.1 instance with 2 domains configured. One of them should not be reached by Google. How could I block that domain from the instance but allow the other for Google? Both domains should be fully accessible by the user and the admin.

I only have one htaccess in my root folder, so I am not using the one folder per domain way to run my multi shop.

Any ideas?


texts:
im new to the Magento webshop thing. i manage with UNIX, but im not particularly skilled.
still, i managed to get my second magentshop runing, this one on a VPS on which i installed evrything myself without any help (pretty proud about that)

now i have some strange behaviour inside my PHP which i cant google and im not qualified to understand it properly

does somebody know whats going and/or how to correct this?
if not, is this a problem? will it slow down the shop?

magento is 2.1.7, custom (payed) theme, PHP7.0, MySQL server 5.6 and Apache 2.4

error:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/php_curl.dll' - /usr/lib/php/20160303/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/php_intl.dll' - /usr/lib/php/20160303/php_intl.dll: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/php_mbstring.dll' - /usr/lib/php/20160303/php_mbstring.dll: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/php_exif.dll' - /usr/lib/php/20160303/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/php_xsl.dll' - /usr/lib/php/20160303/php_xsl.dll: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Fatal error:  Uncaught Error: Call to undefined function Magento\Framework\Event\mb_strtolower() in /var/www/html/vendor/magento/framework/Event/Manager.php:56

Stack trace:

0 /var/www/html/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('model_load_befo...', Array)

1 /var/www/html/vendor/magento/framework/Model/AbstractModel.php(562): Magento\Framework\Event\Manager\Proxy->dispatch('model_load_befo...', Array)

2 /var/www/html/vendor/magento/framework/Model/AbstractModel.php(530): Magento\Framework\Model\AbstractModel->_beforeLoad('1', NULL)

3 /var/www/html/vendor/magento/module-store/Model/Store.php(488): Magento\Framework\Model\AbstractModel->load('1', NULL)

4 /var/www/html/var/generation/Magento/Store/Model/Store/Interceptor.php(24): Magento\Store\Model\Store->load('1', NULL)

5 /var/www/html/vendor/magento/module-store/App/Config/Source/RuntimeConfigSource.php(181): Magento\Store\Model\Store\Interceptor->load('1')

6 /var/www/html/vendor/magento/module-store/A in /var/www/html/vendor/magento/framework/Event/Manager.php on line 56

anyone who can shed light on this is welcome - thanks

steve

PS im no professional developer, i just need those webshops to run for my business ;)


texts:
I'm new to Magento 2. I want to use ElasticSearch as a search engine and also for autocomplete for Magento.

How can I do this?

Any suggestion is welcome. Thanks?


texts: CSS good practice : inside theme or module folder?

texts:
I just want to know what is the best practice about css in Magento2.
We have the possibility to have design in
Vendor_Name/MyModule/view/frontend/web/css
and we can also put the design in :
app/design/frontend/Vendor_Name/default/web/css so my question is when do we have to put design in the module and when do we have to put it in the theme ?

Thanks for your help.


texts: Magento 2 - What is the path when using _scopeConfig->getValue?

texts:
I'm trying to create a block to display store information like the phone, address, etc. I think this is the right way to do it, but I don't know what path to use below:

<?php

namespace myVendor\Custom\Block;

use Magento\Framework\View\Element\AbstractBlock;

class Phone extends AbstractBlock
{
    public function getPhoneNumber()
    {
        return $this->_scopeConfig->getValue(
            'what_path/goes_here/phone',
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE
        );
    }
}


texts: I have installed XDEBUG.suddenly it got removed from phpinfo and on php - m command.Now I tried re-installing XDEBUG,but still the same problem.Please help


texts: Customer login is working on my account page only

texts:
When i log in into my account it shows me user is logged in for my account page only.But once i navigate to home page it shows that you need to login again.But when i go to my account page it shows you are logged in.

  <?php
    $objectManagerlogin = \Magento\Framework\App\ObjectManager::getInstance();
    $customerSession = $objectManagerlogin->get('Magento\Customer\Model\Session');
    $baseurl = $objectManagerlogin->get('Magento\Store\Model\StoreManagerInterface')->getStore(0)->getBaseUrl();
    ?>
    <?php if($customerSession->isLoggedIn()) { ?>

            <?php  $customerData = $customerSession->getCustomer()->getId();

            //get id of customer ;?>
            <img src="<?php echo $this->getViewFileUrl('images/path-1166@1x.png'); ?>">

                <?php

                $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                $customer = $objectManager->create('Magento\Customer\Model\Customer')->load($customerData);
                $firstname = $customer->getFirstname();
                $lastname = $customer->getLastname();
                $email = $customer->getEmail();
                $groupId = $customer->getGroupId();

                ?>

Hello, <?php echo $firstname; ?>!

                <a href="<?php echo $this->getBaseUrl() ?>customer/account/">Dasbhoard
                <a href="<?php echo $this->getBaseUrl() ?>sales/order/history/">My Orders
                <a href="<?php echo $this->getBaseUrl() ?>customer/account/login/">My Lists
                <a href="<?php echo $this->getBaseUrl() ?>customer/address/">Address Book
                <a href="<?php echo $this->getBaseUrl() ?>customer/account/">Account Details

    <?php }else { ?>

            <a href="<?php echo $this->getBaseUrl() ?>customer/account/login/">

getCustomer()->getId();
echo $customerData;
//get id of customer ;?>
                <img src="<?php echo $this->getViewFileUrl('images/path-1105-10@1x.png'); ?>">

        <?php
    }
    ?>


texts: Magento 2 - build a unique id for the term's checkbox for payment methods using vault

texts:
For payment methods using vault, the id generated for term's checkbox is duplicated as the payment method name is same.

/**
         * build a unique id for the term checkbox
         *
         * @param {Object} context - the ko context
         * @param {Number} agreementId
         */
        getCheckboxId: function (context, agreementId) {
            var paymentMethodName = '',
                paymentMethodRenderer = context.$parents[1];

            // corresponding payment method fetched from parent context
            if (paymentMethodRenderer) {
                // item looks like this: {title: "Check / Money order", method: "checkmo"}
                paymentMethodName = paymentMethodRenderer.item ?
                  paymentMethodRenderer.item.method : '';
            }

            return 'agreement_' + paymentMethodName + '_' + agreementId;
        },

I see this code in checkout-agreements.js. However, in my case, cybersource vault method results in same paymentMethodName, leading it to duplication if there is more than one stored payment/ saved card.

I need help in coding the id attribute of term's checkbox dynamically here:

<input type="checkbox" class="required-entry"
                       data-bind="attr: {
                                    'id': $parent.getCheckboxId($parentContext, agreementId),
                                    'name': 'agreement[' + agreementId + ']',
                                    'value': agreementId
                                    }"/>

and its respective 'for' attribute of label.


texts: Memory size exhausted when switching store views

texts:
I have a problem with memory size exhausted error.

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 16384 bytes) in /...../public_html/lib/Zend/Db/Statement/Pdo.php on line 228
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 16384 bytes) in /...../public_html/lib/Varien/Autoload.php on line 153
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32768 bytes) in /...../public_html/lib/Zend/Db/Statement/Exception.php on line 1

It happens when I try to change store view in checkout page.
I already know that it is somehow connected with the change I've made in

app/code/core/Mage/Tax/Model/Calculation.php

in getRateRequest() function, I've added following code:
$bAddress = Mage::getSingleton("checkout/session")->getQuote()->getBillingAddress();

And after this change and this change only, it stops working. If I comment this line it works fine again.
Obviously changing memory limit doesn't work. It just takes more time but it throws errors anyway.
Edit: Note that the problem only occurs when I change store view in checkout, if I don't change it or I change it on homepage and then go to checkout it works perfectly fine.


texts: How to assign Custom select box option value in custom form?

texts:
Here i working custom form with custom select box in magento.I need to assign Custom select box with option value attributes and option values .

Here i working custom form sample code:

$fabrics    = Mage::getModel('magentostudy_fabrics/fabrics')->getCollection();
        $fabricval[] = "Please Select";
        $fabricvals[] = "0";
        // $collection->addAttributeToSelect('news_id'); //retrieve only product name (optimising SQL)
        foreach ($fabrics as $fabric) //loop for getting products
        {
            $fabricval[] = $fabric->getTitle();
            $fabricvals[] = $fabric->getNews_id();
        }
 $fieldset->addField('fabricslist', 'select', array(
            'name'     => 'fabricslist',
            'label'    => Mage::helper('bulk_uploader')->__('Select Fabrics List'),
            'title'    => Mage::helper('bulk_uploader')->__('Select Fabrics List'),
            'required' => true,
            'onclick' => "",
            'onchange' => "",
            'value'  => $fabricvals,
            'values'    =>$fabricval,
            'disabled' => $isElementDisabled,
            'readonly' => false,
            'after_element_html' => '<small>choose Category list</small>',
            'tabindex' => 1
        ));

Here  'value'  => $fabricval got wrong values.For example i have News_ID 1,3,5 respectively.But i results only 1,2,3 respectively.How to assign value attributes in select box
for example I need select box sample function

<select>
<option value='1'>sample1</option>
<option value='3'>sample2</option>
<option value='5'>sample3</option>
</select>

How to assign select box option value attributes in magento?


texts: Redirect to Paypal emptying shopping cart

texts:
Good Afternoon guys,

We're currently experiencing an intermittent problem where when a user selects Paypal (Standard) as a payment option, they're being redirected to an empty cart rather than the Paypal website. These seems to only happen on IE Browsers. The strange thing is we've edited the site a couple of times and seemingly fixed the issue, only for it to return a day or so later.

Setup details are:

Mage 1.7.0.2
Onestepcheckout

The items we've edited which seemed to have fixed the issue are all related to X-UA-Compatible settings.

As per the comments, I'm going to run through the things we've tried in an effort to fix the issue.

Using X-UA-Compatible to change which version of IE Standards are used, weighted to try and use IE8 (both header and .htaccess based).
Debugging the /onestepcheckout/index/index/ controller (which is used as the action of the checkout form) and this shows that as soon as the process enters this step the cart is empty.
Debugging shows that the system goes straight into the /onestepcheckout/index/index/ controller also (using Charles Debugging Proxy), and makes no attempt to redirect to PayPal.

The strangest thing is that, after changing the IE Standards being used, the site will work for a short while (replicated on numerous machines) but then revert back to not working after a few hours?

Your help, as always, is massively appreciated,


texts: How do I display data from my table in the magento frontend?

texts:
I'd like to display data from the database table on my frontend screen, I'm trying this way:

Teste/Cadastro/Block/Tabela.php

<?php
class Teste_Cadastro_Block extends Mage_Core_Block_Template
{

        public function getContent()
     {
        $cadastroModel = Mage::getModel('cadastro/cadastro');

        $collections = $cadastroModel->getCollection();

            foreach($collections as $collection)
        {
             print_r($collection->getdata(''));
        }
?>

default/template/cadastro/cadastro.phtml

...
            <div>
                    <?php echo $this->getContent(); ?>
            </div>
...

And in my config.xml I have the declared block.

Does this have to be done through a block or even an action?


texts: Magento 2.2.2 - Include external/internal Javascript for specific CMS page

texts:
I need to integrate addthis widget on CMS page. In my custom them I created xml file cms_page_view.xml which resides at app/design/frontend/Vendor/Themename/Magento_Theme/layout/

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
        <script src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-1234567890" src_type="url" />
    </head>
</page>

I can see the social sharing icons appearing on that CMS page, but as I have included it from xml, it appears on all CMS page of the store

I tried including below xml from Design tab in Layout Update XML in admin

<reference name="head">
    <block type="core/text" name="shop-by-project">
        <action method="setText"><text><![CDATA[<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-1234567890" />]]></text></action>
    </block>
</reference>

It gives exception Please correct the XML data and try again. Element 'reference': This element is not expected. Expected is one of ( referenceContainer, container, update, move ). Line: 1

How do I include external and internal javascript for specific CMS
page making sure it does not load in other CMS and product pages?


texts: magento2 how to remove Advanced Pricing link on Add Product page

texts:
In magento 2 I want to  remove Advanced Pricing link on Add/Edit Product page

If any body have an idea please reply.


texts: Plesk Hosting Magento 2 commands not working

texts:
I'm Using Plesk Hosting Magento 2 installed but i can't use commands any kind of command not working.

i'have tried many different commands all gives error
some can advice will be highly appreciated.


texts: How to save custom payment method data in Table?

texts:
i have create custom payment extension, it has 2 Textbox, display at frontend,in payment section,
so now my question is, how can i store that textbox data in database?
i use 2 tables for that,
quote_payment, sales_order_payment and table field is- tax_relief_code, tax_relief_state in both table,

those 2 textbox created in html file,
path is app/code/Fms/Taxrelief/view/frontend/web/template/payment/taxrelief.html

        <input type="checkbox"
               name="payment[method]"
               class="checkbox"
               data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>

        <form class="form" data-bind="attr: {'id': getCode() + '-form'}">

                <input id="customer-tax-relief-code"
                       name="payment[tax_relief_code]"
                       type="text"
                       class="input-text"
                       data-validate="{'required-entry':true}"
                       autocomplete="off">

                <input id="customer-tax-relief-state"
                       name="payment[tax_relief_state]"
                       type="text"
                       class="input-text"
                       data-validate="{'required-entry':true}"
                       autocomplete="off">

        </form>


texts: 404 Page not found error when I try to access Custom module in Magento 2.1

texts:
My customer model reposites is In https://github.com/aloha1003/magento-question

I put DemoMod dir  in /app/code/local

and execute
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cahce:flush

But open browser on http://localhost/magento/demo/index/index

And got 404 page not found error.

How could I fix it ?


texts: Magento2 How to apply CSS on static block class in PWA

texts:
I have created one Static block and added below content in :

Called this static block in CMS page

{{block class="Magento\\Cms\\Block\\Block" block_id="hero-banner"}}

How can I apply css on hero-banner class in PWA ?

I can add css only HTML tags.


texts: Magento 2 How to get only one field data in collection

texts:
I want to get only one field data in my custom module collection.   For ex:

getting following data in collection:

Array
   (
[0] => Array
    (
        [banner_id] => 1
        [banner_title] => Banner 1
        [banner_image] => banner_banner/4/_/4.jpg
        [banner_status] => 0
        [banner_link] => http://google.com
        [banner_sortorder] => 1
    )

)

getting this array in  collection response. I need only one value in collection response banner_image. I don't want all the data in collection response.  How can i do that?

Is there any method  that allows me to fetch only that specific field data instead of loading entire collection?

I want following result only:

   Array
   (
   [0] => Array
    (

        [banner_image] => banner_banner/4/_/4.jpg

    ),
   [2] => Array
    (

        [banner_image] => banner_banner/2/_/892.jpg

    )

)


texts: add custom csv upload field in System.xml file

texts:
Hi i have created a custom module and added a custom file upload link

Here is the output image

System.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="test" translate="label" sortOrder="200">

                Test

        </tab>

            Zipcode
            <tab>test</tab>
            <resource>Learn_Module::config_module</resource>
            <group id="config" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                Check delivery postcode
                <field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    Enabled
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="postcodes" translate="label" type="textarea" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    Postcodes
                    <comment>Comma-separated</comment>
                    <depends><field id="enable">1</field></depends>
                </field>

                <field id="custom_file_upload" translate="label" type="Magento\Config\Block\System\Config\Form\Field\File" sortOrder="30" showInDefault="1" showInWebsite="1" >
                 Upload Csv File
                 <backend_model>Magento\Config\Model\Config\Backend\File</backend_model>
                 <upload_dir>pub/media/myupload</upload_dir>
                </field>

                <field id="success_message" translate="label" type="text" sortOrder="21" showInDefault="1" showInWebsite="1" showInStore="1">
                    Success message
                    <depends><field id="enable">1</field></depends>
                </field>
                <field id="error_message" translate="label" type="text" sortOrder="22" showInDefault="1" showInWebsite="1" showInStore="1">
                    Error message
                    <depends><field id="enable">1</field></depends>
                </field>
            </group>

    </system>
</config>

Now i want to upload csv file of zipcodes but am not totaly sure how to upload it can anyone please help me


texts: It is possible to add a customer into a Magento 1 directly through MySql statement?

texts: I just tried, added data into customer_entity, customer_entity_varchar  and customer_entity_int tables but they do not appear in the admin grid, there is another table to take in mind?


texts: How to display CMS block in my latest product page?

texts:
I have my latest product page called in the file latest.phtml, I need to add a cms block in this page updating its layout.xml. Note that this is not a cms page. I want to put the block in the left sidebar.

Thanks in advance


texts:
We are using Magento 2 and we want to setup different currency for different product like Product1 IN USD, product2 IN EURO and Product3 IN INR and create a bundle product(Eg: - Bundleproduct) of all these 3 products, and when it is checked out the purchase of Invoice should be base on the Currency of the Product.

Any Help would be appricated.


texts: How to update bundle product items programatically?

texts: I have a bundle product i want to add update and delete bundle item and also check if items are identical in selection.Suggest me some solution.


texts: Why would you use getUrl('checkout/url') without adding the _secure parameter?

texts:
As far as I know the function checks whether HTTPS is activated over the backend. Why would you pass the function to go without it then?

Example:

$this->getUrl('checkout/cart');

Returns http://localhost/checkout/cart/ whilst

 $this->getUrl('checkout/cart', array("_secure"=>true));

returns https://localhost/checkout/cart/, but only when its active in the backend. You could call app() and check for the value as well, but its just burning calculating time on the server as the function will only return https when it is enabled anyhow.


texts: Magento1 Get Item Details From Order Collection

texts:
in magento 1.9 i am working on order collection i am getting order collection successfully using below code now i want to get item details from order how i can get this .i am using this collection

$orders = Mage::getModel('sales/order')->getCollection()
->addAttributeToFilter('created_at', array('from'=>$fromDate, 'to'=>$toDate));


texts:
module-sales/view/adminhtml/templates/order/create/form/account.phtml

has the following code:

<?php echo $block->getForm()->getHtml() ?>

How can I found out which block that is?#


texts: How to create search box in navigation layer?

texts:
How to implement search box in navigation layer ? Please suggest me some idea for this?

My Layer navigation code

                <?php $_filters = $this->getFilters() ?>
                <?php foreach ($_filters as $_filter): ?>
                <?php if($_filter->getItemsCount()): ?>

<?php echo $this->__($_filter->getName()) ?>

<?php echo $_filter->getHtml() ?>

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


texts: Cannot read contents from file.. Warning! file_get_contents Magento 2

texts:
I have file type custom option.When i browse any image and add to cart the products then it shows me error.
Please check attached screenshot.

I have already give the permission.
Please help.Your help would be highly appreciated.


texts:
Im attempting to speed up a magento 2 store and have noticed within Profiler the step routers_match which takes over a 1.3s of the total time 1.7s.

Is this supposed to take this long? When the page is cached this step no longer exists which is good however am wondering if there is some more information about this step, how long it takes normally and if there is a way to speed it up?

The store is currently only 3000 products but will go up to 10000+ so am worried this will get increasingly worse.


texts:
Using customised Magento ver. 1.7.0.2, how I display/export customer list with last login date?

I am looking for last login date and never logged in.


texts:
I am writing to ask you an opinion on how to create an app for my website in magento . Where could I go to create it ? I read that Magento to already have the ability to create your own custom app . Where can I find a good tutorial for this?

Thank you so much for any help and straight


texts: Hide categories in left navigation only for selected categories

texts:
I want the left navigation menu to display the categories and subcategories only for selected categories. I still want to display the layered navigation. I added the following to the "Custom Layout Update" but it hides the whole content of the columns

<remove name="left"/>

How do I hide just the category block? I also tried the following but no luck:

<reference name="left">
    <remove name="catalog.leftnav"></remove>
</reference>


texts:
With Magento 2.4 I install elasctic search
The test of connexion ist'OK in BO
But when i renindex I have this error :
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Catalog Search index PHP Fatal error:  Uncaught Error: Cannot instantiate interface Magento\InventoryIndexer\Model\StockIndexTableNameResolverInterface in /var/www/vhosts/vedelbois2.quatrys.fr/httpdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50
Stack trace:
#0 /var/www/vhosts/vedelbois2.quatrys.fr/httpdocs/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create()
#1 /var/www/vhosts/vedelbois2.quatrys.fr/httpdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(170): Magento\Framework\ObjectManager\ObjectManager->get()
#2 /var/www/vhosts/vedelbois2.quatrys.fr/httpdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument()
#3 /var/www/vhosts/vedelbois2.quatrys.fr/httpdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(239): Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument()
#4 /var/www/vhosts/v in /var/www/vhosts/vedelbois2.quatrys.fr/httpdocs/vendor/magento/framework/ObjectManager/Fact

Anyone can you help me ?
How to Solve IT ?
THANKS


texts:
I am aware about the CDN and configuring it into Magento 2 from system configuration.

I just want to know how CDN works internally in magento codebase?

As I am developing an module to upload the product images from website fronend so how will they reflect?

Is there any cron works behind it to serve the images on CDN server?

Is there any command to flush CDN cache (depend on CDN type)?

or any code snippet for work around?


texts:
For certain cases during adding to cart, I am creating a custom option to the product. As far as I understood this should create a new cart/order item even if the sane product with different values for the custom option is already present.

productA->customOptionA and productA->customOptionBshould appear in separate rows in the cart instead of the latter adding qty on the former.

Now I want to check all my orders if there is an order item with customOptionB.

My first thought was to iterate through the orders, iterate there through the order items and iterate there through the custom options... but isn't there an easier way?

I am stuck in the search for details on order items.


texts: Magento2 customer emails for sales being received but not admin

texts:
Magento2 customer emails for sales being received but not the admin. Using Magento version 2.1.9

The customer receipt for order, shipping, credit emails are being received, but not admin.

I have already added in an email for each in the bcc area, but email not coming out. I have also changed the receiving email address to different mailboxes from different domains but makes no difference.

We have 2 other Magento2 installs on the same server with same settings that are working fine.
Cron is enabled on all 3 domains and working. Any ideas on how to debug and fix?


texts:
RSS page shows an error

This page contains the following errors:
error on line 1 at column 7: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.

Anyone knows what to do with this?


texts: Can't edit HTML of a field in admin area

texts:
I want to edit HTML of "Url key" field in product editing form in Magento 2 admin area appending some additional HTML to it. Magento 2.2.9.

I tried editing method UrlKeyRenderer::getElementHtml() but this method doesn't seem to be called when I open the product editing page, because if I change what the method returns or even if I just throw a LocalizedException at the beginning of the method, nothing is changed on the product editing page.

Cleaning page cache with bin/magento cache:flush doesn't help.

How do I change the field's HTML?

This is the field I want to edit:


texts: Can someone help me how to copy layouts of page builder(i. e html content) from one page to another in enterprise edition magento2. 3, is there a way to do


texts: How to count only enabled product from product_link collection

texts:
I've found in a template file, a code like the one below:

$collection = Mage::getModel('catalog/product_link')
            ->getCollection()
            ->addFieldToFilter('product_id', $_product->getId());

It's used to display additional tabs in product view if($collection->count()), the problem is that it doesn't care if products in collection are enabled or disabled.

What would be the easiest way to count, using "the same code", only the enabled products?