texts:
I have an issue with my contact form.

I have created a static block and I insert this code

{{block type='core/template' name='contactForm' action='/contact-us/index/post' template='contacts/form.phtml'}}

after that, I created a category and in the Display Settings tab I choose Static Block Only and choose the static block I created earlier. On the system configuration, I enabled the contact us, inputted my email address and choose what template to use.

Finally, the testing, the forms are completely fine however when I tried to submit the form it gives me 404 page. To check if the form is working, I navigate to magento default contacts page and test if I can send inquiry, however it returns

  Unable to submit your request. Please, try again later

this is quite weird because my newsletter subscription is sending email but the contact us form is not.

I tried a lot of answers form the internet but no luck. Can you prove me some solutions?


texts: How to i add catalog/cart rule discount information to an email

texts:
when the user makes an order if they have items which trigger a discount from a catalog or cart rule under the item they get a small note indicating what rule the item has triggered and items that get a discount has how much they have been discounted by at the end, this is consistent in the cart, previous orders and printable version of previous orders

however i have noticed that emails sent out do not have this information, looking at both app\design\frontend\enterprise\[THEME]\template\sales\order\invoice\items\renderer\default.phtml which handles the display for previous orders display and app\design\frontend\enterprise\[THEME]\template\email\order\items\order\default.phtml which handles the display when making the email, they both use a foreach loop on what is returned by $this->getItemOptions() (the first one stores it in a variable and uses that while the second one just calls the function) but it seems that the second one doesn't have the catalog/cart rule information

we want to display the catalog/cart rule information in the email like what it does in in the cart and previous orders display so how do we add this infomation os that when the email is sent out the customer can see which items got a discount and by what (just like in the cart)

EDIT: we're using Enterpise 1.13.0.2


texts: How to set more childs with own templates to a layout?

texts:
I have to create a template programmatically.
And so I need a master template with one child template. That child template again has two child templates.

Now I don't use a layout.xml file I need to call "setTemplate".
But how can I use "setTemplate" for the childs? MAgento can't find these child template because there is no reference to them.

I tried so far:

$layout = Mage::app()->getLayout();
$block = $layout->createBlock('core/template', 'master')
    ->setTemplate('default/html/master.phtml');
$blockChild1 = $layout->createBlock('core/template', 'master.child1')
    ->setTemplate('default/html/child1.phtml');
$blockChild1Child1 = $layout->createBlock('core/template', 'master.child1.child1')
    ->setTemplate('default/html/child1/child1.phtml');
$blockChild1Child2 = $layout->createBlock('core/template', 'master.child1.child2')
    ->setTemplate('default/html/child1/child2.phtml');

$blockChild1->setChild('master.child1', $blockItem);
$blockChild1->setChild('master.child1', $blockTotal);
$block->setChild('master', $blockInvoice);
$html = $block->toHtml();


texts: Onepage checkout: Submit order button not working

texts:
I am working on a Magento store V. 1.8.1.0 that does the following error:

On onepage checkout.

Customer clicks on "Place order"
The button becomes disabled, shows a spinner (all goood so far).
Button goes back to normal. Nothing further happens.

The order gets created in the backend AND the customer's Credit Card gets charged. If the customer clicks again, another order gets created and his/her card gets charged again.

Does someone know why this happens?

According to the store owner, the store worked fine until a week ago when this error started to appear.


texts: Magento 2 - How to get attribute options value of eav entity?

texts:
How can I get the attribute options values of eav entity?
I found solution only for magento 1.x but M2 I don't know.
M1:

$attr = Mage::getResourceModel('eav/entity_attribute_collection')->setCodeFilter('specialty')->getData()[0];
$attributeModel = Mage::getModel('eav/entity_attribute')->load($attr['attribute_id']);
$src =  $attributeModel->getSource()->getAllOptions();

Anyone know, show me step by step, pls!Thanks!


texts:
I'm try to figure out how to show/hide things if the customer hasn't verified their Tax/VAT number. Very much in a similar way to showing/hiding things if the customer isn't logged in (code below)

