texts: n98-magerun: Do we need to drop the old database before importing the new one?

texts: Do I always have to drop all tables in the old database before importing a new one, or can I just import the new one and it will automatically just update the old database with the new infos?


texts: Use base64_decode and base64_encode as per Magento ECG

texts:
I am using the base64_decode() and base64_encode() in my code but PHPCS says
The use of function base64_decode() is discouraged so what's the equivalence of this core PHP function in Magento2?


texts:
I tried to create new store view in Magento 2.
I have already set Website>Store>Store View(English)

Name : product-en
Code : product_en
Status : Enable
Sort Order : 0

I wanted to create store view (Chinese) on the same level(in the same Store)

Name : product-zh
Code : product_zh
Status : Enable
Sort Order : 0

But I faced following issue.

"Something went wrong while saving. Please review the error log."


texts: How to install magento patch on old version

texts:
I have a 2.3.1 magento and i want to install the last security patch from 2.3.5.
Can your confirm me that i have to install a least the 2.3.4 magento version before ?

I am confused beceause With magento 1 it was possible to install security patch for old version, it seem very risky to upgrade magento version each time no ?


texts: Magento 2 : Error when trying to display the content of a static block on the product view page via a widget

texts:
I am trying to display from a certain category on all my product detail page. I can use the following code on any cms page and the content is displayed.

{{block class="Smartwave\Filterproducts\Block\Home\LatestList" name="latest_product" product_count="10" hide-addtolinks="1" aspect_ratio="1" image_width="300" image_height="200" category_id="4"template="owl_list.phtml"}}

So as i want this to be displayed on the product details page along with other html code. I did the following:
1. Created a static block and added the above code along with my other content.
2. Created a static block widget and allocated it to content bottom for the product pages.
3. Refreshed Cache.

The problem I am having is that on the frontend i am getting the following error :

Error filtering template: Warning: Illegal offset type in /public_html/sitenm/vendor/magento/module-catalog/Model/CategoryRepository.php on line 110

I am not sure what the what i am meant to do to over come this error. I did add the widget and static block to see if the content is displayed on other pages and it worked. I tested it on other CMS pages (home, about) also on Category pages. The blocks were being displayed.

The issue seems to be only on the product view/details page on which i want to display this block.

Please can I get some advice on how to solve this problem. Thanks


texts:
I have to set the whole website using https. I've already set on use in frontend area option and forced the unsecure base url to use https.

Then, in order to permanent redirect old url to https, I've set the code below in .htaccess:

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Unfortunately every http request is just redirected to the home page instead of the equivalent https page.

Any idea about solving this issue?
thanks very much


texts: Magento - How call customer attribute in CMS?

texts:
I want to know how can I call a custom customer attribute's  to my CMS.
I tried something like : {{var customer.custom ('attribute_code')}} but It's not working.
I hope I expressed myself well :)
Thank you.


texts: Magento 2 add simple products to configurable products

texts:
I am having trouble associating a newly created simple product to an existing configurable product that already have simple products associated.

Using the code below, it will delete the existing simple products associated to the configurable product and add the new one. I want to keep the old simple products associated with the configurable product.

$product = $this->productRepository->get($sku);
$product->setAssociatedProductIds($new_simple_product_ids);
$this->productRepository->save($product);

I also seems that if configurable products doesn't have any simple products yet it will fail with this error:

[Magento\Framework\Exception\InputException] Option values are not specified.

I have tried going through different approaches it this seems the closes but I am unsure how it applies to my problem:

Programmatically create a configurable product and assign the simple product to configurable product in Magento2 product


texts: Magento 2 Templating, Edit phtml or .xml Performance

texts:
As i am new to Magento Developement i came up with the following Question:

Should i edit the phtml files directly or is it better to add Containers and Move Elements within  the Default.xml?

<referenceContainer name="header.container">
          <container name="header.cwrapper" htmlTag="div" htmlClass="headroom-wrapper">
            <container name="header.sticky" htmlTag="div" htmlId="chrome-sticky-header" htmlClass="headroom">
              <container name="headroom.main" htmlTag="div" htmlClass="headroom-main">

              </container>
            </container>
          </container>

        </referenceContainer>
        <move element="header-wrapper" destination="headroom.main" />

Instead of Processing Container after Container and Moving the Wrapper into the new Containers, wouldn't it be smarter to do it directly within the phtml?

Magento 2 layout XML <move /> performance


texts:
I'm using this code on module installer:

$installer = $this;
$installer->startSetup();
$installer->addAttribute("quote_item", "cart_glasses_espessura", array("type"=>"varchar"));
$installer->addAttribute("quote_item", "cart_glasses_right_sphere", array("type"=>"decimal"));
$installer->addAttribute("quote_item", "cart_glasses_right_cylinder", array("type"=>"decimal"));
$installer->addAttribute("quote_item", "cart_glasses_left_sphere", array("type"=>"decimal"));
$installer->addAttribute("quote_item", "cart_glasses_left_cylinder", array("type"=>"decimal"));
$installer->addAttribute("order_item", "cart_glasses_espessura", array("type"=>"decimal"));
$installer->addAttribute("order_item", "cart_glasses_right_sphere", array("type"=>"decimal"));
$installer->addAttribute("order_item", "cart_glasses_right_cylinder", array("type"=>"decimal"));
$installer->addAttribute("order_item", "cart_glasses_left_sphere", array("type"=>"decimal"));
$installer->addAttribute("order_item", "cart_glasses_left_cylinder", array("type"=>"decimal"));
$installer->addAttribute("quote_item", "cart_original_cart_price", array("type"=>"decimal"));
$installer->addAttribute("quote_item", "cart_mood_rule_applied", array("type"=>"varchar"));
$installer->addAttribute("order_item", "cart_original_cart_price", array("type"=>"decimal"));
$installer->addAttribute("order_item", "cart_mood_rule_applied", array("type"=>"varchar"));
$installer->addAttribute("quote_item", "cart_mood_voucher_applied", array("type"=>"varchar"));
$installer->addAttribute("order_item", "cart_mood_voucher_applied", array("type"=>"varchar"));
$installer->addAttribute("quote", "cart_mood_voucher_applied", array("type"=>"varchar"));
$installer->addAttribute("order", "cart_mood_voucher_applied", array("type"=>"varchar"));
$installer->endSetup();

With this i want to add new attributes to my cart and order.
On my local it works perfectly and allows me to finish the rest of the code but when i put it online i get an error:

Error in file: "/var/www/website.com/base_folder/app/code/local/Moodoptic/Moodcartrules/sql/salesattribute1510844983_setup/mysql4-install-0.1.0.php" - SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'cart_glasses_right_sphere'

I have checked several times and the attributes are not there before installing.
And its working on my local, this is happening only on live.

Why? And someone know wath is the problem?


texts: Duplicate button error on Admin->Create Order Page using existing customer

texts: I am using Magento Enterprise 2.1.9 version. On Create Order Page (admin) if I change customer group, buttons "Add Products By SKU" and "Add Products" are getting duplicate. This is a existing bug in Magento. Can anyone please help me how to rectify this.


texts:
I have this problem:

  Compilation from source:  frontend/my_vendor/my_theme/en_US/css/email-fonts.less {{{
  Compilation from source:  frontend/my_vendor/my_theme/en_US/css/email-fonts.less }}{{
  Compilation from source:  frontend/my_vendor/my_theme/en_US/css/email-fonts.less }}{{
  Compilation from source:  frontend/my_vendor/my_theme/en_US/css/email-fonts.less }}{{theme}}}

problem shows at deploying the file frontend/my_vendor/my_theme/en_US/css/email-fonts.css

I am new to Magento and I do not know what to fix. My version is 2.1.0

.htaccess file is in pub\static

view source shows /pub/static/frontend/my_vendor/new/el_GR/

el_gr is created after en_us I think so no theme is showing

data show correctly on a no theme page

found something here but no answer available or understood by me

Static content deploy - Compilation from source

plz help ...... thank you


texts: Display product name from different store view in admin

texts:
I have multiple store views in my Magento, each one with a different language. All stores have the same products, but each store view has a different product name for that language. Is it possible to set a default store view for the admin?

For example: If someone places an order from the Spanish store view, I would like to go to Sales > Orders, open that order and see the products in English instead of Spanish.

Thanks!


texts: How to override vendor module in magento 2 via code

texts:
Following is the code
- override is not working

  app/code/Bensupply/DisplaySupplierName/etc/module.xml

<?xml version="1.0"?>


texts: Non-secure links on secure pages causing warnings (Parts of this page are not secure)

texts:
My website on the checkout page is not sending everything as HTTPS, causing Firefox to give me the yellow padlock with the "Parts of this page are not secure" warning. Chrome also warns that "This page includes other resources which are not secure". You can replicate this by adding anything to the cart and going to the checkout page.

It appears only the body is loading HTTPS which seems to be causing the error. I considered making the entire site HTTPS as I read Google rewards sites that do so, however I have also read many comments about this being a bad idea, especially if you have cache enabled.

I noticed links beginning with / (like /store) switch to HTTPS correctly and links like {{media url="}} or {{base url="}} don't. However I doubt the ideal fix is to change all my links to "/". Also not sure it's even possible if I choose to do so.

To answer the question, yes I have the secure URL set in the (System->Settings->Web) section.
Any suggestions on how to stop browsers from seeing my page as insecure?


texts: Magento2 Create eav_attribute for catalog

texts:
I'm trying to understand how magento2 is creating attributes in initial installation and using this I'm trying to create my own attribute.

For example I'd like to create duplicate of thumbnail attribute.

I followed the instruction in this article: https://www.atwix.com/magento/adding-attribute-programatically-magento2/

But I'm getting an error (I got error with report which refer to class below)

    <type name="Magento\Framework\Module\Updater\SetupFactory">

As I have no Magento\Framework\Module\ Updater folder. What am I doing wrong?

Then I tried to look how magento does it resolve.

I have opened Catalog/Setup folder and found file, which is creating attributes just like I need (Setup/CategorySetup). For example:

                'thumbnail' => [
                    'type' => 'varchar',
                    'label' => 'Thumbnail',
                    'input' => 'media_image',
                    'frontend' => 'Magento\Catalog\Model\Product\Attribute\Frontend\Image',
                    'required' => false,
                    'sort_order' => 3,
                    'global' => \Magento\Catalog\Model\Resource\Eav\Attribute::SCOPE_STORE,
                    'used_in_product_listing' => true,
                    'group' => 'Images',
                ],

this is a part of

    public function getDefaultEntities()

But I can't find where does this method calls(1 question), as it runs only once when magento installs and it's impossible to put breakpoint

2. Which file executes by default? Is it InstallData/Schema? Should I write anything in config to say magento execute installation script (as it done in magento 1 in core_setup directive)

p.s. Any article on this topic will be appreciated.


texts:
When I import special_price on a specific store, I would like reindex price only for this store.
I found this :

Mage::getSingleton('catalogindex/indexer')->plainReindex(null, null, $store);

But that reindex all indexes.
I also found this :

$indexer = Mage::getSingleton('index/indexer');
$process = $indexer->getProcessByCode('catalog_product_price');
$process->reindexEverything();

But that reindex for all stores.
So I would like a mix of both solutions : reindex for specific index and specific store.
Do you know if it's possible and how ?


texts: Order is not getting generated at magento 2.3 but payment successfully done paypal

texts:
Have a look at the problem here. https://github.com/magento/magento2/issues/25550

Preconditions (*)

Magento 2 upgrade from Magento 2.2.6 to 2.3.2
Paypal express method
Steps to reproduce ()
create any customer with Magento 2.2.
upgrade the Magento 2.2.* to Magento 2.3.2
enable Paypal express checkout
Expected result ()
order should be recorded in Magento 2.3.2 backend
Actual result ()
customer is charged properly.
payment deducted from their account and deposited to client's account
No order found in the backend and that order id skip
This is a very terrible case, The version upgrade should ease the user experience and of course the developer but it shouldn't introduce a new bug or errors.

I had made a dip dive into the code base and here is the process of how PayPal checkout happen.

SetExpressCheckout
GetExpressCheckoutDetails
DoExpressCheckoutPayment
I suspect the following from the core file and log files that.

GetExpressCheckoutDetails doesn't get a SHIPTOPHONENUM when order are recorded in the backend but charged
In addition to this, I have also come to know that 3. DoExpressCheckoutPayment is not sending an email and phone number data in the array and sending null instead.

The following exception might be the cause of the above

We can't save the address: Email has a wrong format

We are getting a lot of orders through PayPal express too and it's not a constant issue but we are having a problem with 1 to 2 orders a day and mostly happen with old customer account ( which was done while with Magento 2.2.6)

I am looking for any thoughts on this from an expert developer and Magento core team what potential causes would be there apart from my analysis.

Let me know your thought and any quick help will be highly appreciated.

Regards,
Sam


texts:
I have installed dev enviroments for magento 2 based in configuration beta provides
But js not load even i already have setup permissions and installed sampledata
Anyone know how to fix it?
 Running in ubuntu 16.10 with docker 1.13.0 MagentoCE2.1.3

Frontend


texts: How to send BCC email after subscription for newsletter on magento?

texts:
Is it possible I add my email as Bcc to get email any time someone successfully subscribe for newsletter in Magento?

This is really important for us to be notified any time someone subscribe for newsletter.

Observer.php

<?php

class Mydons_Newsletteralert_Model_Observer
{
    const XML_PATH_EMAIL_TEMPLATE = 'newsletter_alert_template';

    public function newsletteralert($observer)
    {
        $eventname = $observer->getEvent()->getName();
        $subscriber = $observer->getEvent()->getSubscriber();
        $email = $subscriber->getEmail();
        $id = $subscriber->getId();

        $emailtemplate = Mage::getModel('core/email_template')->loadDefault(self::XML_PATH_EMAIL_TEMPLATE);
        $sender = array();
        $sender['name'] = 'admin';
        $sender['email'] = 'ghorbanisaghi@yahoo.com';
        try{
            $emailtemplate->sendTransactional(
                self::XML_PATH_EMAIL_TEMPLATE,
                $sender,
                'saghi.ghorbani@tricorsenedi.com',
                'admin',
                array('subscriber' => $subscriber)
            );
        }
        catch(Mage_Core_Exception $e){
            echo $e->getMessage();
            Mage::log($e->getMessage(), null, 'newsletter.log');
        }
    }
}

config.xml

<config>
    <modules>
        <Mydons_Newsletteralert>
            <version>0.1.0</version>
        </Mydons_Newsletteralert>
    </modules>
    <global>
        <models>
            <Mydons_Newsletteralert>
                <class>Mydons_Newsletteralert_Model</class>
            </Mydons_Newsletteralert>
        </models>
        <template>
            <email>
                <newsletter_alert_template template="label" module="mydons">
                    <label>Newsletter Alert to Admin</label>
                    <file>newsletter_bcc_email.html</file>
                    <type>html</type>
                </newsletter_alert_template>
            </email>
        </template>
    </global>
    <frontend>
        <events>
            <newsletter_subscriber_save_after>
                <observers>
                    <Mydons_Newsletteralert_Model_Observer>
                        <type>singleton</type>
                        <class>Mydons_Newsletteralert_Model_Observer</class>
                        <method>newsletteralert</method>
                    </Mydons_Newsletteralert_Model_Observer>
                </observers>
            </newsletter_subscriber_save_after>
        </events>
    </frontend>
</config>


texts: Credit memo refund more than original invoice due to return shipping costs

texts:
A customer returned his product (because he received the wrong one) using another shipper which costs more than ours and wants a refund for his product and shipping costs.

I try to refund this but the Magento system does not allow the credit memo to exceed the value of the original invoice. Even when I add it as an adjustment fee or whatever.

What would be the correct way of dealing with this?


texts: Issue in applying Date filter on collection

texts:
I have an attribute with code "open_date", for customer address. data is being saved in db in format 29/01/2017, I am trying to apply filter to get store opening in next two weeks. What I have tried is

$fromDate = Mage::getModel('core/date')->date('d/m/Y');//    06/01/2017
$toDate = date('d/m/Y', strtotime("+2 week"));//             20/01/2017

$collection = Mage::getResourceModel('customer/address_collection');
$collection->addAttributeToFilter('open_date', array('from' => $fromDate, true));
$collection->addAttributeToFilter('open_date', array('to' => $toDate, true));

and also

$collection = Mage::getResourceModel('customer/address_collection');
$collection->addAttributeToFilter('open_date', array('from'=>$fromDate, 'to'=>$toDate));

and also

$collection->addAttributeToFilter('open_date', array('gteq' => $fromDate));
$collection->addAttributeToFilter('open_date', array('lteq' => $toDate));

And have tried some other methods.

$coutn = count($collection);
$ids = $collection->getAllIds();

count and ids have not correct records. with above dates, count should be two(2), but it has 10 in it.


texts: ElasticSearch recommended sizing - Magento 2.3.5-p1

texts:
we are thinking of introducing an ElasticSearch 7.9 instance within Magento.
We have a catalog of 600 products more or less, what can be a recommended sizing for ElasticSearch on a Magento 2.3.5 application?


texts: How to restrict Shipping Method options based on a product attribute?

texts:
I want to disable USPS on the frontend if a product's length is over 12" (the max size USPS box we use).

I understand there is an extension, Amasty Shipping Restrictions that gets high praise, but this is much more complex than I require.

Is there a straightforward way to program this into my checkout rules?


texts: PWA Setup in Magento 2.3.1 on Windows 10 Pro

texts: I've everything setup ready according to https://magento-research.github.io/pwa-studio/venia-pwa-concept/setup/


texts:
Good morning,

We are currently using Magento and trying to list 'Processing' orders as default. We have located the status dropdown column but can't figure out how to set 'Processing' as default.

We would love some help on this,
Thank you.

$this->addColumn('status', array(
            'header' => Mage::helper('sales')->__('Status'),
            'index' => 'status',
            'type'  => 'options',
            'width' => '70px',
            'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
        ));


texts:
Let as assume i got 1 order that order have 10 product's after that some reason i want to Delete or Cancel  for particular product only i can keep 9 product . After Delete/cancel total also update based on product.

i want to UI wise if admin click delete button particular product only delete from that order

How i done this?


texts: Magento 2.3.4 issue on product view page

texts:
Any help will be appreciated:
I installed the theme on Magento 2.3.4 (fully setup installation & theme also) but facing multiple errors on the product view page. Theme Details: Spicia Theme
Theme Link: https://ld-magento-72.template-help.com/magento_eze-289/?i=99499&pr_code=z2x5P5eD1537DEbaJXgDTNkIIC33HC
Staging Website Link: asaspice.ae
List of Issues:
1:On the product view, page mini cart and summary count does not show as soon as you click on a cart it will take you to the shopping cart page.
2: When you click add to cart it will load the page as its added the product but will not show the message that product has been added to cart successfully on that page until you go to any other page. And sometimes it will add the product to cart or sometimes it will session expired (Invalid form key).
3: On Laptop view, The product Description and other details won't show but when you open the same page on mobile it will show all the details. For Reference the link of a product page: https://asaspice.ae/9911135.html
4: On Mobile or responsive device the Menu will not open
5: Configurable options will not show on the product view page
6: Add to cart button was disabled after installation (I enabled it into addtocart.phtml)
All the bugs issues are only appearing on the product view page, else all is fine but the product view page is messed up. Did Full package installation then tried theme only installation and tried all other things which I could as Magento No-ob but no luck my bad is Template monster is also not responding to my emails though I still have 4 months of support.
P.S: After Adding a Product Redirect to Shopping Cart is enabled currently
I am stuck any help will be appreciated.


texts:
I've got a standard Magento 1.8.0.0 installation on Windows 7
using the BitNami Magento installation for XAMPP.

When I open the Sales -> Invoices screen and click on an
invoice and then click on the orange Print button in the
upper right hand corner of the screen I get the following
error message inside the web browser:

  Fatal error: Declaration of
  Zend_Pdf_FileParserDataSource_File::__construct() must be compatible
  with Zend_Pdf_FileParserDataSource::__construct() in
  C:\xampp\apps\magento\htdocs\lib\Zend\Pdf\FileParserDataSource\File.php
  on line 41

Anyone know why I am getting this and how to fix this?