<?php
if(!Mage::getSingleton('customer/session')->isLoggedIn()){

I can find this in the controller

protected function _isVatValidationEnabled($store = null)
{
    return  $this->_getHelper('customer/address')->isVatValidationEnabled($store);
}

So I have tried these but with no luck

if($this->_getHelper('customer/address')->isVatValidationEnabled($store)){

if(!Mage::_getHelper('customer/address')->isVatValidationEnabled()){

Any ideas how I might get it working?


texts: Translation not working for captcha module

texts:
I have activated magento admin login form captcha. I keep getting the message "Incorrect CAPTCHA" When i enter an incorrect captcha code, I want to show the german language text instead of english, since it is a german shop.

I copied the file

  app\locale\en_US\Mage_Captcha.csv

to

  app\locale\de_DE\Mage_Captcha.csv

and changed the line

"Incorrect CAPTCHA.","Incorrect CAPTCHA."

to

"Incorrect CAPTCHA.","Falsches CAPTCHA."

But it still shows Incorrect CAPTCHA., even after clearing the cache (cache is also disabled.)


texts: File and folder permissions for Magento setup

texts:
From the Magento wiki I found the file and folder permissions to be set to:

#for magento 1.5+
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod o+w var var/.htaccess app/etc
chmod 550 mage
chmod -R o+w media

Question:

I'm trying to set the permissions using an ftp-client. The first two rows are pretty self explanatory, however

chmod o+w var var/.htaccess app/etc

Does this mean that I should apply write permissions to the "others" class, hence change the permissions to be 775 for the var folder and etc folder and the .htaccess file permissions to be 664?

Same thing applies to the last line of code.

Please note that I am aware that there is a similar thread, however the permissions suggest there does not compare to the ones suggested in the wiki, and I would like to follow the wiki.


texts: magento2 move product image after product title

texts:
How can I move the Product image after product title?

In short, I can say I need to move product media div inside class="product-info-main"


texts:
I have some problem about this error, who can tell me why? Thank you!!
Fatal error: Uncaught Error: Call to a member function getId() on null in


texts:
I created a custom table and on the price column, I declared:

       $this->addColumn('price',
            array(
                'header'=> $this->__('Price'),
                'index' => 'price',
                'type'  => 'price'
            )
        );

However, upon hitting search, it throws an error:

a:5:{i:0;s:24:"Invalid target currency.";i:1;s:6423:"#0 /directory/to/magento/app/code/core/Mage/Directory/Model/Currency.php(164): Mage::exception('Mage_Directory', 'Invalid target ...')
#1 /directory/to/magento/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Price.php(137): Mage_Directory_Model_Currency->getAnyRate(NULL)

Any idea?


texts: can't setup:upgrade, stuck in "Invalid XML in file.."

texts:
I was working on some errors on my site. Now I changed in developer mode and when I try to do setup:upgrade, it gives me this error.

No new modules added, working fine till today. Any ideas?

  Running schema recurring...Invalid XML in file /home/r2gutenb/public_html/app/code/Rokanthemes/SlideBanner/etc/acl.xml:
  Element 'config': Missing child element(s). Expected is ( acl ).  Line: 2

This is the content of the acl.xml file

UPDATE1

After deleted the acl.xml files now my homepage gives me this error:


texts: Magento 2 controller redirect on button click in phtml file

texts:
I want to redirect customer using controller when button is clicked in one of my phtml files.

So far I got, controller:

public function execute(){
    return $this->addToCart();
}

public function addToCart(){
    // some logic
    $this->_redirect('checkout/cart/index');
}

The above is working fine (redirecting) when you access the controller via URL (www.mydomain.com/batchorder/index/addtocart).

And here is my .phtml file:

$("#addToCart").click(function(){
let controllerUrl = "<?php echo $block-getUrl('batchorder/index/addtocart'); ?>"
$.post(controllerUrl,
{
"products": JSON.stringify(sideCart.SideCartProducts)
})

The post request returns my logic as it should, however, it is not redirecting. Anyone can help?


texts:
I am new in Magento 2. I need to render product list, and I'd like to use existing templates etc.

I found this: get the html of a product as it would render in category page

But it is for Magento 1.9, and not very specific.


texts:
I have Code for getting all order But I want date filter in Object-manager. How Can I add date filter in it. I tried but I got Blank array.
I am using Object manager in the script so I am suitable with this Way.

 $startDate = date("Y-m-d h:i:s",strtotime('2018-1-1')); // start date
 $endDate = strtotime("Y-m-d h:i:s", strtotime('2018-12-12')); // end date

 $objectManager = \Magento\Framework \App\ObjectManager::getInstance();

$orderDatamodel = $objectManager->get('Magento\Sales\Model\Order')->getCollection()->addAttributeToFilter('created_at', array('from'=>$startDate, 'to'=>$endDate));
 $orderDatamodel->getSelect()->order('entity_id DESC');


texts: while installing custom theme.. I have an issue

texts:
frontend/magento luma already exists..
I have installed a Magento theme but could not see Homepage block for this theme 2


texts: mysql upgrade script did not work / run after patch

texts: The mysql upgrade file did not update the database after a patch. I checked the code in the mysql upgrade file and the changes in the file weren't applied to the database. Is there a way to re-run these upgrade scripts manually?


texts: Exclude CMS Block and CMS Pages from Data Migration Tool Magento2

texts:
is it possible to exclude CMS blocks and CMS pages from migrateion magento1 to magento2 using Magento Migration Tool? We only need products, categories, rewiews, orders, customer ...

Thanks!
Martin


texts: Admin accounts migration in magento 2 from magento 1 website

texts:
Is there any way to migrate magento 1 admin accounts with access privilege to magento 2.3. Because on magento website, they have mention to do it manually but password algorithm is changed. So if i created accounts manually by copying data from Db, it is not working.

Any help would be appreciated.

Thanks!


texts: Keep having to set permissions Magento 2

texts:
I keep having to enter permission commands every time a i do a grunt clean and exec. I'm constantly getting a white page with errors, either Class doesn't exist, can't create directory or permission denied.

Anyone got any ideas what i might be doing wrong?


texts: Split Database: Is It Possible to Append Database Name to All Queries?

texts:
Magento 2 EE comes with a split database feature, where three master databases with their own distinct tables work for the platform. Has anybody tried to do something similar in Magento 1 (CE)?

I'm tinkering around with this idea to see how (in)feasible this is to have one "main" DB and "secondary" DB in M1. However, I quickly came across an issue. For example, if you want to split customers to the secondary DB, you can assign a separate connection for the customer module, but the problem is that some SELECT queries on the customers are joined with tables, like eav_attribute, from the main DB. Opening a customer in the admin is an example.

The solution to this immediate problem would be to append the database name to all queries constructed, but it seems tricky to track down exactly where I need to do this. I'm currently looking around this appraoch. Isolated customer load and saves are working. Any comments from experience or ideas are welcome!


texts: How admin menu.xml configuration file process in mageno2

texts:
How Admin menu.xml config file process in mageno2?

which file responsible for processing admin menu.xml configuration file?


texts: Is magento http/https secure or should the entire website be forced to use https?

texts:
I'm setting up a magento website but one thing i've noticed is https can be used only for secure content such as login pages and account details etc.

This means on product pages regular http is used.

Doesn't this mean the cookie transmitted over http is vulnerable to be stolen by any cookie sniffing program?

Or does Magento handle these pages by not sending a cookie and getting the default page and then using a local cookie to change the header to contain the custom name and profile picture etc.


texts: Cannot get JSON response from custom controller

texts:
I have seen several examples where JSON is returned from a custom controller. I have tried many different ways and every time my controller always returns HTML. I do not know why it does not work.

My Controller:

namespace Test\Module\Controller\Index;

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

class Test extends \Magento\Framework\App\Action\Action {

 /* @var \Magento\Framework\Controller\Result\JsonFactory   */

  private $resultJsonFactory;

  public function __construct(
    \Magento\Backend\App\Action\Context $context,
    \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory   ) {
    parent::__construct($context);
    $this->resultJsonFactory = $resultJsonFactory;   }

    public function execute() {
    $response['status'] = "SUCCESS";

    $resultJson = $this->resultJsonFactory->create();
    $resultJson->setData($response); // array value set in Json Result Data set

    return $resultJson; // return json object
    } }

I am calling the controller with Ajax. My Ajax request:

  function ajaxRequest() {
    try {
      jQuery.ajax({
        url: 'my-controller-url',
        dataType: "json",
        type: "POST",
        data: data.cart })
      .done(function( json ) {
        if (json.status === "SUCCESS") {
          toggleConfirmOverlay();
          progress[data.currentSection].className = 'done';
          displayPopupCart();
        } else {
          alert( "Sorry, there was a problem!" );
          console.log(json.error);
        }
      })
      .fail(function( xhr, status, errorThrown) {
        alert( "Sorry, there was a problem!" );
        console.log( "Error: " + errorThrown );
        console.log( "Status: " + status );
        console.dir( xhr );
      })
      .always(function( xhr, status ) { //        toggleSpinner();
      });
    } catch (e) {
      console.log('error: ' + e);
    }   }

In the JS console I receive an error that JSON cannot be decoded. Inspecting the result shows a full HTML page with navigation.


texts: Need help to get the value for attribute

texts:
I have not seen dimension configuration(length, width, height) in the magento catalog settings. So i have created an attribute in the stores>attrbutes>product. After that i have add the attribute to my product.

However, in my php code(for shipping cost calculation), i was not able to get the value i enter for width, length, and height. I was able to log the label of my attribute, however i am not able to retrieve the value. I need retrieve those values for my shipping cost calculation.
 $info= $item->getProduct()->getResource()->getAttribute('dimensions_length')->getFrontendLabel();
 $this->_logger->log(100, $info);

I am beginner on magento and currently working on magento 2.4.0. Please help!!


texts: Magento 2 Shipping Price based on quantity dilemma

texts:
I have a scenario like, a Customer will purchase a product with 25 Qty, but during the checkout time, the bill or cart subtotal is generated for 25 qty.
Later while checkout, shipping charges(fedex services) will be added for the 25 Qty. But the thing is, the customer will select an option like, for now, say
out of 25 qty (which is already billed), customer will opt for 15 qty to be shipped first. For this only 15 qty shipping charges should be applied, Not for the entire cart Qty.

I can not work out how to do this. Please share your valuable thoughts.

Thank you


texts: Can't send sitemap for my Multistore to Google

texts:
I have a rare error. I have translated my website in to multiple languages, using Magento, like www.example.com/de
Now, I have added www.example.com/de in Search console and I want to send the sitemap, Google tells me to add the name of the sitemap that the page has to have structure of www.example.com/de/... but I can't do that because I have to create a folder in the root /de and if I go to www.example.com/de I see an error 403. Please suggest how I could do this, Thanks!


texts: How to get all shipping method collection for admin grid

texts:
How to get all shipping method label in  Custom Grid admin module . I am using the below Code .Its returning all shipping method Lable But i need all those as a collection . So i can use it my Custom admin grid .Can Any One Help us out

$methods = Mage::getSingleton('shipping/config')->getActiveCarriers();
$shipMethods = array();
foreach ($methods as $shippigCode=>$shippingModel)
{
    $shippingTitle = Mage::getStoreConfig('carriers/'.$shippigCode.'/title');
    $shipMethods[$shippigCode] = $shippingTitle;
}
return $shipMethods;


texts: Magento's log cleaning shell script cleans `report_event` and `report_viewed_product_index`?

texts:
Magento comes with a log-cleaning process as a Magento shell script located at shell/log.php, which is also used in the log maintenance configurable in the admin.

I traced the code to Mage_Log_Model_Resource_Log for the piece responsible for cleaning when php -f log.php clean --days xxx is executed. I'm running it manually, and I'm seeing report_event and report_viewed_product_index being cleaned as well, even though I don't see any reference to them in the code. Any ideas?

Update

I was able to SHOW CREATE TABLE, which shows me everything I need to know.

report_viewed_product_index:

CREATE TABLE `report_viewed_product_index` (
  `index_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Index Id',
  `visitor_id` int(10) unsigned DEFAULT NULL COMMENT 'Visitor Id',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Id',
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product Id',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store Id',
  `added_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Added At',
  PRIMARY KEY (`index_id`),
  UNIQUE KEY `UNQ_REPORT_VIEWED_PRODUCT_INDEX_VISITOR_ID_PRODUCT_ID` (`visitor_id`,`product_id`),
  UNIQUE KEY `UNQ_REPORT_VIEWED_PRODUCT_INDEX_CUSTOMER_ID_PRODUCT_ID` (`customer_id`,`product_id`),
  KEY `IDX_REPORT_VIEWED_PRODUCT_INDEX_STORE_ID` (`store_id`),
  KEY `IDX_REPORT_VIEWED_PRODUCT_INDEX_ADDED_AT` (`added_at`),
  KEY `IDX_REPORT_VIEWED_PRODUCT_INDEX_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_REPORT_VIEWED_PRD_IDX_CSTR_ID_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REPORT_VIEWED_PRD_IDX_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REPORT_VIEWED_PRODUCT_INDEX_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=11096 DEFAULT CHARSET=utf8 COMMENT='Reports Viewed Product Index Table'


texts: default store view is not selected by deafult when open any category in magento 2 admin

texts:
I have migrated Magento 1.9.3.1 to Magento 2.3.0

I am getting an issue in the admin.

When I open category in admin side then English store is selected by default. How can I make default_store_view is selected by default?

Also Add Root Category & Add Subcategory buttons are missing in the admin.

How can I fix these issues? Can anyone suggest a solution?


texts: Theme developement in magento 2.1 and fall back is not working

texts: I am creating a new theme. My theme has no css, js files. I have just added theme.xml and registration.php files. I have set parent theme magento/blank (in theme.xml). But my theme is not inheriting files (css,js, images) from parent theme. It was working in previous versions of magento 2. But its not working in 2.1. Please suggest.


texts: Unable To Save Or Run Import/Export Dataflow Profiles

texts:
I have recently started experiencing issues when saving or running any dataflow profiles in Magento. When trying to do so I get the following error message:

  Please set available and/or protected paths list(s) before validation.

After reviewing the code I came across the following inside the Mage_ImportExport_Helper_Data class on or around line 57:

public function getLocalValidPaths()
{
    $paths = Mage::getStoreConfig('general/file/importexport_local_valid_paths');
    return $paths;
}

This function is setting the returning a list of paths that are allowed to be inputted. The variable being returned is null everytime even though the following is set in the Mage_ImportExport extensions config.xml file:

<default>
    <general>
        <file>
            <importexport_local_valid_paths>
                <available>
                    <export_xml>var/export/*/*.xml</export_xml>
                    <export_csv>var/export/*/*.csv</export_csv>
                    <import_xml>var/import/*/*.xml</import_xml>
                    <import_csv>var/import/*/*.csv</import_csv>
                </available>
            </importexport_local_valid_paths>
            <bunch_size>100</bunch_size>
        </file>
    </general>
</default>

Has anyone experienced this issue before and know how it can be resolved?


texts: How to Add to cart all product in magento 2

texts: I added a button ("Add all product") on the header. How can I add all products to the cart by clicking on. Someone can help me to solve this problem. Thank you


texts: Send Magento 2 contact form contents to various Store Email Addresses by selecting a dropdown option

texts:
I've successfully added a 'departments' dropdown menu to my Magento 2 contact form using the instructions here

However I would like to send the contents of the form to different email recipients based on a dropdown menu. Ideally I would be able to add the various 'Sender Name' and 'Sender Email' from the Stores > Config > General > Store Email Addresses, so that an admin can easily change the details if they need to. The 'Sender Name' would be the option in the dropdown, which sends the email to its corresponding email address. Or failing that, manually adding the various emails in the code.

I've had a search but can't find a solution. Any help would be gratefully appreciate.


texts: (Magento 2) Configurable product price doesn't change

texts:
Version : Magento 2.3.2
Theme : Cleversoft

Hello,
I have a product with it's variations (depending on the delivery).

On my product page, I have my button for chose the delivery option, but the price doesn't change (only on the view, because it's adding the good price in the cart).

I have try to modify several files (like the 'tier_price' or 'renderer' or 'final price' files).

If someone have an idea, a solution or whatever that could help me... It will be very nice.


texts: I need a magento 2 web site for European customers, the products will be about 1000, and I am a chinese, so I need it can be visit from china fast, so please give me a suggestion about hosting provider and hosting plan, does 2 Core 4 GB should be ok?


texts: HOW TO IMPORT AED , CANADA , GERMANY, FRANCE, JAPAN, SINGAPORE, CHINA CURRENCY IN MAGNETO2.2

texts:
AFTER SELECT AED CURRENCY IN UAE STORE.
  FRONTEND SHOWING ONLY USD CURRENCY.
  HOW I SHOW AED CURRENCY IN UAE STORE ON FRONTEND?
  ALSO OTHER DIFFRENT-2 CURRENCIES FOR DIFFERENT-2 STORE VIEWS?


texts: How to tell from the code which language to deploy?

texts:
If you don't have access to Magento 2 backend, how to tell from the code which language to deploy?
For example how do I know I should deploy this:

php bin/magento setup:static-content:deploy en_US

or

php bin/magento setup:static-content:deploy en_CA


texts: adding top menu items - recursively in observer

texts:
I am trying to add links to my top menu using a collection - I realised I had to do this in the observer so I set it up and it is properly working (if I delete all the code inside nothing prints)

The problem is it is only adding the last item in my lists (I have two lists, one for the elements visible in the menu, one for child elements that you can see if you hover over the parent)

I have a feeling that somehow I am overwriting my last recursions but I don't see how.

Here is my code:

public function addItemsToTopmenuItems($observer)
{
    $menu = $observer->getMenu();
    $tree = $menu->getTree();

    $collection = Mage::getModel('sean_menucreator/menuelement')->getCollection();
    $menuelementNodeId = 'menuelement';
    foreach($collection as $menuitem) {

        if($menuitem->getLevel()=='1'){
            $node = new Varien_Data_Tree_Node(array(
                'name'   => $menuitem->getName(),
                'id'     => $menuelementNodeId,
                'url'    => $menuitem->getUrl(), // point somewhere
            ), 'id', $tree, $menu);

            $menu->addChild($node);

            $parent_id = $menuitem->getEntity_id();

            $action = Mage::app()->getFrontController()->getAction()->getFullActionName();
            foreach ($collection as $menuitem){
                if(isset($parent_id) && $menuitem->getParent_id() == $parent_id) {
                    $tree = $node->getTree();
                    $data = array(
                        'name' => $menuitem->getName(),
                        'id' => $menuelementNodeId,
                        'url' => $menuitem->getUrl(),
                        'is_active' => ($action == 'sean_menucreator_menuelement_index' || $action == 'sean_menucreator_menuelement_view')
                    );

                    $menuelementNode = new Varien_Data_Tree_Node($data, 'id', $tree, $node);
                    $node->addChild($menuelementNode);
                }
            }
        }
    }
    return $this;
}

You can see it goes through the collection and picks out the elements that belong in the top level of the menu (1) and adds them, then goes through and adds child elements of that parent element based on parent_id then does it again until it has been through all of the elements in the array and checked if they belong in the menu visibly and whether they have children.

but on my menu I only see one parent element in the menu where there should be two, and the parent element only has one child where there should be two, and both of these elements are the last in their respective lists so it might be overwriting somewhere but I can't see it, can anyone help?


texts: Hide SKU from customer Completely (Whole Front End + Emails)

texts:
I want to restrict SKU in magento 1.9.3.4 to admin only.

I tried several topics to do it across xml files and from emails with different methods.

Is there a way possible to completely hide SKU from customers in front end everywhere, including all sales emails to the customer, but only admins can see the SKU for the product.


texts: Unable to override account creation email template

texts:
I need to modify the welcome email sent to user upon new account creation. I need to do this in my custom module. I tried to override the function sendNewAccountEmail in Magento\Customer\Model\Customer using preference method and also using plugin method. Both were not working.

For preference method I added the following

In Vendor/Module/etc/di.xml

Added Customer.php file in the location Vendor\Module\Model\Customer and added the following code

public function sendNewAccountEmail($type = 'registered', $backUrl = '', $storeId = '0')
{
echo "It's Working";exit;
$types = $this->getTemplateTypes();

if (!isset($types[$type])) {
    throw new \Magento\Framework\Exception\LocalizedException(
        __('Please correct the transactional account email type.')
    );
}

if (!$storeId) {
    $storeId = $this->_getWebsiteStoreId($this->getSendemailStoreId());
}

$this->_sendEmailTemplate(
    $types[$type],
    'customname/email/account_email_template',
    ['customer' => $this, 'back_url' => $backUrl, 'store' => $this->getStore()],
    $storeId
);

return $this;
}

Still it's not taking the Customer.php file in the module.

  echo "It's Working"; is not displaying.

Please advise the correct method to follow. I tried the plugin method also. It's also not working.


texts: Magento2: Default success messages not showing at frontend

texts:
I've installed magento version 2.1.1 and facing issues that Magento's default success/failure messages not showing at frontend on top of the page.

Example
1. If I add product to cart it doesn't show success message for adding product to cart however product is added to the cart.

2. I'm submitting contact us form, receiving email but success message not showing at top.

Can someone help me to resolve this?


texts:
I deleted 2 unnecessary attributes from Manage Attributes in backend. When I saw in frontend, it is showing  192.168.1.24 is currently unable to handle this request. HTTP ERROR 503

I tried seeing error_log file as well as index.php but found no error.

It was working fine before deleting attributes.


texts:
I have a small Magento 1 shop. In product list I only have 1 button.
Add to Cart (Forudbestil) marked with a red arrow.

I would like to add a button more called "More info" when pressed you get to the product detail page. Like when you press the image. I found a website with this. The blue arrow points at the "Add to cart" button and the red arrow points to the button I would like to add to my website. I have tried finding an extension to do the trick, but so far with no luck.


texts: Customer address edit and add event in Magento2

texts:
I am using below event and observer to trigger customer address add and edit.

code for events.xml

 <event name="customer_address_save_after">
    <observer name="customer_addres_after_save_viv_observer" instance="Vendor\Module\Observer\CustomerAddressSaveObserver" />
</event>

Here is the observer file code.

  class CustomerAddressSaveObserver implements ObserverInterface {

/**
 * @var CustomerRepositoryInterface
 */
protected $customerRepository;
protected $_logger;

public function __construct(
    \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository,
    \Psr\Log\LoggerInterface $logger
) {
    $this->customerRepository = $customerRepository;
    $this->_logger = $logger;
}

public function execute(\Magento\Framework\Event\Observer $observer)
{
    $customerAddress = $observer->getEvent()->getCustomerAddress();
    echo '<pre>';
    print_r($customerAddress->getData());die;
}

}

But the event is not firing for me. Am i using the correct code?


texts: how to remove error "* Item qty declaration error."

texts: I’m getting this message while adding a product to the cart. “* Item qty declaration error.“ any ideas how to fix that ? Thanks.


texts: How can I change the cookie notice image?

texts:
With regard to the cookieNotice in Magento CE 1.9.2 ("This website requires cookies to provide all of its features..."), does anyone know how to change the image displayed?

It defaults to the Magento logo, I'd prefer to change it to my store's logo though :)

Thanks for any help you can provide!


texts: I am using magento 2.3.2. My product images are not loading on mobile. Please help.It a critical issue. Its just shows infinite loading and then hang ups. This happens on product view page.


texts: Magento 2.3 - Overide \magento\zendframework1\library\Zend\Locale\Data\xx.xml

texts:
Is there anyway to override and not change directly the

 \magento\zendframework1\library\Zend\Locale\Data\xx.xml ?

This is so that I can change the decimal denoter from "," to "." for stores that use comma as decimal .


texts: Magento 2 How to add time picker on custom form on frontend

texts:
I want to add a time picker like the one in the image in a custom form on frontend.

Any help would be appreciated.


texts: Is it possible to have separate pages for product details and product order forms?

texts:
I am trying to create a store that has a product details page that is separate from the order form. I want customers to view the product details before being able to order the product. After they visit the product details page, I want customers to click an "Order Now" button which takes them to an order form.

Here's an example of what I'm trying to accomplish:

Product Details:
http://www.zennioptical.com/270124-plastic-full-rim-frame.html

Product Order Form:
http://www.zennioptical.com/buy/270124-plastic-full-rim-frame.html?_windowid=new&curFaceId=sysface1670012

I have a lot of custom options that the customer must fill out for each order, and I need to have them on a separate page. Is this possible with Magento?


texts:
I want to remove sample data or reinstall magento 2.2.1 without sample data

i tried below command.

php bin/magento sampledata:remove

command is not working and throwing below error

[Composer\Downloader\TransportException]
  The 'https://repo.magento.com/packages.json' URL required authentication.
  You must be using the interactive console to authenticate


texts: CSS and JS not loading from Extension Error 403

texts:
after installing a slider extension I can't get it to display properly in the frontend. There are just the pictures and text without any formatting or functionality. It is correctly configured, but loading the css/js files fails (Error 403 in browser console). I checked the directory. The files are there and permissions are 755/644. I also noticed that in my htaccess file everything in the root folder is redirected to error 403. Does this have anything to do with it?

System:
Magento 2.1,
Plesk 12,
Ubuntu 14.04
Website: http://speedswim.de/

EDIT: Following Error in error_log: Symbolic link not allowed or link target not accessible


texts: Duplicate codes sent to user - SELECT FOR UPDATE

texts:
Hi guys I am working an a site that sells electronic codes, the issue I am having is if two people order in the same few seconds they are BOTH sent the SAME codes.

I need a way editing it so when the collection of codes is loaded they are locked for that order so no other order can come in and use them.

I currently load codes in the following way from the database:

$qty = round($item->getQtyOrdered());
$codes = $this->getCollection()
      ->addFieldToFilter('codetype',array('like' => $sku))
      ->addFieldToFilter('codestatus', array('eq' => 0))
      ->setPageSize($qty)
      ->load();

This collection of codes are then passed on to another function which loops through them and adds them to the order etc.

I know I can manually do this via a direct query, but the rest of the plugin relies on this collection being loaded as a Magento object and if I do it direct I just get a normal array of results and not an object:

$query = "SELECT * FROM codes WHERE used = 0 FOR UPDATE";
    /**
     * Get the resource model
     */
    $resource = Mage::getSingleton('core/resource');

    /**
     * Retrieve the read connection
     */
    $readConnection = $resource->getConnection('core_read')->fetchOne($query);

Can anyone advise me on how I can prevent this duplication of codes on orders?


texts:
I have been working on our site to download the images for specific SKUs. I am fetching the images like following

require('../app/Mage.php');
Mage::init();
$sku = $_REQUEST['sku'];
$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);
$_images = $product->getMediaGalleryImages();
$url = array();
if(empty($_images))
    die();
foreach ($_images as $image) {
   $url[] =  str_replace('https:' , 'http:',$image->getUrl());
}
echo implode("|||" , $url);

It works well for the enabled products, but images for disabled products can't be fetched using this snippet. Can anybody help me out to load disabled product images by SKU?


texts: How to find Which Module Giving this error : Uncaught TypeError: Constr is not a constructor

texts:
Every UI Grid generating this Error.
This Error Only giving in Live Not in local instance, as well as Other Server. All the Instance same Code Same DB.
How to find Which Module Giving this error?


texts: Magento 2 - Layered navigation Parent and Child Category Filter issue

texts:
I am using WeltPixel layered navigation Free extension. In category filter, third level categories was not showing in filter navigation by default. I added some code to get third level categories.

protected function _getItemsData()
    {
        if (!$this->_moduleHelper->isEnabled()) {
            return parent::_getItemsData();
        }

        /** @var \Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection $productCollection */
        $_objectManager = \Magento\Framework\App\ObjectManager::getInstance();

        $productCollection = $this->getLayer()->getProductCollection();

        if ($this->_isFilter) {
            $productCollection = $productCollection->getCollectionClone()
                ->removeAttributeSearch('category_ids');
        }

        $optionsFacetedData = $productCollection->getFacetedData('category');
        $category           = $this->dataProvider->getCategory();
        $categories         = $category->getChildrenCategories();

        $collectionSize = $productCollection->getSize();

        if ($category->getIsActive()) {
            foreach ($categories as $category) {
                $count = isset($optionsFacetedData[$category->getId()]) ? $optionsFacetedData[$category->getId()]['count'] : 0;
                if ($category->getIsActive()
                    && $this->_layerFilter->isOptionReducesResults($this, $count, $collectionSize)
                ) {
                 $this->itemDataBuilder->addItemData(
                        $this->escaper->escapeHtml($category->getName()),
                        $category->getId(),
                        $count
                    );
                }
                // added for child categories
             $cat = $_objectManager->create('Magento\Catalog\Model\Category')->load($category->getId());
                $sub_category = $cat->getChildrenCategories();

                foreach ($sub_category as $category) {
                    if ($category->getIsActive()
                            && isset($optionsFacetedData[$category->getId()])
                            && $this->isOptionReducesResults($optionsFacetedData[$category->getId()]['count'], $collectionSize)
                        )
                    {
                      $this->itemDataBuilder->addItemData(
                            $this->escaper->escapeHtml($category->getName()),
                            $category->getId(),
                            $optionsFacetedData[$category->getId()]['count']
                        );
                    }
                } //
               // end child categories code
        }
    }
return $this->itemDataBuilder->build();
    }
}

Child categories are now showing, but the issue is all parent & child categories are showing in single ol li list. Screenshots

Category List HTML

How to identify Parent and child categories using above code?


texts: Magento 2 - How to add a custom column in customer grid like (is approved)

texts:
i want to add a custom column in customer grid like "is_approved" customer section.
please suggest.


texts: Get Most view products of current product categories in product detail page(view.phtml) in magento

texts:
I want to create you may also interested Section in product detail page.
this section create most view product of current product of categories.
means view.phtml file product of categories of most view product.

 $categories = $_product->getCategoryCollection()
                          ->addAttributeToSelect('name');
        foreach($categories as $category) {
            $catIds[] = $category->getID();

                }

print_r(catIds);

here i am get category 17,31. i can not undestand how to get
this category most view product display here.

How to do it.


texts: How to get additional_information on sales/order

texts:
This is my code. I would like to get additional_information on API.
I'm using getPayment, on this way, I believe that I can define this function there. I don´t know, just looking for some help or something that I can use. I´ll appreciate any help.

 /**
 * Retrieve order payment model object
 *
 * @return Mage_Sales_Model_Order_Payment
 */
public function getPayment()
{
    foreach ($this->getPaymentsCollection() as $payment) {
        if (!$payment->isDeleted()) {
            return $payment;
        }
    }
    return false;
}


texts: Null customer_address_id on sales_flat_order_address table

texts:
Does somebody know why field customer_address_id is null on sales_flat_order_address table? As regards to order for customer who has an address.

In class: Mage_Sales_Model_Order_Address I found this:

protected function _beforeSave()

{
    parent::_beforeSave();

    if (!$this->getParentId() && $this->getOrder()) {
        $this->setParentId($this->getOrder()->getId());
    }

    // Init customer address id if customer address is assigned
    if ($this->getCustomerAddress()) {
        $this->setCustomerAddressId($this->getCustomerAddress()->getId());
    }

    return $this;
}


texts:
The account login page isn't allowing customers to log in.
I tried what this article says Customer Login Doesn't Work in 1.9
but it's still not working.

It was working earlier, I could log in I added a logout link.
But now I cant log in anymore. I've flushed my magento cache,cache storage and browser cache but nothing is working.
Any ideas?


texts:
How we can easily add soap call page to applications ? If the magento installation is at mymagento.com what can be the soap call http request ?

i tried with $soap = new SoapClient('http://mercande.com/index.php/api/soap_v2?wsdl');


texts:
When I was exporting my customer's list,

under System => export=>customers,

I'm not getting an IP address,

How can I configure?

Is this required to do a configuration from the core?

Thanks in Advance.


texts: Array to string conversion on File upload functionality in Magento2

texts:
I am getting this error after I put a file upload button.When I click save I got this error

[2021-01-20 05:42:43] main.CRITICAL: Exception message: Notice: Array to string conversion in /var/www/html/M2_arbergtime.dk/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 3105
Trace: #1 Magento\Framework\DB\Adapter\Pdo\Mysql->prepareColumnValue(array('SCHEMA_NAME' => NULL, 'TABLE_NAME' => 'magefan_blog_pos...', 'COLUMN_NAME' => 'blog_header_imag...', 'COLUMN_POSITION' => 36, 'DATA_TYPE' => 'varchar', 'DEFAULT' => NULL, 'NULLABLE' => true, 'LENGTH' => 255, 'SCALE' => NULL, 'PRECISION' => NULL, 'UNSIGNED' => NULL, 'PRIMARY' => false, 'PRIMARY_POSITION' => NULL, 'IDENTITY' => false), array(array('name' => 'magento2.png', 'type' => 'image/png', 'tmp_name' => '/tmp/phpWBu1Sw', 'error' => 0, 'size' => 45718, 'file' => 'magento2.png', 'url' => 'http://127.0.0.1...', 'cookie' => array('name' => 'admin', 'value' => 'c0t2uv3r7c197mks...', 'lifetime' => 31536000, 'path' => '/M2_arbergtime.d...', 'domain' => '127.0.0.1'), 'previewType' => 'image', 'id' => 'bWFnZW50bzIucG5n')))

If i fill some value to image filed in table manually using phpmyadmin, than i git this error in edit page.
Uncaught TypeError: value.map is not a function
at UiClass.setInitialValue (file-uploader.js:79)


texts: Product Editing page not Opening (admin Panel)

texts: I am using Magento 1.9 and Product Editing page is not opening from admin panel i tried to check error and i get errors as shown in fig. kindly help me to fix it . Urgent!


texts: Can't add product to compare, _validateFormKey() return false

texts:
I'm updating an old Magento instance from 1.7.0.2 to 1.9.2.1 (I know there is the v. 1.9.2.2).

I'm also using the Ultimo theme, but i tested the bug also with the standard RWD theme that comes with Magento 1.9.

The issue is about the add to compare button: it doesn't work. It only redirects me to the same page but it doesn't add the product to compare list.

I find out that the problem is in the addAction() function in CompareController.php

There is

public function addAction()
{
    if (!$this->_validateFormKey()) {
                $this->_redirectReferer();
                return;
            }
...
}

And $this->_validateFormKey() return FALSE so nothing is done.

Just for information, my add to compare link are looking like the following

http://example.com/catalog/product_compare/add/product/2480/uenc/aHR0cDovL3N0a25ldzE5Lmh0dGRldi5pdC9pcGhvbmUtNi1wbHVzLTE2Z2ItYmxhY2suaHRtbA,,/

At the moment, my solution is to comment the IF.

Somebody knows how to solve this problem?

EDIT:
Into the template file addto.phtml the code is the following:

...
<?php
    $_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product);
?>
<?php if($_compareUrl) : ?>

        <a class="link-compare feature feature-icon-hover first" href="<?php echo $_compareUrl ?>" title="<?php echo $this->__('Add to Compare') ?>">

            <?php echo $this->__('Add to Compare') ?>

<?php endif; ?>
...


texts: catalog/product/list.phtml insert text before price IF within certain category

texts:
<?php echo $this->getPriceHtml($_product, true) ?>

How do I write this line so that the text "Starts at" appears before the price of simple products but only within the categories with IDs 3, 10, 25, 26, 27, 28, 11, 12, 29, 13, 14, 7?

Thank you.


texts: How to add dynamically custom attributes to quote and order in magento 2?

texts: I'm developing an extension which requires adding fields to quote (and later to order as well) dynamically. Should I make two extra tables in the database, one for quote and second one for order, or is there a better way to store the new data? My extra fields have identifiers created by shop admin so I cannot hardcode thir names into xml or somewhere like that. I've been seeking some solutions for quite a time but can't find anything interesting on this topic.


texts: What are the faulty works by admin will crash the entire system?

texts:
I'm going to give admin access to my client with the following functions disabled

magento connect disabled
Can't change theme or remove plugin

what else do I need to disable/enable, so that any actions done by admin will not crash the entire system and won't say "can't process your request".


texts:
Is it possible to prevent other web sites from using / loading images of a Magento 2 installation for example by setting a restrictive access-control-allow-origin, or setting htaccess rewrites?
SEO has to be also considered so I'm asking best practices here if there are any.
Here is one htaccess example I found:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|svg)$ http://dropbox.com/hotlink-placeholder.jpg [NC,R,L]

Would that work?


texts: Uncaught Error: Call to a member function dispatch() on null

texts:
i am creating custom tab for frontend customer dashboard.
it works well but after click the custom tab, the error of the title occurs.
nothing comes on debug log. this error occurs before the controller is executed.
any help appriciated.
my url(should be)
http://127.0.0.1/proxy_quote/index/config

├── Block
│   └── Config.php
├── Controller
│   └── Index
│       └── Config.php
├── etc
│   ├── frontend
│   │   └── routes.xml
│   └── module.xml
├── registration.php
└── view
    └── frontend
        ├── layout
        │   ├── customer_account.xml
        │   └── proxyquote_index_config.xml
        └── templates
            └── customer_config.phtml

Block.php
namespace MyModule\ProxyQuote\Block;

class Config extends \Magento\Framework\View\Element\Template
{
    public function __construct(\Magento\Framework\View\Element\Template\Context $context)
    {
        parent::__construct($context);
    }
}

<?php

namespace MyModule\ProxyQuote\Controller\Index;

class Config extends \Magento\Framework\App\Action\Action
{
    /**
     * __construct
     */
    public function __construct(
        \Psr\Log\LoggerInterface $logger,
        \Magento\Customer\Model\Session $customerSession
    ) {
        $this->logger = $logger;
        $this->session = $customerSession;
    }

    public function execute()
    {
        $this->logger->debug('does it work????????????');
        $this->_view->loadLayout();
        $this->_view->renderLayout();
    }
}

layout/proxyquote_index_config.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <update handle="customer_account"/>
    <body>
        <referenceBlock name="page.main.title">
            <action method="proxyQuoteConfig">
                <argument translate="true" name="title" xsi:type="string">proxy_quote</argument>
            </action>
        </referenceBlock>
        <referenceContainer name="content">
            <block class="Magento\Framework\View\Element\Template" name="config" template="MyModule_ProxyQuote::customer_config.phtml">
            </block>
        </referenceContainer>
    </body>
</page>


texts:
I create category:

 $category->setName(self::CATEGORY_AZ_NAME)
            ->setUrlKey('...')
            ->setUrlPath('...')
            ->setIsActive(1)
            ->setDisplayMode(Mage_Catalog_Model_Category::DM_PRODUCT)
            ->setIsAnchor(0)
            ->setStoreId(0)
            ->setPath($rootCategory->getPath())
            ->setAttributeSetId($category->getDefaultAttributeSetId())
            ->setStoreId(Mage_Core_Model_App::ADMIN_STORE_ID)
            ->setInitialSetupFag(true)
            ->save();

But on a front this category have wrong link.
I think that there are URL rewrite not created.

How can i create URL REWRITE for this category?


texts: Generating bundling js in wrong directory, without vendor_module

texts:
I have a custom bundlingjs file for a specific page on magento 2, and I'm trying to run this command:
r.js -o pub/static/my_bundling_file.js baseUrl=pub/static/frontend/vendor/theme/locale_tmp dir=pub/static/frontend/vendor/theme/locale_tmp

It's working, but I'm getting some errors like this:

require.js:8 GET http://my-website/static/version1617939686/frontend/vendor/theme/locale/magicproduct.js net::ERR_ABORTED 404 (Not Found)

It's because vendor/theme/locale/magicproduct.js its not on root directory, but it's is vendor/theme/locale/Magiccart_Magicproduct/js/magicproduct directory (Magiccart_Magicproduct).
How can I fix that? Js files are being generated in wrong directory.
my_bundling_file.js
({
    "optimize": "uglify2",
    "generateSourceMaps": true,
    "wrapShim": true,
    "inlineText": true,
    "paths": {
        ...
    },
    "shim": {
        ...
        "magicproduct": {
            "deps": [
                "jquery",
                "magiccart/slick"
            ]
        },
        ...
    },
    "map": {
        "*": {
            ...
            "magicproduct": "Magiccart_Magicproduct/js/magicproduct",
            ...
        }
    },
    "modules": [
        {
            "name": "bundles/shared",
            "create": true,
            "exclude": [],
            "include": [
                ...
                "Magiccart_Magicproduct/js/magicproduct",
                ...
            ]
        },
        ...
    ]
});

thanks


texts: Sort attribute values in Backend in custom order

texts:
I need to sort my custom attribute values in alphabetical order.

Magento ver. 2.1.2

Now my options are sorted by eav_attribute_option.sort_order and i need to sort them by eav_attribute_option_value.value.

I need this when I will create a new product and set 'series' of this product (166 different 'series' in random order now) from dropdown input.

I tried this: Configurable product attribute sort order in Dropdown 2.12 but it seems not working for me.

If I comment whole method public function getAttributeOptions($superAttribute, $productId). it seems not affect on website at all (so it's not in use I assume?) But I was looking for replace this class in di.xml but with no success.

How to manage with that?


texts:
I'm working with a shop which sells used Products. I want the customer reviews be visible on a "product type" page: An example:
If i have used a used laptop msi ge60 with several hardware configurations. I want the customer review for each used msi ge60 no matter what kind of hardware features it has. If i delete one of these used msi ge60 or it is out of stock i want the review still be visible on that certain type of msi ge60.

I hope you can help me, thanks


texts: Magento2 How can I choose multiple products by SKU?

texts: How can I choose multiple products by SKU in a widget?


texts: How to Fix - Front controller reached 100 router match iterations

texts:
I know there is a lot written about this kind of error but I haven't been able to fix it yet. Here is the Report error:

a:5:{i:0;s:52:"Front controller reached 100 router match iterations";i:1;s:446:"#0 /home/xxxx/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(154): Mage::throwException('Front controlle...')
#1 /home/xxxx/public_html/app/code/core/Mage/Core/Model/App.php(189): Mage_Core_Controller_Varien_Front->dispatch()
#2 /home/xxxx/public_html/app/Mage.php(414): Mage_Core_Model_App->run(Array)
#3 /home/xxxx/public_html/mx/index.php(66): Mage::run('mx', 'store')
#4 {main}";s:3:"url";s:30:"/mx/review/product/post/id/25/";s:11:"script_name";s:13:"/mx/index.php";s:4:"skin";s:2:"mx";}

I found this [Fix It Series] Magento Error: Front Controller Reached 100 router Match Iterations

and I added the debug code to app/code/core/Mage/Core/Controller/Varien/Front.php and here's what I got in system.log:

2018-03-22T18:29:01+00:00 WARN (4): Honeypot Input filled. Aborted.
2018-03-22T18:29:01+00:00 DEBUG (7): Matched by "standard" router, class Mage_Core_Controller_Varien_Router_Standard
2018-03-22T18:29:01+00:00 DEBUG (7): - Iteration 99
2018-03-22T18:29:01+00:00 DEBUG (7): Request: [path_info=/etreviewnotify/product/post/id/25/][module=honeyspam][action=index][controller=error][controller_module=Hackathon_HoneySpam][route=hackathon_honeyspam]
2018-03-22T18:29:01+00:00 WARN (4): Honeypot Input filled. Aborted.
2018-03-22T18:29:01+00:00 DEBUG (7): Matched by "standard" router, class Mage_Core_Controller_Varien_Router_Standard
2018-03-22T18:29:01+00:00 DEBUG (7): - Iteration 100

How can I fix this? The debug says there is an [controller=error] but I'm still stuck on this.


texts: Change registered customer biliing email address on the time of checkout

texts:
I am trying to implement one functionality where logged in user can able to change the billing email address on the time of checkout. I have tried to do that but all the time it updates customer account email address which I don't want. I have tried by updating email from quote & order both before save order function using $quote->getCustomer->setEmail(",,,,,") & $order->getCustomer()->setEmail("...") but unfortunately all the time it updates customer account email address but I need to update customer email id for particular order only (table- sales-flat-order).

Please suggest any solution.


texts: Is there any way to give weight a negative value?

texts:
Some of my items are collection only while some are not. I have set my collection only products to have a weight of 50. I have a shipping method setup so if an order has a weight of 50 or above, the collection method will be available.

The problem I have is that someone could theoretically add on a non collection product onto a collection order as the weight is above 50.

Is there anyway I could have negative weight so that a non collection item could be worth -99999 weight

This would eradicate the issue I am having.


texts: Magento 2 : Why product showing different names in admin area?

texts:
Same product having different names:

Products/Catalog:

Please see 1st product in list(9766) -> Name : bbbbbbb

Same product in edit mode(9766):

Name : GGGGG

When I tried custom query on my database getting following result:

Tested after clearing generation and cache.
How to solve this now?


texts:
I want to test magento2.0.4 performance in my virtual machine .
I read Magento Performance Toolkit User Guide.pdf in https://github.com/magento/magento-performance-toolkit .
It teach me that The most recent version of the Magento Performance Toolkit for 2.x is published at https://github.com/magento/magento2 and included in the /dev/tools/performance_toolkit folder.

So I downloaded magento2.0.4 but there isn't /dev/tools/performance_toolkit forlder.

I want to try this one .
I want to know how performance when cart in and check out .


texts:
Im too new for magento! i wanna put off the currently magento community pool & recently viewed module -- but failed.

Its details like follow.
Location: Left side of the page.
Path: Categories section
Magento version: Magento ver. 1.9.2.1

Picture:

From the picture, there have recently viewed product module & also Community Poll. I need to remove all these modules/outputs.

  Blockquote

Some response to achieve that is go admin >> CMS >> poll

  Blockquote

But the issue is Poll option on Magento ver. 1.9.2.1 not available anymore.

Also, this have been done but no luck: Admin >> System >> Configuration >> Advance >> Advance: Mage_Poll Set to DISABLE.

What should i do now to make these 2 output disappear in any of the page?

Notice: Im on Magento ver. 1.9.2.1


texts:
I am trying to get the base url of my website.

But not matter what I try,I only get https://127.0.0.1/magento

I want to get https://127.0.0.1

I tried

$this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_WEB)

and all the associated techniques with object manage but always give the same result.

namespace Vendor\Module\Block;

use Magento\Framework\View\Element\Template;
use Magento\Framework\View\Element\Template\Context;
//use Vendor\Module\Model\FidoServiceFactory;
use Magento\Customer\Model\Session;

class Register extends Template
{
    private $fidoCallerFactory;
    private $session;
    // public function __construct(Context $context, FidoServiceFactory $fidoServiceFactory, Session $session) {
    //     parent::__construct($context, []);
    //     $this->fidoServiceFactory = $fidoServiceFactory;
    //     $this->session = $session;
    // }
    //
    // #Returns the base URL of currently visited store.
    public function getBaseUrl() {
    //  console.log($this->_storeManager->getStore()->getBaseUrl());
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
        return $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_LINK);
      //return "http://127.0.0.1";

    }


texts:
I have a BO form, I've been adding some fields it works fine.
But since I tried to add an 'image' field, I'm taking an access denied error and in fact this happen even before I hit my controller (cause I don't take the die inside).
This is the field
    $columnOne = $form->addFieldset('mega_setting_column_one_fieldset', ['legend' => __('Column 1'), 'class' => 'fieldset-wide']);
    $columnOne->addField(
        'column_one_img_vertical',
        'image',
        [
            'label' => __('Column 1 image'),
            'title' => __('Column 1 image'),
            'name' => 'column_one_img_vertical',
            'note' => __('Allowed file types: jpg, jpeg, gif, png'),
            'required' => false,
            'disabled' => false
        ]
    );

The error seems to be directly related to this field content, because if I let the field empty I can enter the controller, but if I set an image into that field, I'm taking this access denied error (the error is translated)

This website is unavailable
It might be possible the webpage at url
http://mysite.local:8050/NdMa_865/ubmegamenu/item/save/key/9d965daeac179192c4280808f0b6f2fa6a7eeea77fde48560a40a2d0ada0fa85/active_tab/mega_setting_section/
is temporary unavailable or has been moved permanently to an other url on web. ERR_ACCESS_DENIED

I don't really understand what's happening here.
PS: Note I already have an image field working...
    $fieldset->addField(
        'icon_image',
        'image',
        array(
            'name' => 'icon_image',
            'label' => __('Menu Icon'),
            'title' => __('The Icon Image of menu item to upload'),
            'note' => __('Allowed file types: jpg, jpeg, gif, png'),
            'required' => false,
            'disabled' => $isElementDisabled
        )
    );


texts: I am showing accessory products on popup and it appears just after adding actual product in cart.


texts:
I would like to hide any products with a 'special price' from the main catalogue to only show them on a custom 'sale' page.

I could probably do this in M1 but I do not know what the general approach to this should be in M2.

I still want the special price products to show in the sale page and in upsells/cross sells.

Ideally I also have filtering on the sale page, the standard M2 widget does not allow for this but I think I can build a custom collection for this. Hence I am interested in a general approach rather than a fully working solution, just to point me in the right direction.


texts:
i want that color swatches to show text instead of images,

basically it is some js issue below code is used to show images:

elm = new Element('img', {
                                src: '<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>hk_option_swatches/'+item.img,
                                alt: opt.innerHTML,
                                title: opt.innerHTML,
                                'class': 'swatch-img'});

now i want this to be span or duv with text inside

i wrote below code to add span

elm = new Element('span', {
                                'class': 'mycustomswatcher swatch-img'});

The above code adds

how can i add text inside span i wrote below code

                    elm.update("g");

but it's showing error.


texts: Undefined class constant 'HASH_SALT_LENGTH', How to check if not defined?

texts:
I'm working on a custom module that relies upon some properties from Admin user model. I used the method hashPassword() in my custom model replicated from core customer model, and in there, there is a call for constant Mage_Admin_Model_User::HASH_SALT_LENGTH. When I was working with version 1.9, all was good to go, but then I needed to port the module for 1.6, and there started my problem.
Turns out that above constant is not defined in 1.6, tried with defined(Mage_Admin_User_Model::HASH_SALT_LENGTH), but no success.

Magento 1.6 had the value hard-coded to 2, and 1.9 has this value in constant as 32.

Looking for a better approach than to just hard-code the value so in versions in-between, I can use the same value being used by core code.


texts: In which folder are the product images in magento 2

texts: I'm trying to migrate a local project to the server and when trying to get the images in pub / media / catalog / product they just don't appear. Where does magento physically store images? i tried to search but all i found were images from sample-data. Where are the physical images of the products? and without using the magento csv tool.


texts:
I am running Magento 2 on MAMP using PHP 5.6.10 and following this tutorial to create the crontab.

Magento 2 Setup with Crons

When I type sudo crontab -u Phil -e and enter the following...

*/1 * * * * /Applications/MAMP/bin/php/php5.6.10/bin/php -c /Applications/MAMP/bin/php/php5.6.10/conf/php.ini /Users/Phil/sites/magento/bin/magento cron:run >> /Users/Phil/sites/magento/var/log/setup.cron.log&
*/1 * * * * /Applications/MAMP/bin/php/php5.6.10/bin/php -c /Applications/MAMP/bin/php/php5.6.10/conf/php.ini /Users/Phil/sites/magento/update/cron.php >> /Users/Phil/sites/magento/var/log/setup.cron.log&
*/1 * * * * /Applications/MAMP/bin/php/php5.6.10/bin/php -c /Applications/MAMP/bin/php/php5.6.10/conf/php.ini /Users/Phil/sites/magento/bin/magento setup:cron:run >> /Users/Phil/sites/magento/var/log/setup.cron.log&

I get an error Pattern not found 1 * * * *

Any ideas on setting this up ?


texts: How to append a new Json element to setData with resultJsonFactory in Magento2

texts:
public function __construct(
   JsonFactory $resultJsonFactory
)
{
   $this->resultJsonFactory = $resultJsonFactory;
}
$response = $this->resultJsonFactory->create();
$response->setHttpResponseCode(406);
$response->setData(['error_code' => '111','subscription' => '222']);
...
// now i want to add new_item to the array in response
// without clearing the previous set content.
$response->setData('new_item' => '333')

I can see that setData it is using Zend_Json::encode

public function setData($data, $cycleCheck = false, $options = [])
{
    $this->json = \Zend_Json::encode($data, $cycleCheck, $options);
    return $this;
}

but I can't find if it is an option to insert instead of set


texts:
I try to create a plugin and getting following error

Loginpost/Redirect/frontend/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  <type name="\Magento\Customer\Controller\Account\LoginPost">
    <plugin name="loginpost_redirect_loginpostplugin" type="\LoginPost\Redirect\Plugin\LoginPostPlugin" sortOrder="1" />
  </type>
</config>

Loginpost/Redirect/Plugin/LoginPostPlugin.php

<?php

namespace Loginpost\Redirect\Plugin;

class LoginPostPlugin
{
    public function afterExecute(
        \Magento\Customer\Controller\Account\LoginPost $subject,
        $result)
    {
        $result->setPath('/checkout');
        return $result;
    }

}


texts: Magento 2.3.0 — Shipping Method Fetching

texts:
Does anyone knows or has an answer(explanation) to the following questions:

How does Magento 2.3.0 fetch all the available Shipping method?
Which Layout or Template in Magento core is making the fetching and displaying process for the Shipping Methods on the frontend?


texts:
I need assistance with creating a custom button that appears in the Customer Account sidebar menu if enabled in their customer account admin area.

This button's URL should also be able to be managed from the Magento Admin Customer Accounts area. For instance, if I want a customer that clicks on this custom button to be taken to google.com I should be able to insert that URL in the Magento Customer management area for that customer.


texts: Subdomain onestep checkout is redirecting to main domain cart page

texts:
Only in mobile, when I click on sub domain onestep checkout page, it gets redirected to main domain cart page.

And its working fine in desktop version, facing issue only in mobile.


texts:
This question is in relationship with only the frontend. I want to get using javascript

Visitor Id : If the customer is not logged in on any page.
Customer Details: If the customer is logged in.
Cart id : In both the cases if the user is logged in or not. Note that i want the cart id on any page not just the checkout page. So basically i should be able to get notified when an item is changed and i should be able to get its cart id.


texts:
I want to override one of the function in Magento core model which is located in

vendor\magento\module-sales\Model\Order\Email\Sender\OrderSender.php

<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Magento\Sales\Model\Order\Email\Sender;

use Magento\Payment\Helper\Data as PaymentHelper;
use Magento\Sales\Model\Order;
use Magento\Sales\Model\Order\Email\Container\OrderIdentity;
use Magento\Sales\Model\Order\Email\Container\Template;
use Magento\Sales\Model\Order\Email\Sender;
use Magento\Sales\Model\ResourceModel\Order as OrderResource;
use Magento\Sales\Model\Order\Address\Renderer;
use Magento\Framework\Event\ManagerInterface;

/**
 * Class OrderSender
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
class OrderSender extends Sender
{
  protected function prepareTemplate(Order $order)
    {
        $transport = [
            'order' => $order,
            'billing' => $order->getBillingAddress(),
            'payment_html' => $this->getPaymentHtml($order),
            'store' => $order->getStore(),
            'formattedShippingAddress' => $this->getFormattedShippingAddress($order),
            'formattedBillingAddress' => $this->getFormattedBillingAddress($order),
        ];

        $transport = new \Magento\Framework\DataObject($transport);

        $this->eventManager->dispatch(
            'email_order_set_template_vars_before',
            ['sender' => $this, 'transport' => $transport]
        );

        $this->templateContainer->setTemplateVars($transport->getData());

        parent::prepareTemplate($order);
    }
}

I just want to add additional data to $transport array variable from my custom extension, but it seems not working because when I call the additional data it didn't print anything, here's what i've done:

etc/di.xml

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Sales\Model\Order\Email\Sender\OrderSender" type="Namespace\Module\Model\Order\Email\Sender\OrderSender"/>
</config>

Namespace\Module\Model\Order\Email\Sender\OrderSender.php

<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Namespace\Module\Model\Order\Email\Sender;

use Magento\Payment\Helper\Data as PaymentHelper;
use Magento\Sales\Model\Order;
use Magento\Sales\Model\Order\Email\Container\OrderIdentity;
use Magento\Sales\Model\Order\Email\Container\Template;
use Magento\Sales\Model\Order\Email\Sender;
use Magento\Sales\Model\ResourceModel\Order as OrderResource;
use Magento\Sales\Model\Order\Address\Renderer;
use Magento\Framework\Event\ManagerInterface;

/**
 * Class OrderSender
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
class OrderSender extends \Magento\Sales\Model\Order\Email\Sender\OrderSender
{

    public function prepareTemplate(Order $order)
    {

        $transport = [
            'order' => $order,
            'billing' => $order->getBillingAddress(),
            'payment_html' => $this->getPaymentHtml($order),
            'test' => '<p> Yoo Yeezy </p>',
            'store' => $order->getStore(),
            'formattedShippingAddress' => $this->getFormattedShippingAddress($order),
            'formattedBillingAddress' => $this->getFormattedBillingAddress($order),
        ];
        $transport = new \Magento\Framework\DataObject($transport);

        $this->eventManager->dispatch(
            'email_order_set_template_vars_before',
            ['sender' => $this, 'transport' => $transport]
        );

        $this->templateContainer->setTemplateVars($transport->getData());

        parent::prepareTemplate($order);
    }

}


texts: Magento PWA: The engine "node" is incompatible with this module. Expected version "^4.5 || 6.* || 7.*"

texts:
I'm trying to get started with Magento's PWA tutorial
I've installed yarn via homebrew
$ which yarn
/usr/local/bin/yarn
$ yarn --version
1.22.10

When I run
$ yarn create @magento/pwa

The create fails with the following error
error ember-cli@2.13.2: The engine "node" is incompatible with this module. Expected version "^4.5 || 6.* || 7.*". Got "14.2.0"
error Found incompatible module.

If I try with Node 12 and Node 10, the similar things happen
error ember-cli@2.13.2: The engine "node" is incompatible with this module. Expected version "^4.5 || 6.* || 7.*". Got "12.16.3"
error Found incompatible module.

error ember-cli@2.13.2: The engine "node" is incompatible with this module. Expected version "^4.5 || 6.* || 7.*". Got "10.13.0"
error Found incompatible module.

I've been able to work around this using npx
$ npx @magento/create-pwa

but I'm curious if anyone know what (if anyting) I'm doing wrong w/r/t yarn.


texts: Best method to use helper in any template

texts:
It seems to be impossible to use a helper in the template Magento_Catalog\templates\product\list\items.phtml.

I have tried it via argument injection:

app\design\frontend\company\base\Magento_Catalog\layout\override\base\catalog_product_view.xml

<!-- Related Products Slider -->
    <block class="Magento\Catalog\Block\Product\ProductList\Related"
           name="catalog.product.related"
           template="Magento_Catalog::product/list/items.phtml"
    >
        <arguments>
            <argument name="type" xsi:type="string">related</argument>
            <argument name="company_helper" xsi:type="object">Company\Base\Helper\Product</argument>
        </arguments>
        <block class="Magento\Catalog\Block\Product\ProductList\Item\Container"
               name="related.product.addto" as="addto"
        >
            <block class="Magento\Catalog\Block\Product\ProductList\Item\AddTo\Compare"
                   name="related.product.addto.compare" as="compare"
                   template="Magento_Catalog::product/list/addto/compare.phtml"
            />
        </block>
    </block>

<!-- Upsell Products Slider -->
    <block class="Magento\Catalog\Block\Product\ProductList\Upsell"
           name="product.info.upsell"
           template="Magento_Catalog::product/list/items.phtml"
    >
        <arguments>
            <argument name="type" xsi:type="string">upsell</argument>
            <argument name="company_helper" xsi:type="object">Company\Base\Helper\Product</argument>
        </arguments>
        <block class="Magento\Catalog\Block\Product\ProductList\Item\Container"
               name="upsell.product.addto" as="addto"
        >
            <block class="Magento\Catalog\Block\Product\ProductList\Item\AddTo\Compare"
                   name="upsell.product.addto.compare" as="compare"
                   template="Magento_Catalog::product/list/addto/compare.phtml"
            />
        </block>
    </block>

and by extending the block classes.

I even extended the block class \Magento\Catalog\Block\Product\AbstractProduct

<?php

namespace Company\Base\Block\Product;

class AbstractProduct extends \Magento\Catalog\Block\Product\AbstractProduct
{
    protected $productHelper;

    /**
     * @param Context $context
     * @param array $data
     */
    public function __construct(
        \Magento\Catalog\Block\Product\Context $context
        , array $data = []
        , \Company\Base\Helper\Product $productHelper
    ) {
        $this->productHelper = $productHelper;
        parent::__construct($context, $data);
    }

    public function getProductHelper()
    {
        return $this->productHelper;
    }

}

But if I try to use the helper in the template:

$productHelper = $block->getProductHelper();  // also tried $this instead of $block
echo $productHelper->test();  // should output "success"

Then I get an error saying that $productHelper is null


texts: Redirecting to a external url when magento order status changed

texts:
I created an observer which redirect to external url(like company's page)with new order status show.
I want to redirect my customer to an page where it will show that there order status changed.

  **<?php Class Atwix_Orderhool_Model_Observer extends
    Mage_Sales_Model_Order{

    public function implementOrderStatus(Varien_Event_Observer
    $observer) {
        /* @var Mage_Sales_Model_Order $order */
        $order = $observer->getOrder();    // $stateProcessing = $order->getS;
        // Only trigger when an order enters processing state.
        if ($order->getOrigData('state')!=$order->getState()) {
            header("Location: 127.0.0.1:3122/magento19/creat_order.php");
        }
         } }**


texts: Magento 2 Customer Grid index is locked by another reindex process. Skipping

texts:
I am importing Customer Main file details, I imported 30,000 records and about to reindexing ended up with reindexing issue.

On the first reindexing I got the following error:

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 291

So i increased memory limit in my php.ini file from 512M to 2024M.

I also fee up the space in my disk but nothing works.

Any  help would be appreciated.


texts: Where can we download diff files for Magento 1.9.2.0?

texts:
Where can we now download diff files for the latest Magento 1.9.2.0? They were always at
http://www.magentocommerce.com/download/diff but there's nothing new there. They don't publish diff files any more?


texts:
I multi-store 1.9.1 with three current stores.  I have Site-A.com, Site-B.com, Site-C.com, running  its on a Godaddy VPS.  I own the url Site-D.com also, which redirects to Site-C.com.  So that's A, B, C running stores, with domain name D pointing back to C

I want to swap out the domain name Site-C.com  with Site-D.com.  Just a pure and simple swap.  I can add a fourth store view in Mage, but am wondering if just changing the URLs in the System>Config would be easier.

How exactly should I handle the files on the server?  Just tell any traffic visiting Site-A.com to mask the domain to show the Site-B.com url, or should I add a new store view and that is all?


texts: Will voiding an order in Authorize.net automatically update status of order to closed/canceled in Magento?

texts:
Curious if voiding an order in Authorize.net (before it's captured) will automatically update status of order to closed/canceled in Magento? I thought that was the default, but I just voided and the order is still "Processing" in Magento.

Will it move from processing after authorize.net batches orders at end of day or is there a setting I'm missing in either authorize.net or Magento?


texts: How to change the default label "Backorders" in Advanced Inventory?

texts:
I need to override the default label "Backorders" in Advanced Inventory.

I've tried to override the label by creating the product_form.xml file but nothing happens.

<container name="container_backorders">
 <field name="backorders">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Custom Label</item>
            <item name="component" xsi:type="string">Vendor_module/js/form/element/options</item>
        </item>
    </argument>
 </field>
</container>

Also I've tried to use Product Form Modifier but I cannot find any Backorders meta.

Any ideas? Thanks.


texts: Best way to provide themes as per magento updates

texts:
I am developing a custom theme (built off 1.9.0.1, i know older version already) and have a few phtml overrides via local.xml but as per comment at Invalid method Mage_Catalog_Block_Product_View::_isSecure(Array ( ) ) what is the best way to provide custom themes that don't conflict with magento versions, see below;

Supply Theme package for each magento version (specify magento version supported)
One theme package with a version check (in the phtml file(s)) as per conflicts when mismatched
or another way to manage theme updating/changes

Is there access to public list of edited/updated/compared files per magento version as obviously it would be a nightmare to check each file for different code


texts: How can I set the current price to a variable?

texts:
I need to use the price variable from price.phtml in a different phtml file. I have tried including price.phtml with output buffering so the echos don't display. But I was never able to print any of the variables successfully. So I do not know what I am doing wrong or if accessing the price.phtml variables is even possible.

Any ideas? Much thanks!


texts: Is there a sort order for success messages?

texts:
I use checkout_cart_product_add_after event to check whether the particular product is available for the zipcode (which is already stored in customer session).

I show a notice message if it's not available using

$checkoutSession->addNotice("Sorry this product cannot be shipped to the specified PINCODE: ".$customerPincode);

I show success message when it is available

$checkoutSession->addSuccess("This product is available for the specified PINCODE: ".$customerPincode);

but my problem is this:

my custom message should come next to default success message. How can I do this?


texts:
this morning I did a system backup (backend -> system -> tools -> backup) of my store because I wanted to try some extensions and now my site is ruined.
I've stored the backup on local, so how can I make the rollback? I have to overwrite all my magento installation  with the backup ?

I can't access to the admin panel, so if any one knows for sure how to make the rollback manually with the system backup I'll appreciate it so much.

Thanks.

EDIT: I solved the problem that had ruined my store. It was appearing error 503 and lot of errors from the processor.php file. I've deleted the maintenance.flag file from root dir, and now works.
Anyway If you want to answer the question in order to help other people that needs to do that, you're free to do.


texts: Magento2: Missing commands on build server

texts:
I try to make a Magento2 Pipeline Deployment and running in a awkward error.

But first a few words to the deployment:
I use a docker container with installed php and nodejs.

I copy in the container my magento application directory
I execute composer install --no-dev --prefer-dist
I execute php bin/magento setup:di:compile
I execute npm install
I execute grunt exec --myTheme

Step 5 is where the error occurs:

[Symfony\Component\Console\Exception\CommandNotFoundException] There are no commands defined in the "dev:source-theme" namespace.

When entering the docker container at this state and running bin/magento list , There are only the following commands:

    Available commands:
  help                                     Displays help for a command
  list                                     Lists commands
 admin
  admin:user:create                        Creates an administrator
 app
  app:config:import                        Import data from shared configuration files to appropriate data storage
 i18n
  i18n:collect-phrases                     Discovers phrases in the codebase
  i18n:pack                                Saves language package
 info
  info:adminuri                            Displays the Magento Admin URI
  info:backups:list                        Prints list of available backup files
  info:currency:list                       Displays the list of available currencies
  info:dependencies:show-framework         Shows number of dependencies on Magento framework
  info:dependencies:show-modules           Shows number of dependencies between modules
  info:dependencies:show-modules-circular  Shows number of circular dependencies between modules
  info:language:list                       Displays the list of available language locales
  info:timezone:list                       Displays the list of available timezones
 maintenance
  maintenance:allow-ips                    Sets maintenance mode exempt IPs
  maintenance:disable                      Disables maintenance mode
  maintenance:enable                       Enables maintenance mode
  maintenance:status                       Displays maintenance mode status
 module
  module:disable                           Disables specified modules
  module:enable                            Enables specified modules
  module:status                            Displays status of modules
  module:uninstall                         Uninstalls modules installed by composer
 setup
  setup:backup                             Takes backup of Magento Application code base, media and database
  setup:config:set                         Creates or modifies the deployment configuration
  setup:cron:run                           Runs cron job scheduled for setup application
  setup:db-data:upgrade                    Installs and upgrades data in the DB
  setup:db-schema:upgrade                  Installs and upgrades the DB schema
  setup:db:status                          Checks if DB schema or data requires upgrade
  setup:di:compile                         Generates DI configuration and all missing classes that can be auto-generated
  setup:install                            Installs the Magento application
  setup:performance:generate-fixtures      Generates fixtures
  setup:rollback                           Rolls back Magento Application codebase, media and database
  setup:static-content:deploy              Deploys static view files
  setup:store-config:set                   Installs the store configuration. Deprecated since 2.2.0. Use config:set instead
  setup:uninstall                          Uninstalls the Magento application
  setup:upgrade                            Upgrades the Magento application, DB data, and schema

The dev:source-theme command is missing...

After reading a lot about the pipeline deployment I found that the problem is maybe that there is no db connection.
But I need to build the assets without db connection because I don't have a db connection in my Gitlab CI.

Is there anyone out there who can help me pls :-(


texts: Extension that Adds group_price and base_group_price to Index Tables

texts:
I'm working with a client to help track down the root cause of a Insert value list does not match column list: error.

It's a system that claims to be Magento 1.6.1.  Somewhere in the system's life it's price index tables

catalog_product_index_price_final_idx
catalog_product_index_price_final_tmp

picked up the columns group_price and base_group_price.  From what I've been able to determine, these are not part of a standard Magento 1.6.1 system, which confuses the price indexers insertFromSelect call, leading to the error.

I realize you can't debug my specific system, but I'm wondering if anyone's run across an extension that adds these fields to the tables.  I'm planning an audit of the system, but if there's known science in the community that'd save me countless hours code glopping, I'd apprecaite.


texts:
I am new to magento and know only basic thing about it.

I want to show a popup on my page.
I just add alert after document.redy event on that .phtml file
but the popup wont appear after loading that page.
also when I view source code of that file it will not show me my alert code.

i am not getting the point why it happening.
can you please help me to solve the issue


texts: Traslating custom string issue in Magento 1

texts:
I am trying to translate the street addresses in my local csv file from my theme. I would like to translate the shipping/billing address from checkout.

For the billing address, this part is working

"Mage_Checkout::Street Address","Straatnaam"
"Mage_Checkout::Street Address 2","Huisnumr"
"Mage_Checkout::Street Address 3","Busnr"
"Mage_Checkout::Street Address 4","Toevoeging"

for the shipping it doesn't work, only like this part:

"Mage_Checkout::Street Address %s","Adres %s"

But i would like to have it the same as billing . I don't have inline translations and my cache is constantly cleared. Any idea why this is not working for me ?

Thank you!


texts:
I came across a js file which can do popup actions in magento.
Add this to local.xml

<reference name="head">
    <action method="addItem">
        <type>js</type>
        <name>prototype/window.js</name>
    </action>
</reference>

And this to the template:

function showPopup(sUrl) {
    oPopup = new Window({
        id:'popup_window',
        className: 'magento',
        url: sUrl,
        width: 820,
        height: 600,
        minimizable: false,
        maximizable: false,
        showEffectOptions: {
            duration: 0.4
        },
        hideEffectOptions:{
            duration: 0.4
        },
        destroyOnClose: true
    });
    oPopup.setZIndex(100);
    oPopup.showCenter(true);
}

function closePopup() {
    Windows.close('popup_window');
}
//here assign click event to a tag with href to the content you want to display in popup
document.observe("dom:loaded", function() {
    $$('button selector')[0].observe('click', function(oEvent) {
         showPopup($(this).readAttribute('href'));
     Event.stop(oEvent);
   });
});

So when I click on Click here to download STL file link as shown in this screen shot,

then a pop up should open up and that pop up should contain this:

How to do that?


texts:
I'm trying to add New Products to the CMS home page. In order to get pagination to work, I must add the toolbar and pager blocks as children of the product list block.

    <reference name="content">
        <block type="mywebsite_catalog/product_new" name="home_products" template="catalog/product/home.phtml">
            <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                <block type="page/html_pager" name="product_list_toolbar_pager"/>
                <action method="disableViewSwitcher"/>
                <action method="disableExpanded"/>
            </block>
        </block>
    </reference>

This is what I'm adding in the 'Design' tab of my CMS page, and it works, but the products are rendered after the CMS content - I need it between some of the CMS content.

As far as I know adding an 'inline' block using {{block type="..." template="..."}} is the only way to achieve that without editing the page's template. The problem for me with this is that it's not possible to nest inline blocks.

I've tried to programmatically add the child blocks, but was unsuccessful because it appears that inline blocks aren't actually part of any layout.

What's the best way of doing this?


texts: MAGENTO 2 REST API: PUT through POSTMAN [Resolved]

texts:
I'm trying a PUT on Magento 2 REST API through POSTMAN like this:

  https://domain/rest/V1/products/IP_X

With only a price change on the json content.

getting the following error message:

{
    "message": "\"%fieldName\" is required. Enter and try again.",
    "parameters": {
        "fieldName": "product"
    }
}

The REST API spec https://devdocs.magento.com/guides/v2.3/rest/list.html indicates the URL to be "PUT    /V1/products/:sku" and the json should include only the parameter to change.

Any idea?

[RESOLED]

I found the answer, the json content should be like this:

{ "product": { "price": "500.55" } }


texts: How can I add a 3rd party dependency in a custom module?

texts:
I'm building a module which requires a 3rd party library, how can I make the 3rd party library available to the module without without adding it to the composer.json magento root file?

I added it into the composer.json file in the module directory, but running composer update from the magento root, is not downloading it.
The module is enabled.

------ UPDATE ---------

Just in case is needed, here the content of the composer.json file inside the module directory.

{
  "name": "myVendor/myModule",
  "description": "Module Description",
  "type": "magento2-module",
  "version": "1.0.0",
  "extra": {
      "map": [
          ["*",
              "MyVendor/MyModule"
          ]
      ]
  },
  "require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "magento/framework": "~100.0",
    "magento/module-catalog": "~100.0",
    "guzzlehttp/guzzle": "~6.0"
  },
  "autoload": {
    "files": [ "registration.php" ],
    "psr-4": {
      "MyVendor\\MyModule\\": ""
    }
  }
}


texts:
I'm trying to edit an order and normally Magento 1.9.0.1 loads all the items in the order and adds them to the new order, in this case it isn't.

I'm trying to figure out how to go about debugging this, I want to find the Magento call to get items and where it's tripping, I have been unsuccessful so far, so any help would be much appreciated.


texts:
How would I format a SQL query to get a list of all categories (id, name, and url_path) from my Magento database?
Alternatively, if you know the tables I need to do this, a list and some sort of explanation as to what I need to do would be a great help.


texts: How to skip shipping address and shipping method steps for specific product in Magento 2?

texts:
I have 2 types of products like electronics & jewelry in our store. I want to skip the shipping method and shipping address step from the checkout page for jewelry type products.
But shipping steps will be displayed for electronics products.
If the cart is blank then it is working but if any product available in the cart then add to cart is not working and the product page is reloading.
plugin code:
<?php

namespace Hero\HideShipping\Plugin\Magento\Quote\Model;

class Quote
{

    public function afterIsVirtual(
        \Magento\Quote\Model\Quote $subject,
        $result
    ) {
        $customType = '';
        $productId = '';
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        foreach ($subject->getAllItems() as $item) {
            $productId = $item->getProduct()->getId();
            if ($option = $item->getOptionByCode('simple_product')) {
                $productId = $option->getProduct()->getId();
            }
            $itemProduct = $objectManager->get('Magento\Catalog\Model\Product')->load($productId);
            $customType = $itemProduct->getAttributeText('type');
        }
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/yyr.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info($customType);
        $logger->info(print_r($subject->getAllItems(),true));
        if($customType == 'Electronic'){
            return false;
        }else{
            return true;
        }
    }

}

How can I do this? Can anyone suggest a way in Magento 2?


texts: How to add Coupon Code Section In mini cart like in the shopping cart

texts:
I have searched a lot on google but didn't get the solution for this.
I new to Magento, can any help me to how to add the coupon code section in Mini cart of magento.
Like the Below Example:

I have added this in items.phtml

<?php $getCouponCode = Mage::getSingleton('checkout/cart')->getQuote()->getCouponCode(); ?>
                    <form id="discount-coupon-form" action="<?php echo $this->getUrl('checkout/onepage/coupon')?>" method="post">

                    <input id="coupon_code" name="coupon_code" value="<?php echo $getCouponCode; ?>"/>
                    <?php  if(strlen($getCouponCode)) { ?>
                    <button type="button" onclick="updateminiCoupon(2); return false;" value="<?php echo $this->__('Remove Coupon')?>"><?php echo $this->__('Remove Coupon') ?></button>
                    <?php } ?>
                    <button type="button" onclick="updateminiCoupon(1); return false;" value="<?php echo $this->__('Apply Coupon')?>"><?php echo $this->__('Apply Coupon') ?></button>
                    </form>

and js :

by reference link:
http://www.endreywalder.com/blog/add-coupon-code-form-to-magento-onepage-checkout-review-step/

Check the Reference site : http://www.nykaa.com/


texts: Apple Pay Integration With Payfort in Magento2.3?

texts:
I am a newbie to Magento.
I have to integrate the apple pay with payfort payment method to my magento website. So anyone has any reference URL or any idea about this?
Please give a reply.


texts:
How To Set Up Different Quantity Of Products Per Magento 2 Store View :
I have same product but different quantity for the this product switch store view
(FR / Suisse ) , For the Price i have found a extension but for the quantity ther's none
Version : 2.3.5 (Magento) , it's globaly in default => Store View


texts: Can't enable breadcrumbs on a Category specific page

texts:
I never used this before, but now I would like to specify the layout update in the Backoffice.

In the template for this category I have <?php echo $this->getChildHtml('breadcrumbs') ?> specified, but on the global level I have breadcrumbs in another matter, but on this particular page I would like to leave them as it is.

I'm trying to add this to the category layout update:

<reference name="root">
    <block type="page/html_breadcrumbs" name="breadcrumbs" before="content" as="breadcrumbs" template="page/html/breadcrumbs.phtml" />
</reference>

But it doesn't affect anything...

I'm missing something here, because if I put <remove name="header" /> it works perfectly.

Thank you,


texts: Magento 2 How to set group by in Collection query?

texts:
I have followed Magento 2 use group by in collection

I need to run below query

SELECT * FROM my_table WHERE status= 'Enable' GROUP BY id ORDER BY id DESC

In collection factory i have below code

$collection = $this->collectionFactory->create()
           ->addFieldToFilter('id', $id)
           ->addFieldToFilter('status', 'Enable')
           ->setGroupBy('posts_id') // I tried to use group() as well
           ->setOrder('id','desc');

How to set Group By on above collection?