texts:
I would like to add a new column inside the magento2 database.
Write now i add a \Magento\Framework\DB\Ddl\Table::TYPE_TEXT as the column type. here is my code

    if(!$installer->getConnection()->tableColumnExists('review_detail', 'email')) {
        $definition = [
            'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
            'size' => 255,
            ['nullable' => true, 'length' => 255],
            'comment' => 'User Email'
        ];
        $installer->getConnection()->addColumn(
            'review_detail',
            'email',
            $definition
        );
    }

right now, when i do my php bin/magento setup:upgrade the new column are set as text(65535).

I'm using MySQL as database.  How i can set the new column as VARCHAR(255)? i've looked on several website and everything i see is to use TYPE_TEXT with a size under 255 to setup a VARCHAR.


texts: Magento 1 base image same selection as thumbnail or small image

texts:
Something went wrong with the import of many products.
Only the small image and thumbnail are selected.

Now I want to set the base image the same as the small image and thumbnail.

How can I achieve this?

I tried this, but that does not work.

<?php
require 'app/Mage.php';
Mage::app();

$products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
foreach ($products as $product) {
    if (!$product->hasImage()) {
        $product->setImage($product->getSmallImage());
    }
$product->save();
}
?>


texts:
Is there a way to only allow one item to be added to the shopping cart and then checked out.

I tried the event + observer addition in this link: How to allow only one product in a cart?

But it doesn't seem to work with V1.9.2.3 As I am still able to add more than item to the cart and make it all the way to checkout.


texts: Magento 2 after running upgrade command images, css & js deleted

texts:
Whenever I run upgrade command in Magento 2, some of my CSS and JS and Images files deleted automatically, sometimes deleted from third party modules, and sometimes deleted from magento vendor folder.

Please guide me!


texts: How to filter product collection using 2 or more category filters in magento2?

texts: How to filter product collection using more than two category. In magento1, we can use ->addAttributeToFilter('category_ids',array('finset'=>'36,37')); but how can i do this in magento2? Also i have checked Multiple category filter extension. Collection show correct but other filters (Like Price,color) and collection size and pagination give a wrong data.


texts: Is it possible to create a bespoke category page with only select filter options that won't affect other category pages?


texts: How to customize 'Order Total Report' (REPORTS > Customers > Order Total) in magento 2.2.6

texts:
I need to achieve this:

  In 'Order Total Report' (REPORTS > Customers > Order Total) add new
  columns, 'ID', 'Affiliate ID', 'Total BVP Purchase'.

'ID' ==> will display Customer ID

'Affiliate ID'  ==> will display Custom customer attribute value stored in 'affiliate_id'.

‘BVP Total'  ==> will display total successful purchase done in BVP by particular customer during that period. Product’s BVP value is stored in custom product attribute ‘product_bvp’. Kindly check screenshot attached for BVP. (Note.Price & BVP are 2 different entities. Currently it's calculating Total price. Similarly I want
Total BVP).

Upon exporting report to CSV it should display above extra 3 columns
with default columns.


texts: Why Mage_Catalog_Block_Layer_Filter_Price is not getting overridden in live site?

texts:
I'm working with Magento EE 1.12.0.0

In one of my modules I have overridden Mage_Catalog_Block_Layer_Filter_Price and it works perfectly fine in my localhost, but when I install the same module in my live site, it doesn't  work.

That means

  all the files are getting overridden except
  "Royal_Filters_Block_Catalog_Layer_Filter_Price" which extends
  Mage_Catalog_Block_Layer_Filter_Price

my config file:

<global>
...
<blocks>
        <catalog>
            <rewrite>
                <layer_state>Royal_Filters_Block_Catalog_Layer_State</layer_state>
                <layer_view>Royal_Filters_Block_Catalog_Layer_View</layer_view>
                <product_list_toolbar>Royal_Filters_Block_Catalog_Product_List_Toolbar</product_list_toolbar>
                <layer_filter_attribute>Royal_Filters_Block_Catalog_Layer_Filter_Attribute</layer_filter_attribute>
                <layer_filter_price>Royal_Filters_Block_Catalog_Layer_Filter_Price</layer_filter_price>
            </rewrite>
        </catalog>
...
</blocks>
...
</global>

All the other four classes are overridden but not the last one.

Also my other modules work good and fine.

My live site is exactly the same as in my localhost.

But still live site
uses Mage_Catalog_Block_Layer_Filter_Decimal. can I override Mage_Catalog_Block_Layer_Filter_Decimal instead of Mage_Catalog_Block_Layer_Filter_Price, will it work?


texts:
Trying to mass update some attributes of products but when I try to open the update attributes form I get an error..

any ideas of the cause?

  1 exception(s): Exception #0 (Exception): Notice: Undefined offset:
  32000 in
  /vendor/magento/module-catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml
  on line 37

  Exception #0 (Exception): Notice: Undefined offset: 32000 in
  /vendor/magento/module-catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml
  on line 37 #1 include() called at
  [vendor/magento/framework/View/TemplateEngine/Php.php:59]


texts: Magento 2 Product Custom Attribute in API rest

texts:
I added a product custom attribute (type text) through the admin interface.

Now I'm trying to save a product through the api rest but if I include the new attribute in the data passed I get this error:

Property "NeedsSync" does not have corresponding setter in class "Magento\Catalog\Api\Data\ProductInterface"

I've read about extension attributes but I'm not sure if that's the way to do this in particular case.

I've tried to add as extension attribute by adding a etc/extension_attributes.xml with this content:

<extension_attributes for="Magento\Catalog\Api\Data\ProductInterface">
    <attribute code="needs_sync" type="string">
    </attribute>
</extension_attributes>

I've also read about the way of definig database table and join in the extension_attribute.xml for this attribute but I'm not sure this is the correct way, as this is a eav attribute for product entity so it is not a new table...


texts: How to re-index only one product in Magento 2?

texts:
I have added the product using REST API in Magento 2 I want to re-index only one inserted product not fully reindex just one that inserted product.
How to do that ?
Any help is appriciated.


texts: How to name the browser tab title magento2

texts:
How to set the browser tab title for a module.

UPDATE:

i tried as:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Core/etc/config.xsd">
<default>
    <mpage>
        <general>
            <enable_in_frontend>1</enable_in_frontend>
            <head_title>My Title</head_title>
        </general>
    </mpage>
</default>
</config>

But still i get the url itself shows in my broswer tab..not the title i defined..


texts:
$model = Mage::getModel('catalog/product');
$_product = $model->load($product_id);
$stocklevel = (int)Mage::getModel('cataloginventory/stock_item')
                ->loadByProduct($_product)->getQty();
    $order = Mage::getModel('sales/order')->load($orderId);//get order id
    $items = $order->getItemsCollection();
    foreach($items as $i){
    $product_id = $i->product_id;
    $_product = $model->load($product_id);
    $stocklevel = (int)Mage::getModel('cataloginventory/stock_item')
            ->loadByProduct($_product)->getQty();
    $product_sku = $i->getsku();
    $product_name = $i->getName();
    $quantity_ordered = round($i->getqty_ordered());
    if($stocklevel==0)
    {
    $product_detail.="

".$product_sku. "	".$quantity_ordered."X".$product_name."

";
    }
    else
    {
        $product_detail.="

".$product_sku. "	".$quantity_ordered."X".$product_name."

";

    }
    }
    return $product_detail;

it show configurable product 2 times


texts: Display Review tab after other 2 tabs in product view page

texts:
we are displaying Reviews tab above & other 2 tabs Product secription & Features  below in Product view page , I want to display Reviews tab next to other 2 tabs.

code for 2 tabs [view.phtml]

Product Description

Features

        INSERT FIRST TAB CONTENT HERE

        INSERT SECOND TAB CONTENT HERE

code for Review tab [ app/design/frontend/rwd/theme/template/review/helper/summary_short.phtml ]

<?php if ($this->getReviewsCount()): ?>

        <?php if ($this->getRatingSummary()):?>

                <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%">

        <?php endif;?>
        <a href="#" onclick="var t = opener ? opener.window : window; t.location.href='<?php echo $this->getReviewsUrl() ?>'; return false;"><?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?>

<?php elseif ($this->getDisplayIfEmpty()): ?>

<a href="<?php echo $this->getReviewsUrl() ?>#review-form"><?php echo $this->__('Be the first to review this product') ?>

<?php endif; ?>


texts:
$storeUrl."/index.php/rest/V1/products?searchCriteria[page_size]=200&searchCriteria[currentPage]=1"

It returns products list but I want to get each product link. How it is possible?


texts: Magento inventory rest api returns 404 for some products

texts:
When I try to fetch inventory of a product using /api/rest/stockitems/id URL, I get a 404 error. But when I try to fetch the same product using /api/rest/products/id URL, it works just fine.

GET /api/rest/stockitems/3931    -> Not Found 404

GET /api/rest/products/3931      -> Found 200

This is happening with the products of id between 3807 to 3931.

As an example: if I try to fetch inventory of product 3806 and all the products before it, it works just fine:

GET /api/rest/stockitems/3806    -> Found 200

I am running Magento version 1.8.1.

Why is this happening?

UPDATE:

I should've mentioned earlier that I want to update quantities of products on Magento, and PUT requests aren't working either.


texts: How to create custom admin grid using bolck without using ui component in magento2.2.5?

texts: I want to create custom admin grid using block without using ui component. I dont know how to implement this task. Could you please help me?


texts: Magento 2 Admin doesn't work after migrate from one server to another server

texts:
After transfer from one server to another server.
I am not able to access the admin panel. I am getting below error.


texts: Magento 2 cron error 'Process went away'

texts:
I created custom cron job which is working fine on localhost and was working initially on the server as well but now on the server, it is getting scheduled but status changes from "pending" to "error" and message appeared is "Process went away at 2020-1-10 13:05:05". Please let me know if somebody experienced this, the reason for it?

It is working fine on local server whereas on staging rest of the cron jobs are also working. What is this error due to?


texts: How to render custom blocks in product general description field

texts:
I've created a template in template/catalog/product/view/ which displays a products image, title, sku and view info button. I've done this so that I can add suggested items into my 'description' area on the product detail page.

The template looks like this

<?php
$productId = $this->getProduct_id();
$_product = Mage::getModel('catalog/product')->load($productId); //load the product
?>

<a href="<?php echo $_product->getProductUrl() ?>"><img style="float: left; margin-right: 10px;" src="<?php echo Mage::helper('catalog/image')->init($_product, 'thumbnail')->resize(200, 200); ?>" alt="<?php echo $this->htmlEscape($_product['name']); ?>" border="0" width="200" />

<a style="color: #00a1b1; font-weight: bold; font-size: 15px; margin-bottom: 5px;" href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->stripTags($_product->getName(), null, true) ?>

<?php echo $_formattedSpecialPrice = Mage::helper('core')->currency($_product->getFinalPrice(),true,false); ?> <a href="<?php echo $_product->getProductUrl() ?>"><button type="button" title="view Info" class="button btn-cart">View Info</button>

Item / SKU: <?php echo $_product->getSku(); ?>

<a href="<?php echo $_product->getProductUrl() ?>">Learn More

The shortcode that I use to display looks like this

{{block type="catalog/product_new" product_id="40506" template="catalog/product/view/fap-recommended-product.phtml"}}

It works great on CMS pages

BUT

I cannot use this shortcode in my (product > general > description) field. The output on the front end just displays the short code =( I've looked everywhere online but no one can explain my exact scenario here. Someone please help??

Please note that I do not want to utilize Static Blocks. I am doing this as a short code in the product description and it has to be dynamic in this manner. because we have 100000s of products that are importing from netsuite and i want to be able to import these shortcodes from my descriptions in netsuite.


texts: admin create product, custom attribute validation limit to choose number between

texts:
I have custom product attribute called Donation, I created it by

Catelog->Attribute->Manage-Attribute   Add New Attribute.

Their is no problem, Its working fine, But I need to add validation for this fields,

while creating product admin should give number from 20 to 100, I am mentioning percentage here and 20 is the minimum donation percentage,

I am not able to do this, help me, How to validate this? or how can I restrict the admin to choose number between 20 to 100,?
Thanks in Advance:)


texts: Product's "Layout Update XML" code disappears from the site every 24 hours

texts:
I have some products with "Layout Update XML" Design updates (simple XML pointing to a template file; very basic and in the correct format). Every 24 hours after a cache flush, the code vanishes from the frontend website. The code still exists in the backend product's "Layout Update XML" section, but the frontend website does not show it anymore. Why is this?

I am using Magento 2.2.5 with Varnish to the cache. The Varnish (as per its default setting) seems to clear its cache every 86400 seconds (24 hours). It seems that when it clears itself, the new versions of the website it shows are without the code in the Layout Update XML.

If I run CLI commands "cache:flush" & "cache:clean" and then "service varnish restart", my custom Layout Update XML code begins to show again. However, 24 hours later, it disappears again from the frontend.

Note: this issue only occurs in "Production Mode". In Development Mode, the XML block update never disappears.

What am I doing wrong here? Do you have any advice on how to correct this or, at least, where to look?


texts:
When I create a new order, all data are stored in the quote tables. When I leave the order admin page without saving/submitting the order, the data are not deleted in the quote tables.
My question is, how can I use these data to create a quote, or does an free extension exists to create quotes by using this data?
Christian


texts: Magento 2: How to bind an element in phtml with minicart js model function?

texts:
I want to print the items count in somewhere else, so i create a new phtml like this:
<?php
/** @var $block \Magento\Checkout\Block\Cart\Sidebar */
?>

but i always get an error like this:

Uncaught ReferenceError: Unable to process binding "if:
function(){return getCartParam('summary_count') }" Message:
getCartParam is not defined


texts: What is the difference between using getUrl() and getUrlPath() in Magento?

texts:
What is the difference between using getUrl() and getUrlPath()?

In the following code

$_brands = Mage::getModel('catalog/category');
$subcat = Mage::getModel('catalog/category');

foreach($brand as $brandid)
{
    $_brands->load($brandid);
    echo 'getUrl().'">getImageUrl().'"/>';
}

foreach($sub as $subkey => $subid)
{
    if($subkey%2!=0){ $classid='"sub-odd'; }else { $classid='"sub-even';}
    $subcat->load($subid);
    echo '
getUrl().'">'.$subcat->getName().'
';

}

Using the brand ids and subcat ids that are stored separately I am retrieving the url using getUrl() but for every brands and subcategory always the first brand and subcategory fetched is repated for other brand ids and subcat ids as well. But the getName() and getImageUrl() are working perfectly.

When I changed the getUrl() to getUrlPath() everything worked perfectly.


texts: How to use dependency in multiple dropdown?

texts:
my code:

protected function _prepareForm()
{

    $form = new Varien_Data_Form();
    $this->setForm($form);
    $fieldset = $form->addFieldset("tuition_form", array("legend"=>Mage::helper("tuition")->__("Student information")));

    $fieldset->addField("secondary", "multiselect", array(
        "class" => "required-entry",
        "required" => true,
        "name"=>  "subject[secondary]",
        'values'   => Example_Tuition_Block_Adminhtml_Student_Grid::getValueArray34(),
    ));
     $fieldset->addField("others", "text", array(
        "class" => "required-entry",
        "required" => true,
        "name"=>  "subject[others]",

    ));
    $this->setForm($form);
     $this->setChild('form_after',

        // The content of the "form_after" block is a Mage_Adminhtml_Block_Widget_Form_Element_Dependence block typ
        $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence')
            ->addFieldMap('junior', 'junior')
            ->addFieldMap('others', 'others')

       ->addFieldDependence('others', 'junior', 'chinese')
       );
   return parent::_prepareForm();
}

my multiple dropdown

here if i m select chinese i want text field. if i m select chinese,malay,...etc than i m getting textbox but when i m also select physics or science that time i m not getting textbox how to solve this problem?


texts: Product grid not load ---- Unable to process binding Knockout.js magento 2

texts:
Facing issue when loading product edit page:

  knockout.js:3012

Uncaught ReferenceError:

Unable to process binding

"if:
 function(){return label }"
Message: label is not defined

at if (eval at createBindingsStringEvaluator (knockout.js:2624), <anonymous>:3:55)
at ko.computed.disposeWhenNodeIsRemoved (knockout.js:3989)
at evaluateImmediate (knockout.js:1737)
at Object.ko.computed.ko.dependentObservable (knockout.js:1946)
at init (knockout.js:3988)
at knockout.js:2989
at Object.ignore (knockout.js:1249)
at knockout.js:2988
at Object.arrayForEach (knockout.js:151)
at applyBindingsToNodeInternal (knockout.js:2974)


texts: Configurable Product - Get child product id

texts:
How to get child product id's from parent product id in magento2 for configurable product?

I want to get child product id of parent product in magento based on parent product id.


texts: Data Migration Exception : Undefined offset: 1

texts:
I am trying to migrate data from Magento version 1.9.2.2 to 2.0.0 CE

I was able to run ./magento migrate:settings (mode) , but when I execute data mode, there was an error

[2016-02-16 05:45:23][INFO][mode: data][stage: integrity check][step: EAV Step]:
 started

[2016-02-16 05:45:23][INFO][mode: data][stage: integrity check][step: Customer A
ttributes Step]: started

[2016-02-16 05:45:23][INFO][mode: data][stage: integrity check][step: Map Step]:
 started

[2016-02-16 05:45:31][INFO][mode: data][stage: integrity check][step: Url Rewrit
e Step]: started

[2016-02-16 05:45:31][INFO][mode: data][stage: integrity check][step: Log Step]:
 started

[2016-02-16 05:45:31][INFO][mode: data][stage: integrity check][step: Ratings St
ep]: started

[2016-02-16 05:45:31][INFO][mode: data][stage: integrity check][step: Configurab
lePrices step]: started

[2016-02-16 05:45:31][INFO][mode: data][stage: integrity check][step: OrderGrids
 Step]: started

[2016-02-16 05:45:31][INFO][mode: data][stage: integrity check][step: Tier Price
 Step]: started

[2016-02-16 05:45:31][INFO][mode: data][stage: integrity check][step: SalesIncre
ment Step]: started

[2016-02-16 05:45:31][INFO][mode: data][stage: setup triggers][step: Stage]: sta
rted

[2016-02-16 05:45:50][INFO][mode: data][stage: data migration][step: EAV Step]:
started

 [ErrorException]
 Undefined offset: 1

Noticed eav_attribute_set table in both Mage1 and Mage2 tables

What steps I have missed for migrating data ?


texts: Magento 2: How to change Custom order number

texts:
I'm trying to change sales_order entity_id, but can't. In my client system having 65451 orders, they want to change order number like 95651 for some reason. We can change sales_order increment_id, but is there possibility to change sales_order entity_id?

please suggest us if we can?


texts: checkout_cart_product_add_after fired only once for grouped product

texts:
I m observeing checkout_cart_product_add_after event to modify quote item.

But it seems it fired only once no matter how many qty or item i have added from detail page.

My goal is to change each item with add custom option and change price.

Group product added with all the sub product

I am missing anything here or should I observe another event to make a change in quote item.


texts:
I installed a module with Magento Connect. After install, I found some errors in the backend and removed it from Magento Connect, refreshed, reindexed and cleared cache but still have the error.

When I click to add a new product I see this error:

  There has been an error processing your request

and the file in var/report show

  a:5:{i:0;s:100:"Source model "marketplace/catalog_product_attribute_status" not found for attribute "product_status"";i:1;s:3088:"#0 C:\xampp\htdocs\asai\app\code\core\Mage\Eav\Model\Entity\Attribute\Abstract.php(387): Mage::exception('Mage_Eav', 'Source model "m...')
  1 C:\xampp\htdocs\asai\app\code\core\Mage\Adminhtml\Block\Widget\Form.php(201): Mage_Eav_Model_Entity_Attribute_Abstract->getSource()
  2   C:\xampp\htdocs\asai\app\code\core\Mage\Adminhtml\Block\Catalog\Product\Edit\Tab\Attributes.php(70): Mage_Adminhtml_Block_Widget_Form->_setFieldset(Array, Object(Varien_Data_Form_Element_Fieldset), Array)

How to repair it?
thanks.


texts: How to set up correctly Google Tag Manager and Universal Analytics?

texts:
I have used Google Analytics but I am new to Google Tag Manager. I have installed the GTM extension by Slirx from Magento connect. It seems to support transactions and remarketing which as I understand are necessary functions.

Could you please explain: If one sets in Google Analytics tag type to Transaction instead of Page View, does that mean that page views will not be tracked but only transactions?

What should one do in order to have complete visitor tracking + the ecommerce data too?

Could you please explain shortly the whole process for Magento, clarifying all that, including the settings for Universal Analytics etc?

I am trying to set up correct visitor analytics for a new website.


texts: Supee 6788 isn't installed after upgrading to Magento 1.9.2.2

texts:
I did the upgrading to Magento 1.9.2.2 with Magento Connect but after doing that still appear the message "October 27, 2015: New Magento Security Patch (SUPEE-6788) – Install Immediately".

It's possible?


texts: Magento 2.2: InstallData script never called even though no entry in setup_module

texts:
Hello I have created a module in accordance to the tutorial at Magento Docs

My InstallData class looks like this:

<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

 namespace Learning\ClothingMaterial\Setup;

 use Magento\Framework\Setup\InstallDataInterface;
 use Magento\Framework\Setup\ModuleContextInterface;
 use Magento\Framework\Setup\ModuleDataSetupInterface;

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

     /**
      * Init
      * @param CategorySetupFactory $categorySetupFactory
      */
     public function __construct(\Magento\Eav\Setup\EavSetupFactory $eavSetupFactory)
     {
        $timestamp = time();
        $myfile = fopen("install_log.txt", "a") or die("Unable to open file!");
        fwrite($myfile, $timestamp . " - Install construct start\n");
        fclose($myfile);
         $this->eavSetupFactory = $eavSetupFactory;
     }

     /**
      * {@inheritdoc}
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      * @SuppressWarnings(PHPMD.NPathComplexity)
      */
     public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
     {
        $timestamp = time();
        $myfile = fopen("install_log.txt", "a") or die("Unable to open file!");
        fwrite($myfile, $timestamp . " - Install start\n");
        fclose($myfile);
         $eavSetup = $this->eavSetupFactory->create();
         $eavSetup->addAttribute(
             \Magento\Catalog\Model\Product::ENTITY,
             'clothing_material',
             [
                 'group' => 'General',
                 'type' => 'varchar',
                 'label' => 'Clothing Material',
                 'input' => 'select',
                 'source' => 'Learning\ClothingMaterial\Model\Attribute\Source\Material',
                 'frontend' => 'Learning\ClothingMaterial\Model\Attribute\Frontend\Material',
                 'backend' => 'Learning\ClothingMaterial\Model\Attribute\Backend\Material',
                 'required' => false,
                 'sort_order' => 50,
                 'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
                 'is_used_in_grid' => false,
                 'is_visible_in_grid' => false,
                 'is_filterable_in_grid' => false,
                 'visible' => true,
                 'is_html_allowed_on_front' => true,
                 'visible_on_front' => true
             ]
         );
     }
 }

As you can see I added some write to file operations in order to check whether the class is actually called. The file never gets created. So the constructor and install method have never been called.

I already deleted the corresponding entry in the setup_module table and cleared caches, but it still dosen't get called when "php magento setup:upgrade" is executed.

What can be the reason?


texts: update yes/no attribute programmatically magento

texts:
I have product attribute "is_stock_update_custom".
I need to update this attribute programmatically from CartController.php

I have tried so Far

$product = Mage::getModel("catalog/product")->load($params['product']);
$attributeCode = "is_stock_update_custom";
$value = "Yes";
$product->setData($attributeCode, $value);
$product->save();

In this neither "yes" nor "1" was worked. Please help.


texts: Pincode to check shipping serviceability in the checkout page magento?

texts: Pin code to check shipping serviceability in the Checkout page magento.


texts: Zoom on product image doesnt work - RWD theme

texts:
The zoom on product images only seems to work, when the images are square. Whenever they are not, no zoom pops up.

I am using a slightly modified version of the RWD theme. The problem also occurs when switching to the original RWD theme though.

Any ideas?


texts:
I'm trying to partially mock a helper that runs the code below

public function formatPostcode($postcode, $country_code) {
        if ( $country_code === "AU" ) {
            return $this->formatAUPostcode($postcode);
        } else {
            return $this->formatGBPostcode($postcode);
        }
    }

Test class will contain code as follows:

public function testFormatPostcodeWithGBParam() {
       $postcode = "SW12 9ER";
       $helper = $this->getHelperMock('postcodelookup/data', array('formatAUPostcode', 'formatGBPostcode'));

       $helper->expects($this->once())
              ->method('formatGBPostcode')
              ->with($this->equalTo($postcode))
              ->will($this->returnValue("fooBar"));

       $helper->expects($this->never())
              ->method('formatAUPostcode');

       $this->assertEquals('fooBar', $helper->formatPostcode($postcode, "GB"));
   }

From this I would expect to be able to mock the methods formatAUPostcode and formatGBPostcode, but when I run this test, $helper->formatPostcode() returns null, and neither of the methods in the class are run, as if that method was mocked itself. Not sure if I'm being stupid in here, or I just don't understand something about EcomDev. Help would be much appreciated.


texts:
I have been trying to find a way to do this, but not quite getting what logic to use.

Lets say there is a product "Chocolate" priced $10. If he adds this to cart, the second chocolate should be $8. If he adds one more i.e the third one, it should be $6.

So if he adds 3 chocolates, price will be $10 + $8 +$6

I know in Magento, this can be done using shopping cart rule. But this should appear in product page as well. Customer should know that he can get 2nd one at $8 and third one at $6. As per my understanding, if I use shopping cart rule, discount will be applied only in cart page.

Also if I use tier price, I can do only Buy 3 chocolates @ $X each, which is not what I want.

You can see a demo here: http://www.v2cigs.com/v2pro-vaporizer/series-3-vaporizer-kit
(The above link is using Interspire, not Magento) We want to achieve same in our Magento site as well.


texts: Checkout page loading unauthenticated scripts

texts:
I am getting a little shield warning me that my checkout page is trying to load scripts from unauthenticated sources.

I am guessing that some file(s) are being loaded via http instead of https, os some other similar error?

How do I find out which script(s) are being incorrectly loaded?


texts: Magento 2. Product not visible on frontend in category view

texts:
Products have all the correct settings (setting, visibility, stock, category assignment, etc).  . (The are visible if I enter the product url directly).

There are no products under category view or in any product listings (I have a widget that uses it).

The only difference between local(where products are visible) and remote
is that the media folder has 777 permissions on local and 775 on remote.

Could the permissions one the media folder affect the visibility of the products or am I barking the wrong tree?

EDIT
 - Single store view.
 - Reindexed


texts: Magento 2: System upgrade fails Readiness Check (always_populate_raw_post_data = 0)

texts:
I am trying to upgrade Magento 2.07 to 2.1. I pass all the checks apart from the one below:

  Your PHP Version is 5.6.22, but always_populate_raw_post_data = 0. $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0. This will stop the installer from running. Please open your php.ini file and set always_populate_raw_post_data to -1. If you need more help please call your hosting provider.

I had this problem on setup and got around it by editing my .user.ini by adding

  always_populate_raw_post_data = -1

But this seems to be ignored by the upgrade utility. Any ideas? I am thinking it might be because my cron jobs are loading the server php.ini and not my .user.ini?


texts: Would using flat tables generated by Magento for analytics (using Django) be a good idea?

texts:
Background

I am building an analytics platform on top of an already existing Magento Ecommerce using Python/Django. In this app, I need to show stuff like Total order value, Average order size etc. for certain time frames. Before we go ahead, keep in mind that this analytics engine need not show stuff real time. (They are allowed to be little outdated depending on the timeframe we would be seeing.).

I am not sure whether I could've used the Magento API for this job, but I just wanted to develop this pretty quickly and I wanted to use the framework I am more comfortable with. Also, connecting to the database made more sense to me than using the API of an already slow site.

So here's my question: I am thinking of building this platform using the indexes (flat tables) generated by Magento, but I am not sure how (often) these tables get generated, and whether this would be a good idea or not? What problems could I run into in the future if I do this?

If anyone did something like this before, please share your experiences. Thanks!


texts: where's the option of change default email template of forgot password?

texts: i have created my own new template for forget email notification from option marketing->communications->email templates , i am trying to find from where i can set my email template as chosen template for sending email to user in dashboard . i would be so thankful if anyone can quick respond me option from where i can set it , Thanks in advance .


texts: Do custom price logic during ordering based on customer's choices of options?

texts:
I'm new to Magento.  What I need is to calculate a new base price for an item, depending on the options chosen when ordering/adding to cart.

Example:
Customer chooses a cable.  Customer picks 4, 8, or 12 cores.  Customer specifies a length between 1 and 1000m.  The core option will affect the price per meter, which is why I need to do some custom logic when ordering to update the base price (unless there's some way to do this in stock Magento + Advanced Product Options extension).

So my plan was to create a "core" option, with child "length" options for each core option.  These length children will use the price field for the price per meter.  Then when ordering, I would use the child of the selected core option to get the price per meter and math to apply the price per meter to the input length amount.  Then update the base price for the item.

Would something like this work?  Any suggestions of going about doing this?  I don't expect a full tutorial, just something to point in the right direction because I'm a little overwhelmed with the way Magento's codebase is structured.

Update: I've discovered the _applyOptionsPrice method in Catalog\Model\Product\Type\Price.php

However, changes to this do not seem to affect the final price... Is there something else I need to do?


texts: Magento 2 form validation - accessing mage/validation/validation.js return values?

texts:
This is my first go at a Magento 2, so please bear with me. I want to add functionality that scrolls the page to an error message if a form does not pass validation. Currently, I am listening for a submit event on the #product_addtocart_form and running a checkError function that runs a copy of the grouped product validation code found in mage/validation/validation.js:

function checkError() {
    /* grouped qty validation code taken from mage/validation.js */
    var result = false;
    var total = 0;
    $('#product_addtocart_form').find('input[data-validate*="validate-grouped-qty"]').each(function (i, e) {
        var val = $(e).val();
        if (val && val.length > 0) {
            result = true;
            var valInt = parseInt(val, 10) || 0;
            if (valInt >= 0) {
                total += valInt;
            } else {
                result = false;
                return result;
            }
        }
    });
    if(!(result && total > 0)) {
        $('html, body').animate({
            scrollTop: $('#product_addtocart_form').offset().top
        }, 1000);
    }
}

Obviously, this is not optimal because the validation code is being run twice for every form submit, once in validation.js and once in my code. And because code duplication, etc.

What I would like to know is, is there a way to access the return value of the 'validate-grouped-qty' function in mage/validation/validation.js?

In Magento 1, this could by accomplished by something like the following:

productAddToCartForm.validator.options.onFormValidate = function(result, form) {
    if(!result) {
        $('html, body').animate({
            scrollTop: $('#product_addtocart_form').offset().top
        }, 1000);
    }
}


texts:
for less , it is meaningful to compile ,
but why js and HTML templates are also generated,

is there any significance doing that, in security and performance


texts:
I would like to add a little message beneath an input field on the checkout:

Is there a built-in way to do this or do I somehow need to add HTML there?


texts: Magento 2.1 store logo is showing 403 forbidden error

texts:
I installed magento 2.1. When I changed the logo, the file is returning 403 forbidden error in console.

I have checked in this forum and found a solution here.

When I did this, the logo was visible for a brief moment then again it's back to showing 403 error.

Any insight on how to solve this would be very helpful.

Thank you!

URL: Click here


texts: path of controller not found in ajax magento 2

texts:
Problem statement:

My controller's name is "Index"
The action inside is "Index"
My route id and front name  are "evals"

Question:
What do I put in the url in javascript to get the right path of my controller. I put this:
 type : "POST",
                    url : '/evals/index',
                    data: {'idRate':therate},

but as result i got an error: POST http://localhost/sajjada/evals/index/evals/index 404 (Not Found)
Can you please help me?


texts:
A client's web hosting support have created a development site for me @ dev.example.com.

When I try to load http://dev.example.com/admin, I am redirected to https://dev.example.com/index.php/admin/, and receive the error:

  The requested URL /index.php/admin/ was not found on this server.

mod_rewrite is enabled, and the .htaccess file is the same as the production site @ example.com.

web/unsecure/base_url & web/secure/base_url are set okay in the core_config_data database table.

How do I fix this please? Thanks.


texts: Magento2: How to apply discount on all cart items programatically

texts: I want to add a discount on cart items for the specific customer.


texts: If script is includeed from default_head_blocks.xml error is noticed

texts:
I am developing a site in magento 2.3 flurys.digifrizz.com If script is included through default_head_blocks.xml there are lots of require js error noticed

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="bootstrap/bootstrap.css" />
        <script src="bootstrap/jquery.min.js" />
        <script src="bootstrap/popper.min.js" />
        <script src="owl-carousel/owl.carousel.js" />
        <script src="bootstrap/bootstrap.min.js" />
        <script src="scrollbar/jquery.mCustomScrollbar.concat.min.js" />
        <script src="aos/aos.js" />
        <script src="js/classie.js" />
        <script src="js/selectFx.js" />
        <!-- <remove src="requirejs/require.js" /> -->
        <css src="owl-carousel/dist/assets/owl.carousel.css" />
        <css src="owl-carousel/dist/assets/owl.theme.default.css" />

        <css src="scrollbar/jquery.mCustomScrollbar.css" />
        <css src="css/sidebar.css" />

        <css src="aos/aos.css" />

        <css src="font-awesome/css/font-awesome.min.css" />

        <css src="line-awesome/css/line-awesome.css" />

        <css src="fonts/fonts.css" />

        <css src="css/cs-select.css" />
        <css src="css/cs-skin-elastic.css" />

        <css src="css/style.css" />

        <css src="css/animate.css" />

    </head>
</page>

Can you please help me how to solve this problem


texts: how to Redirect the page in Add to cart button click

texts:
I want to redirect the page when i am clicking add to cart button

For ex :

  product_Name : Product1

  Redirect_url : www.somedomain.com...\Product1 (other site url not mine)

  product_Name : Product2

  Redirect_url : www.somedomain.com...\Product2 (other site url not mine)

when I am clicking add to cart button just to redirect www.somedomain.com\...\Product1 .. \product... not to redirect checkout/cart/page


texts: Could someone please advise how to put 1.9.0.1 into Maintenance Mode? Or is this version not supported??  I found some instructions, however I don't have the option for Maintenance Mode for Ver 1.9.0.1 under System>Configuration>General


texts: retrieve and display individual reviews and ratings for product

texts:
I"m trying to retrieve all reviews and ratings for a product.  I'm not entirely sure how this could be accomplished.  anyone care to help a brutha out?

I am currently trying to use:

            $reviews = Mage::getModel('review/review')
                ->getCollection()
                ->addStoreFilter($storeId)
                ->addStatusFilter(1)
                ->addFieldToFilter('entity_id', 1)
                ->addFieldToFilter('entity_pk_value', $productId)
                ->setDateOrder()
                ->addRateVotes()
                ->getItems();

            $reviewData = array();
            if (count($reviews) > 0) {
                foreach ($reviews as $r) {
                    foreach ($r->getRatingVotes() as $vote) {
                        $ratings[] = $vote->getPercent();
                    }

However, ratings[] is null when i dump the variables.


texts:
Is there any way to update the mini cart view?

Now I'm using:

      require([
            'Magento_Customer/js/customer-data'
        ], function (customerData) {

            alert("hola");
            var sections = ['cart'];
            customerData.invalidate(sections);
        });

But it only refreshes the view by updating the page.

I'm looking for ways to make the changes reflect without having to reload the page. Any ideas?


texts: Translation function with multiple variables doesn't work

texts:
I have a problem using translate function.

This works:

$this->__("You can contact %s by calling %s.", $name, $phone);

But this doesn't:

$this->__("You can contact %1$s by calling %2$s.", $name, $phone);

And the problem is, that I would like to translate this as: "Please call %2$s to speak to %1$s." so the order is important.

Do you have any ideas why the second example doesn't work? I would appreciate any suggestions :).


texts:
I want to validate my form, by events onblur for every input.

function validate_field(id){
  Validation.validate(id);
}

not work for me

I want to validation every single element. How to make this?


texts: My Magento site sends sales email to all gmail email but won't send any emails to site specific emails

texts:
Magento site sends sales email to all gmail email but doesn't send any emails to site specific emails. For example: when an order is received, we get order emails to abc@gmail.com and pqr@gmail.com (which has been setup as cc to receive the emails), but the site specific emails (like: xyz@sitename.com) do not get any emails.

Any solutions?


texts: Uncaught Syntax Error: Unexpected number in JSON at position 2. Why in Magento2?

texts:
["092019,082019,072019,062019,052019,042019,032019,022019,012019"]

Uncaught SyntaxError: Unexpected number in JSON at position 2
at JSON.parse (<anonymous>)
    at Object.success (admin.php:667)
    at i (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at A (jquery.min.js:4)
    at XMLHttpRequest.<anonymous> (jquery.min.js:4)

Any Help will Appreciate.


texts: Magento 2 :How to write ategory URL rewrite

texts:
How to write 301 redirections to the category page
Category URL key is "ballasts"
request path : ballasts.html
target path : catalog/category/view/id/10
When the user hit this URL directly in the browser http://127.0.0.1/robertson/catalog/category/view/id/10, it should redirect to http://127.0.0.1/robertson/ballasts.html
Can anyone guide me for this 301 redirection


texts: How to get all shipping addresses of a customer in magento 2

texts: I want to show all shipping addresses of a customer. I am getting customer_id only. I am using $customer->getAddress() but it's giving all addresses from customer_address_entity table according to that customer_id. But I want only shipping addresses from these addresses. How can I solve it..


texts: Duplicate and Previous Customer Transaction Emails are being Sent 1.9.4

texts:
I apologize if this is the wrong way to ask this question.  I don't have enough reputation points to ask in the original post. And I'm almost out of hair from trying to figure out this issue.

Magento 1.9.4

I'm still having the issue after following the SQL fix provided by César Revert-Gomar.
New order email being sent twice

I did notice that he mentioned

  The core_email_queue table is cleaned out as emails on the Magento
  Email Queue are sent. This cleaning is performed by a cron tab job
  called core_email_queue_clean_up, that's defined inside the
  app/code/core/Mage/Core/etc/config.xml config file. The code that
  performs the cleaning is defined on the removeSentMessages function in
  the Mage_Core_Model_Resource_Email_Queue class:

/**
 * Remove already sent messages
 *
 * @return Mage_Core_Model_Resource_Email_Queue
 */
public function removeSentMessages()
{
    $this->_getWriteAdapter()->delete($this->getMainTable(), 'processed_at IS NOT NULL');
    return $this;
}

I do not have this code in that location. Could this be the issue?  Any help in this matter would be greatly appreciated.


texts: Calculating Product Price Dynamically adminhtml - Magento 2

texts:
I added some custom attributes to my product such as cost and markup. By default markup will be set to 1.5 but the admin can adjust this.

When I am in the admin panel, I want to be able to observe a change on the cost field and have the price field populated automatically based on the formula:

price = cost * markup

If anyone can point me in the right direction on where this code may need to be updated or provide any examples that would be awesome.


texts: Create Field Dependency in Frontend Form

texts:
I have 2 select attributes in frontend phone model and phone brand.
I want these two attributes to be dependant i.e. If suppose I click on "Apple" all the phone models under "Apple" brand category should come in the second select option. All the data comes from backend. Any suggestions?


texts: Change the name of the currency in currency selector in LUMA theme

texts:
I am triying to do the solution in the link below
How to rename currency name?
I am using Magento 2.4 but i cant find the files, my directory is empty

app/design/frontend/{vendore}/{theme}/Magento_Directory/templates/currency.phtml

I changed the USD symbol to REF but the currency selector did not.


texts: Magento2 - How to create a backend module to insert data into a table?

texts: I want a module to insert data into a custom table, created a custom table also created a menu in the admin menu now how can I add details to the table from the admin -> menu -> module name. also, I want to display the details in the admin side and also delete and edit function.


texts:
I have a preference in di.xml:

    <?xml version="1.0"?>
    <config>
        <preference for="Magento\CatalogRule\Api\Data\RuleInterface" type="Module\Vendor\Model\RuleInterface" />
    </config>

I want add methods to an interface, but when I access to interface with postman, Magento have the error PHP Fatal error: Uncaught Error: Cannot instantiate interface.

Why?

Thanks!


texts: I'm having a problem with "Shop by" left navigation menu, when I choose one link, the address bar change but no change in products list, it works only when I disable Magento's cache in "Cache Management". I use Magento 1.9.1.0 with RWD theme.


texts: How to Add Date with Time in Orders Filter : Magento 2 Admin Section

texts: In M2 Admin I want to filter my orders with date and time, by default date only in purchase filter section. How to add date and time here. Purchase Date with time already show in the order grid!. How can i achieve my needs .?


texts: How to generate a coupon code for a specific rule in magento 2?

texts: I need to generate coupon code for a specific rule after the order is placed. I am checking the sale-rule module. It will helped me if anyone know which class is actually I should use.


texts: How to create a new page without using CMS?

texts:
Is there any way to create a new custom web page without using the Magento CMS Admin panel?

I'd like to create a new web page (let's say newsletter) using the 1 column layout. But I would like to create it from the backend (code view) without using the Admin panel.

Is there a way to do this?

From what I’ve read I’m suppose to create a module xml located in the following location:

app > ect > modules > Kind_World.xml

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

And then copy the code that’s in 1column.phtml

Create a page (mypage.phtml) in a location similar to:

/app/design/frontend/kind/enterprise/template/page/mypage.phtml

And paste the code from 1column.phtml into mypage.phtml

Create a template module config.xml. and place it in a location(not sure about the exact location) similar to:

/app/code/local/..

config code should be similar to code below.
Note: I’m just using the code below as an example. I know the code below is incorrect. The code below is using home template. I just would like to create a page

    <?xml version="1.0"?>
    <config>
         <modules>
            <My_World>
            <version>0.1.0</version>
            </My_World>
         </modules>
               <global>
                   <page>
                     <layouts>
                        <homepage translate="label">
                               <label>Home_page</label>
                                 <template>page/myworld.phtml</template>
                               <layout_handle>home_page</layout_handle>
                        </homepage>
                    <!-- add more layouts here -->
                     </layouts>
                   </page>
              </global>
    </config>

Add to my CMS Page and edit

Go to  Magento back end admin. Go to CMS > Pages

Now go to the CMS homepage, I should then have ‘MY_World’ in my ‘layout’ dropdown.  Select it and save my page

Now go back to my myworld.phtml and edit.

Not sure if this is close.

Please advise


texts: Collections - Filtering multiple multi-select attribute values

texts:
That's not a typo.

I am aware that I need to use 'finset' to filter my multi-select attributes; however, I am trying to filter multiple values at once and getting:

Incorrect parameter count in the call to native function 'FIND_IN_SET.

Here's some sample code:

foreach ($options as $option) {
    // $option[0] contains an attribute ID as a string
    $attribute = Mage::getModel('catalog/resource_eav_attribute')->load($option[0]);

    if ($attribute->getFrontendInput() == 'multiselect') {
        $collection->addAttributeToFilter($attribute->getAttributeCode(), array('finset' => $option[1]));
    } else {
        $collection->addAttributeToFilter($attribute->getAttributeCode(), array('in' => $option[1]));
    }
}

What I have on the frontend is a set of fields, each set corresponds to a specific attribute and contains checkboxes for each attribute value. Based on these submissions, the collection should filter out what has been selected.

Everything works great except for the single case where I attempt to filter two of the multi-select options at the same time. If I only choose one of them, the search works properly. If I choose two or more, I get the MySQL error mentioned above.

Any ideas? Or am I forced to use custom SQL statements to build this filter?


texts: How to add custom css file in magento2.2.6?

texts:
I tried to add some custom styles in Magento but I couldn't find out how to do this.

How do I add the custom css stylesheets in magento-2.2.6?


texts:
I'm looking for this file but i can't seem to locate it... I know that you run this bit of javascript to turn your plain old form into VarienForm

<script type="text/javascript">
//<![CDATA[
    var newsletterSubscriberFormDetail = new VarienForm('newsletter-validate-detail');
//]]>
</script>

shouldn't it be inside design/frontend/enterprise/mine/template/newsletter?

It's for an email signup on my homepage which pushes the email into a bucket and then redirects to a preference page. I believe thats what the script may do..


texts: Magento 2: Admin Panel Error in Processing request

texts:
I was following the instructions on MageStore to create a new theme. I created frontend > cbg > SimpleTheme and in that I have the theme.xml as follows

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">

        SimpleTheme

         media/preview.jpg

And I created a registration as follows

    <?php
    /**
     * Copyright © 2015 Magento. All rights reserved.
     * See COPYING.txt for license details.
     */

    \Magento\Framework\Component\ComponentRegistrar::register(
        \Magento\Framework\Component\ComponentRegistrar::THEME,
        'frontend/cbg/SimpleTheme',
        __DIR__
    );

Also I created the etc with the view.xml as copied from another theme (solwin freego).

Now the front ed is still there but I cannot access the admin area.


texts:
I am trying to understand the concept of sort order when using plugin.

As per my understanding the sort order works in lower to higher when used before method and higher to lower when used in after method. As per official doc
This work as expected when I use scenario 1 but not when I use scenario 2.

Scenario 1

I had used plugin for Product Model Class

Product A Plugin (Sort Order 10)

namespace Priyank\PluginA\Plugin;

class Product
{
    public function beforeGetName($subject)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/PluginTest.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info('Before Execute From Plugin A');
    }

    public function aroundGetName($subject, $proceed)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/PluginTest.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info('Around Before Proceed Execute From Plugin A');

        $return = $proceed();

        $logger->info('Around After Proceed Execute From Plugin A');

        return $return;
    }

    public function afterGetName($subject, $result)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/PluginTest.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info('After Execute From Plugin A');
        return $result;
    }
}

Product B Plugin (Sort Order 20)

namespace Priyank\PluginB\Plugin;

class Product
{
    public function beforeGetName($subject)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/PluginTest.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info('Before Execute From Plugin B');
    }

    public function aroundGetName($subject, $proceed)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/PluginTest.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info('Around Before Proceed Execute From Plugin B');

        $return = $proceed();

        $logger->info('Around After Proceed Execute From Plugin B');

        return $return;
    }

    public function afterGetName($subject, $result)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/PluginTest.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info('After Execute From Plugin B');
        return $result;
    }
}

The output is as expected

PluginA::BeforeGetName()
    PluginA::aroundGetName() // Magento calls the first half until callable
PluginB::BeforeGetName()
    PluginB::aroundGetName() // Magento calls the first half until callable
        Action::dispatch()
    PluginB::aroundGetName() // Magento calls the Second half until callable
PluginB::afterGetName()
    PluginA::aroundGetName() // Magento calls the Second half until callable
PluginA::afterGetName()

Scenario 2
Just removed the around method in both the plugins rest remains same.

Output

PluginA::BeforeGetName()
PluginB::BeforeGetName()
PluginA::afterGetName()
PluginB::afterGetName()

Here I was expecting Plugin B After called first as it has higher sort order. But when around was not used Plugin A after was called first. Why?


texts: Authorize.net CIM getting CVC error while it should'nt be

texts:
I've installed this Authorize.net CIM module, and installed before other Authorize.net CIM modules, i have an issue when trying to pay with this module in backend.
I edited an order and choosed the Authorize.net CIM module and entered credit card crediantials, and entered a correct CVC but i got this error

Please enter a valid credit card verification number.

When entering card number, card expiration date and CVC, there's an ajax call to this URL
https://domain.com/admin/sales/order_create/loadBlock/key/17a31e8ff3761d677a591560419237f0bf2971735ade601f87e08526b6571ec6/block/card_validation?isAjax=true

With response
{"message":""}

Can someone help me to found the block "card_validation" and how to fix the issue related to CVC?
PS: i disabled all other Authorize.net CIM modules.
Magento version : 2.2.4
Production mode for Authorize.net
Developer mode for Magento
Thanks.


texts:
I'm having a problem with a Magento checkout which I can't seem to solve. I inherited this site from previous developers and to be honest, it's had no end of problems.

However, we've recently started to see an odd error in the checkout. The user fills in their Billing Information, clicks 'Continue' and then... nothing happens. Well, apparently not.
The Shipping Information tab below becomes active BUT the tab does not open up. So the customer doesn't see it and so they think they can't go any further. This is disastrous for the client as they then lose the sale.

Looking at the code through Firebug, I can see that the page has a JS error:

TypeError: this.regionSelectEl is null

if (this.regionSelectEl.options.length<=1) {

(form.js line 178)

I don't know what's suddenly started to cause this or how to solve it.
Can anyone shed any light on it?
The site is an operational site, and can be seen in action here: www.knightsbridgeneckwear.co.uk

Please help!

The site uses Magento CE version 1.7.0.2


texts: How to add Bootstrap 4 in a Magento 2 theme?

texts:
I've to add Bootstrap 4 in my custom theme.

I add Bootstrap 3 by using the reference:

How to use bootstrap in my custom theme

But, bootstrap 4 is not working.


texts: Magento 2 : Display Ordered Items listing in customer account

texts:
In Magento 2 customer account I have to add a new tab and when customer visits it then on that page have to display a list of all items from all orders of customers. It will be grids of ordered items.

From that page, the customer will be able to add cart.

I have added tab and page in customer account but not understanding how to get a list of products.

Please suggest me a way.


texts: Configure smtp with smarthost for outgoing e-mails

texts:
I am having an issue sending mails with Magento and a smarthost. Using Magento 1.9 which sends mails through smtp and a queu.

I configured cron jobs
Host added the IP to the mailserver
Installed SMTP Pro Email extension from Aschroder
The extension does a selftest which responds with a "SMTP server could not open socket"
I contacted the hosting company and they tell me there probably is a problem in the configuration in the mailsever settings. But I can not set anything more besides the server name and authentication.
I also checked the mail qeue in the database which is filled. But mails are still not send.

So my main question is, how do we configure the mail settings so mails are send?


texts:
My client needs to make an operation on products custom options.

Using Magento CE, I create a product, and give it some custom options from within the built-in left hand side menu in "Manage products" > "Add new product", such as "mm" (millimeters) and "mt" (meters)

This product will have both radio options and a textbot input.

Let's say we have

Base price: 0

MM:
Radio option A which costs 0,9
Radio option B which costs 1,2
Radio option C which costs 2,3

MT:
Textbox value = unknown yet

Let's say user chooses Radio option B and enters 10 in the textfield

Price should be updates as such:

1,2 * 10 + 0

Which is

radio value cost * textbox value + base price

Is there any way to tell the code to take the value of the radio button, multiply it for the value of the textbox and sum it all to the base price?

Where could I look to see the current behavior of a product's custom options?

Thanks in advance


texts:
In my catalog I have some categories and subcategories with product.

But in my top nav I don't have any dropdown.

What I have missed ?


texts: how to sort categories as they are shown in admin?

texts:
Here is the code:

$category = Mage::getModel('catalog/category')->load(3);
$subCats = Mage::getModel('catalog/category')->load($category->getId())->getChildren();
$subCatIds = explode(',',$subCats);
$currentUrl = Mage::helper('core/url')->getCurrentUrl();

Please advice, thx!


texts:
We have a customer who is ordering over 1000 configurable products in qty's of 1-10. So probably 200+ configurable 'parent' products. It keeps freezing at checkout.

1) Is there anything I can do to improve this?
I've disabled the gift note per item option. Disabled the RSS for the site.

2) would the 'order by sku' EE feature be less overhead? it seems to me like it would be as there is no parent/child connection to be made.

This is a multisite install (this large order is the wholesale 'website'), so changes need to be done at a website scope or less. IE, we don't want to change global options that effect the other stores, unless we don't really need them.


texts:
How do I set scandir to list the module web/images directory?
getViewFileUrl generates the file path but what I need is the directory path, so scandir can read the folder contents.

Vendor > Module > view > frontend > web

template file:

<?php
    $images = scandir("images/base/thumbnails");
    $ignore = Array('.', '..');
    foreach($images as $curimg){
        if(!in_array($curimg, $ignore)) {
            echo 'getViewFileUrl("Vendor_Module::images/base/full/$curimg").'">getViewFileUrl("Vendor_Module::images/base/thumbnails/$curimg").'">';
        }
    };
?>


texts: Magento 2 What to update in existing CE to get RabbitMQ working

texts:
I have a few installations that slowly have been upgraded to 2.3.3 without RabbitMQ. Now I have added Rabbit but I am not sure I've covered all changes needed.

The queue config is added in etc/env.php and I see that Magento connects to Rabbit (creating topcis).

I've edited all of these files in the file system:

queue_consumer.xml
queue.xml
queue_publisher.xml
queue_topology.xml
communication.xml

to use amqp instead of magento-db. Then the site is upgraded and redeployed.

I see some messages coming but fewer than I expected. For example I can't see messages when an order is created.

Did I miss anything? Something else I should change or is this correct?


texts: Magento 2 upgrade 2.1.7 to 2.3.2 give error Foreign key constraint is incorrectly formed modify column customer_group_id in table of customer_group

texts:
Can anyone please explain about this type of error Like http://prntscr.com/oow1oz

Also, I refer to this link Magento 2 failed database rollback cannot add foreign key constraints but not working for me.

so please anyone help me.

Thank you in advance.


texts: How to check which theme is being used in a magento based website.

texts:
Suppose I found these website: http://www.made.com or this one http://www.elegantsteps.co.uk/

I know that both are based on Magento, And everyone else know it's easy install wappalyzer and it will tell you which frameworks have been used.

As I have already identified that these websites are built on magento.

Now I want to know what theme is being used ?

So my question here is:

Is there any technique or any website or any other thing through which we could know or Identify the theme (which is being used in these websites).

Once Again I don't want to know about framework as I have already Identified it, I want to know how to Identify theme in magento based running website.

P.S:  I don't have access to these websites, All I want to know is what theme is being used. just like we do for wordpress by using wordpress theme detector.

It will be very helpful if someone can help me.

Thanks,
Arth


texts: Extend custom button and trigger mage.catalogAddToCart

texts:
I created a custom button. What I want is for it to trigger the Add to cart function. Aside from the default add to cart button I want a new add to cart button that will do the same thing. How can I achieve this in Magento 2?

Edit: The reason I want to do this is because my custom button is inside a separate form but what I want is when I click the submit button I want to submit the values of options from other form. I have custom options and have it's value so when I click my submit button I want to submit the value of that other form since the other form containing the custom button only contains the button and no other fields.


texts: Remove trigger creation when changing an indexer mode

texts:
I've disabled the Magento_Bundle module because I don't need it.
But now when I try to set the catalogsearch_fulltext index to schedule via cli:

php bin/magento indexer:set-mode schedule catalogsearch_fulltext I get an error :

  Catalog Search indexer process unknown error:

  SQLSTATE[42S02]: Base table or view not found: 1146 Table
  'catalog_product_bundle_selection' doesn't exist, query was: CREATE
  TRIGGER trg_catalog_product_bundle_selection_after_insert AFTER INSERT
  ON catalog_product_bundle_selection FOR EACH ROW BEGIN INSERT IGNORE
  INTO catalogsearch_fulltext_cl (entity_id) VALUES
  (NEW.parent_product_id); END

Tracked this down and apparently this happens because in the Magento_CatalogSearch module in etc/mview.xml file, there is this line specified for the index catalogsearch_fulltext <table name="catalog_product_bundle_selection" entity_column="parent_product_id" />.
removing the line mentioned above makes everything work as expected. Obviously I cannot remove the config setting.
Any ideas on how I can bypass it?


texts: Is there any way by which I can use bootstrap's glyph icons in my magento theme? I have no clue on how to use the glyph icons in magento theme


texts: Edit checkout success html file : Magento 2

texts:
I am editing file:

/app/code/Magento/Checkout/view/frontend/templates/success.phtml

but Nothing changed. What should I do?

Also I installed a theme which not have a success.phtml. that means enforce me to edit the core file(the path above). Is there is a solution to edit in the theme?


texts:
I can't get jQuery's ajaxComplete to work.  I'm thinking it's because the ajax call is being initialised by Prototype?  But how can I check when any ajax call This is basically the code I have:

jQuery(document).ready(function() {

    function popupInit() {
        jQuery('.popup-window').click(function() {
            // rest of code here
        });
    }
    popupInit();
    jQuery(document).ajaxComplete(function(){
        console.log( "Triggered ajaxComplete handler." );
        popupInit();
    });
});

I checked in the Chrome sources panel and after an XHR response has finished my function is not called an neither is the console.log.

I'm not initiating the ajax call it's coming from a extension for our Magento website:

    new Ajax.Request(url, {
        method: 'post',
        onSuccess: function(transport)    {
        if(transport.status == 200)    {

            var data = transport.responseText.evalJSON();

            // Update shipment methods
            if(shipment_methods_found)  {
                shipment_methods.update(data.shipping_method);
            }

            if(update_payments){
                payment_methods.replace(data.payment_method);
            }

            totals.update(data.summary);

        }
    },
    onComplete: function(transport){
        if(transport.status == 200)    {
            if(shipment_methods_found)  {
                $$('dl.shipment-methods input').invoke('observe', 'click', get_separate_save_methods_function(set_methods_url, update_payments));
                $$('dl.shipment-methods input').invoke('observe', 'click', function() {
                    $$('div.onestepcheckout-shipment-method-error').each(function(item) {
                        new Effect.Fade(item);
                    });
                });
            }

            if(update_payments){
                $$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(set_methods_url));

                $$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
                    $$('div.onestepcheckout-payment-method-error').each(function(item) {
                        new Effect.Fade(item);
                    });
                });

                if($RF(form, 'payment[method]') != null)    {
                    try    {
                        var payment_method = $RF(form, 'payment[method]');
                        $('container_payment_method_' + payment_method).show();
                        $('payment_form_' + payment_method).show();
                    } catch(err)    {

                    }
                }
            }
        }
    },
    parameters: parameters
    });

Is jQuery's ajax complete not working as the ajax request is being
initialised by prototype?
How can I check with JavaScript when any
ajax response is complete?


texts: How to remove "200" and "Custom" in Item Per Page dropdwon?


texts: None of the email sent in my magento website?

texts: I am using in magento 1.9 in my website. I created account, reset password, order mail, invoice mail etc none of the mail send to the customer. I don't know the what's the problem. can you please any one suggest what is the problem??


texts: Excluding products from layered nav filters

texts:
In my product collection on category list pages I am filtering to exclude products with certain attribute sets:

return $this->_productCollection->addAttributeToFilter('attribute_set_id',array ('nin' => array('11','10')));

However, the item count in the layered nav is showing teh total number of saleable items - how do I apply the same filter as above to the layered navigation?


texts: Accidentally deleted a row within the core_store table within my database and now it's break

texts:
Accidentally deleted a row within the core_store table within my database and now I don't have access to my admin or the main website!

Here is the error code which shows up when I try to access either of them:

Fatal error: Call to a member function getCode() on null in /Magento/Website_Name/app/code/core/Mage/Core/Model/App.php on line 722

Here is the code on line 722:

return $this->_stores[$this->_groups[$group]->getDefaultStoreId()]->getCode();

I had a copy fo the sql file for that particular table and I have reinserted the row again, but it won't work.

Any help would be greatly appreciated as I need this website back up and running as soon as possible!


texts:
Can someone tell me which patches are needed for Magento v1.8.1.0?

The following list of patches show up on the downloads page:

2747
2619
2725
3941
1868 FAILS
4334 FAILS
1533
5344
5994
6237
6285
6482
7616 FAILS
7405

1868, 4334 or 7616 all fail on stock Magento v 1.8.1.0.  All of these make changes to Mage_Usa, which as you see below is not the version the patches are expecting.

For example viewing 1868 we see the following:

diff --git app/code/core/Mage/Usa/etc/config.xml app/code/core/Mage/Usa/etc/config.xml
index 0174a7b..e040af8 100644
--- app/code/core/Mage/Usa/etc/config.xml
+++ app/code/core/Mage/Usa/etc/config.xml
@@ -28,7 +28,7 @@
 <config>
     <modules>
         <Mage_Usa>
-            <version>1.6.0.1</version>
+            <version>1.6.0.1.1.2</version>
         </Mage_Usa>
     </modules>
     <global>

The problem here is that this will never match on v 1.8.1.0 because the Mage_Usa version included is 1.6.0.3 NOT 1.6.0.1

<config>
    <modules>
        <Mage_Usa>
            <version>1.6.0.3</version>
        </Mage_Usa>
    </modules>

So it would be very helpful to me if someone could explain which patches are required for v. 1.8.1.0

Thanks!


texts: How to configure the 500 error page in magento 2

texts:
Is there a way to set up a custom 500 page error in magento 2?
I tried to add a 500.phtml file in the pub/errors/default directory but this method only works with 404 errors and maintenance error 503.
I also tried to modify the .htaccess file by adding this line ErrorDocument 500 500.html, but invain.
For more information, I would like to customize this kind of 500 errors.