texts: magento 2 system configuration hide fields if some values are not set

texts:
basically i want to show configuration fields only if value is set. since other fields require first value in order to call external source.

<field id="database" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="2" translate="label" type="select">
    <label>Database</label>
    <comment>choose database</comment>
    <source_model>Wemessage\ModuleX\Model\Config\Source\Database\Source</source_model>
    <frontend_model>Wemessage\ModuleX\Model\Config\Source\Database\Model</frontend_model>
</field>

if i remove frontend_model i do see my field in configuration, if i add it back the configuration page is empty.

this is my frontend model file:

namespace Wemessage\ModuleX\Model\Config\Source\Database\Model;

use Wemessage\ModuleX\Helper\Data;

class Model extends \Magento\Config\Block\System\Config\Form\Field
{
    /**
     * Render fieldset html
     *
     * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
     * @return string
     */
    public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
    {
        $html = '';
        //$helper = new Data();
        //$token = $helper->getConfigValue('module/api/token');
        if($token){
            $html .= parent::render($element);
        }
        return $html;
    }
}

any idea what can be wrong here ?


texts: How to get all products collection in a store?

texts:
I'm using Magento CE 1.7. I have several stores in admin panel. I want to get both the enabled and disabled products collection in admin panel when create new order. When click the add Products button the grid should all the products(even if they are expired, disabled, out of stock or whatever the status) under the current store. How can I get this collection?

Please any help will be appreciated.

EDIT:
Override the block class Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid

Edited the following function.

protected function _prepareCollection()
    {
   $currentStore = Mage::getSingleton('adminhtml/session_quote')->getStore();
    $collection = Mage::getModel('catalog/product')->getCollection();
$collection

            ->setStore($currentStore)
            ->addAttributeToSelect('name')
            ->addAttributeToSelect('sku')
            ->addAttributeToSelect('price')
            ->addAttributeToSelect('status')
            ->addAttributeToFilter('type_id', array_keys(
                Mage::getConfig()->getNode('adminhtml/sales/order/create/available_product_types')->asArray()
            ))
            ->addStoreFilter();
$this->setCollection($collection);
        Mage_Adminhtml_Block_Widget_Grid::_prepareCollection();
}


texts: Magento 2 How to get Customer address after registration?

texts:
How to get customer address(company,telephone,country,state,city etc.) after registration in observer?

I am using observer.

Code -

$customer = $observer->getData('customer');

first name and email is working -

$customer->getFirstName()
$customer->getEmail()

Below code is not working -

$customer->getDefaultShippingAddress()->getCompany()
$customer->getDefaultShippingAddress()->getTelephone()
$customer->getDefaultShippingAddress()->getCountry()
$customer->getDefaultShippingAddress()->getRegion()
$customer->getDefaultShippingAddress()->getCity()


texts: Create extension - create translate file?

texts:
I am creating an extension with an admin page and I will put it magento connect.
I put all texts in __('text...') ?>, but I don't need to translate them.

So do you think I have to add informations for translations in my config.xml file, even if I don't create a [my_module].csv file ?

<translate>
    <modules>
       <[my_module]>
           <files>
               <default>[my_module].csv</default>
          </files>
      </[my_module]>
     </modules>
< /translate>

Thanks you.


texts: Upgrade to 2.3.1 from 2.2.7 fails on setup:upgrade

texts:
I am trying to upgrade a local copy of our site from 2.2.7 to 2.3.1 and have got through the composer cli pain and am now on the bin/magento setup:upgrade step.  It gets all of the way to Running data recurring... and then spits out the following

The XML in file "/var/www/mag/vendor/faonni/module-indexer-url-rewrite/etc/mview.xml" is invalid:
Element 'subscriptions': Missing child element(s). Expected is ( table ).
Line: 12

Element 'subscriptions': Missing child element(s). Expected is ( table ).
Line: 15

Element 'subscriptions': Missing child element(s). Expected is ( table ).
Line: 18

Verify the XML and try again.

So I attempted to remove the faonni/module-indexer-url-rewrite module via composer and then require it again to see if if was an old version hanging around.  No luck same error. Any ideas?

EDIT:-
To confirm I was following the guide at CLI Upgrade


texts: Magento 2: Clear collection cache on category create

texts: I am looking for a way to clear the collection cache on category create event programmatically.


texts: how to reload the page everytime when user clicks button

texts:
I am building an ecommerce magento site named www.bookslab.in. I had one issue in this website. I want to make compulsory for every user to check their zipcode before they buy anything from the website, because i am delivering the products in the limited area. Now i had added the exception for that. The exception is when user's zipcode is invalid then ADD_TO_CART button is disabled, this is the exception. So, the problem comes here when user checks that the zipcode he enters is wrong, so after that he enters the correct zipcode, but still the ADD_TO_CART button is disabled. To solved this issue, i want to refresh(reload) the page everytime when user clicks on CHECK button of zipcode field. Plz suggest me in the code i provided & go to my website to see the problem.

cod.phtml

<?php
/***************************************
 *** Cash On Delivery ***
 **************************************
 */

$msgData = Mage::helper('netgo_cod')->getConfigData();
if($msgData['zip_status'] == 1){
?>

        Zip Code : <input type="text" placeholder="Enter your pincode" value="" name="cod" class="product-custom-option required-entry" id="cod" size="29" style='color:black; font-size:12px'>
        <button type="button" onclick="checkCOD();" name="zip-check" title="Check" class="button" id="zip-check">Check</button>

<?php } ?>

Screenshot:


texts: Custom Enumerated Product Attribute Doesn't Get Indexed

texts:
I want to create a product attribute where the values are enumerated string codes like "value_1", "value_2", "value_2" so that I can match them cleanly without having to rely on an ID or a user facing label, which are both subject to change.

I created a "select" type attribute via installer and used my own source class with a simple getAllOptions() method. It shows up when editing products. Saving the value takes. The value gets stored in catalog_product_entity_varchar as it should.

Here is an example version of the custom source class:

<?php
class My_Catalog_Model_Source_Billingfrequency extends
    Mage_Eav_Model_Entity_Attribute_Source_Abstract
{

    public function getAllOptions()
    {
        if (!$this->_options) {
            $this->_options = array(
                array(
                    'label' => 'Monthly',
                    'value' => 'monthly',
                ),
                array(
                    'label' => 'Annually',
                    'value' => 'annually',
                ),
            );
        }
        return $this->_options;
    }
}
?>

The problem is that Magento does not push this value to flat tables. I also ensured that used_in_product_listing was on and reindexed.

Does anyone know if it's possible, using Magento product attributes to create an enumerated attribute without having to use the standard Magento ID/label values like you would set in the admin?


texts: How to re init ajax add to cart inside the response in magento2

texts:
I have installed third-party module Infinite scroll for the lazy load(Lof_Ajaxscroll).

The problem I am facing is Once the page loads new HTML content is generated from ajax. So add to cart is not working at that time. It refreshes the page and adding.

I need to add the product without refreshing.

I checked with extension provider, They are asking to re-init the add to cart inside the response.

My question is How can I re-init the add to cart function inside the ajax response?

Tried below solution but that didn't work in my case.

Need to Initialization js after ajax response magento 2

Can anyone suggest me, please...


texts: How to Bring the custom values of product detail view to cart page in Magento?

texts:
I am adding some of custom fields to product detail view.

But the values which are not reflecting in cart page,

My Question is how can i get those selected values? I am new to Magento. Please help me.


texts: Custom Controller goes to 404 in Magento 2?

texts:
I have created a custom controller and die on controller execute page but it goes to 404 ?
COntroller file ( path : app/code/Mageplaza/HelloWorld/Controller/Index/helloworld.php )
<?php
namespace Mageplaza\HelloWorld\Controller\Index;

class Index extends \Magento\Framework\App\Action\Action
{
protected $_pageFactory;

public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\View\Result\PageFactory $pageFactory)
{
    $this->_pageFactory = $pageFactory;
    return parent::__construct($context);
}

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

My helloworld_index_index.xml ( path : app/code/Mageplaza/HelloWorld/view/froentend/layout/helloworld_index_hello.xml )
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column"xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceContainer name="content">
    <block class="Mageplaza\HelloWorld\Block\Index" name="helloworld_index_testcron" template="Mageplaza_HelloWorld::index.phtml" />
</referenceContainer>
</page>

my rotes.xml ( path : app/code/Mageplaza/HelloWorld/etc/froentend/routes.xml )
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="standard">
    <route id="helloworld" frontName="helloworld">
        <module name="Mageplaza_HelloWorld" />
    </route>
</router>
</config>

I have hit http://127.0.0.1/projectname/helloworld/index/index but it goes to 404 Any help is appriciated


texts: I have created Module for Magento 2.x. Right now I would like to extend it for multisite. I haven't find any tutorials/instructions how can I do it?


texts: magento2 show cart items in other page than cart in phtml php code

texts:
I want to get items that added to checkout cart and show that/those in other page.

I have tried many different ways, but in Magento 2 im not been able to do it.

Can you help me out?

Thank you


texts: Fetch values in dropdown in custom admin module in magento

texts:
This is field i am using in Form.php

$fieldset->addField('item', 'select', array(
              'label'     => Mage::helper('frame')->__('Select Item'),
              'name'      => 'item',
              'values'    => Mage::getModel('frame')->toOptionArray(),
          ));

Here i wrote this function ..Block/Adminhtml/Frame.php

 public function toOptionArray()
    {
       $r_connection = Mage::getSingleton('core/resource')->getConnection('core_read');

            /* Write Select query */
            $sql = "SELECT * FROM manage_item";

            /* Run query*/
            $item_data = $r_connection->fetchAll($sql);

        $itemarray = array(
             array(
                'value'=>-1,
                'label'=>'Please Select'
             )
        );
        foreach ($item_data as $itemList){
            $itemarray[] = array(
                   'value'=>$itemList['item_id'],
                   'label'=>$itemList['item_name']
            );
        }
        return $itemarray;
    }

I am getting internal server error here.any solution.


texts: Suddenly Auth.net payments are not getting saved in Magento with a fatal error on the checkout

texts:
Suddenly, all of our Magento stores stopped saving auth.net payments. The payment would go through and show up in auth.net, but never actually saved to Magento.

In the AJAX request which finishes the checkout and charges the card, there is this error:

Call to a member function setMessage() on null in app/code/core/Mage/Paygate/Model/Authorizenet.php on line 1449

Turning on debug mode revealed that Magento isn't parsing the response properly. All fields are empty:

[result] => Array
    (
        [response_code] => 1
        [response_subcode] => 0
        [response_reason_code] => 0
        [response_reason_text] =>
        [approval_code] =>
        [avs_result_code] =>
        [transaction_id] =>
        [invoice_number] =>
        [description] =>
        [amount] =>
        [method] =>
        [transaction_type] =>
        [customer_id] =>
        [md5_hash] =>
        [card_code_response_code] =>
        [c_av_vresponse_code] =>
        [split_tender_id] =>
        [acc_number] =>
        [card_type] =>
        [requested_amount] =>
        [balance_on_card] =>
    )


texts:
I need to display available quantity on product list and details page and other pages where product shows.

I extended product list class as below

<?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\Catalog\Block\Product\ListProduct" type="Tm\Stockinfo\Block\Product\Stockqty" />
</config>

And here i write code in extended block

<?php

 namespace Tm\Stockinfo\Block\Product;

class Stockqty extends \Magento\Catalog\Block\Product\ListProduct {

    protected  $_stockState;

        public function __construct(
            \Magento\Framework\View\Element\Template\Context $context,
            \Magento\CatalogInventory\Api\StockStateInterface $stockState,
            array $data = []

        )
        {
            parent::__construct($context, $data);
            $this->_stockState = $stockState;
        }

    public function getStockQty($product) {

       return $this->stockState->getStockQty($product->getId(), $product->getStore()->getWebsiteId());
    }

}

Then i am getting below error

  Fatal error: Uncaught TypeError: Argument 2 passed to
  Tm\Stockinfo\Block\Product\Stockqty::__construct() must implement
  interface Magento\CatalogInventory\Api\StockStateInterface, array
  given, called in
  E:\xampp\htdocs\amit\mage222\generated\code\Tm\Stockinfo\Block\Product\Stockqty\Interceptor.php
  on line 14 and defined in
  E:\xampp\htdocs\amit\mage222\app\code\Tm\Stockinfo\Block\Product\Stockqty.php:10
  Stack trace: #0
  E:\xampp\htdocs\amit\mage222\generated\code\Tm\Stockinfo\Block\Product\Stockqty\Interceptor.php(14):
  Tm\Stockinfo\Block\Product\Stockqty->__construct(Object(Magento\Catalog\Block\Product\Context),
  Array) #1
  E:\xampp\htdocs\amit\mage222\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111):
  Tm\Stockinfo\Block\Product\Stockqty\Interceptor->__construct(Object(Magento\Catalog\Block\Product\Context),
  Array) #2
  E:\xampp\htdocs\amit\mage222\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php(66):
  Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Tm\Stockinfo\
  in
  E:\xampp\htdocs\amit\mage222\app\code\Tm\Stockinfo\Block\Product\Stockqty.php
  on line 10

=========================== Edit question ===================================

And here layout xml  "\app\code\Tm\Stockinfo\view\frontend\layout\catalog_product_view.xml"

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
       <referenceContainer name="product.info.price">
            <container name="quantity_show" htmlTag="div" htmlClass="show_quantity" after="product.price.final">
               <block class="Tm\Stockinfo\Block\Product\Stockqty" name="stockinfo_showstock" template="Tm_Stockinfo::stockinfo_index_index.phtml"/>
            </container>
        </referenceContainer>
    </body>
</page>

I am trying to inject "\Magento\CatalogInventory\Api\StockStateInterface" class but due to listproduct construct method it gives error. I know i can use same construct Listproduct block but it is not good to go in this way.


texts: How to set shipping cost using live rates based on cart subtotal

texts:
I am having a hard time trying to create a coupon code that will set the shipping rate to $10.95 if the cart subtotal is $150 while using USPS and FedEx live rates.

I can see that there is an option to apply the discount to the shipping cost, but since it is a variable rate, there is no fixed amount or percent that I can specify that will bring the shipping cost to exactly $10.95.

Is there any way to create this shipping rule?

I am using Magento CE 1.9. Thanks for any help!


texts: Create a Shopping Cart Rule - To offer 5% discount for two products or more

texts:
I am trying to create shopping cart rule:

Two or more DIFFERENT products should be added to a cart
Include Products only from categories "6 & 8"
Apply 5% discount

Any help appreciated.

Thanks


texts: Form Key Value in template and controller

texts:
The following function is used to get the form key in templates with type hidden. My customerController.php does not validate the form key with the method _validateFormKey(). When I echo the following function in controller, Its value differ from the value that is posted in form.

 echo Mage::getSingleton('core/session')->getFormKey();

My question is

How can I validate this form key?
Why form key in template is different from the form key in Controller?

In my template file

<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />

but in my controller,

echo $this->getRequest()->getParam('form_key'); // IZwYiobh1jmXLdBG

echo Mage::getSingleton('core/session')->getFormKey(); // DzMQebo8poku9ZKa


texts:
I have used below code in my setup folder to create custom customer attributes,

 use Magento\Eav\Setup\EavSetup;
 use Magento\Eav\Setup\EavSetupFactory;
 use Magento\Framework\Setup\UpgradeDataInterface;
 use Magento\Framework\Setup\ModuleContextInterface;
 use Magento\Framework\Setup\ModuleDataSetupInterface;

 class UpgradeData implements UpgradeDataInterface
 {
   private $eavSetupFactory;
   public function __construct(EavSetupFactory $eavSetupFactory)
   {
     $this->eavSetupFactory = $eavSetupFactory;
   }

public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
    /** @var EavSetup $eavSetup */
    $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

    if (version_compare($context->getVersion(), '2.2.4') < 0){

            $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
            $customerSetup = $objectManager->create('[Vendor]\[Module]\Setup\CustomerSetup');
            $customerSetup->installAttributes($customerSetup);

      }
  }

}

And below code used inside CustomerSetup.php

use Magento\Eav\Model\Config;
use Magento\Eav\Model\Entity\Setup\Context;
use Magento\Eav\Setup\EavSetup;
use Magento\Framework\App\CacheInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\CollectionFactory;

class CustomerSetup extends EavSetup {

protected $eavConfig;

public function __construct(
    ModuleDataSetupInterface $setup,
    Context $context,
    CacheInterface $cache,
    CollectionFactory $attrGroupCollectionFactory,
    Config $eavConfig
    ) {
    $this -> eavConfig = $eavConfig;
    parent :: __construct($setup, $context, $cache, $attrGroupCollectionFactory);
}

public function installAttributes($customerSetup) {
    $this -> installCustomerAttributes($customerSetup);
}

public function installCustomerAttributes($customerSetup) {

    $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY,
        'org_name',
        [
            'label' => 'Organisation Name',
            'system' => 0,
            'position' => 100,
            'sort_order' =>100,
            'visible' =>  true,
            'note' => '',
            'type' => 'varchar',
            'input' => 'text'
        ]
    );
   $customerSetup->getEavConfig()->getAttribute('customer', 'org_name')->setData('is_user_defined',1)->setData('is_required',1)->setData('default_value','')->setData('used_in_forms', ['adminhtml_customer', 'customer_account_create'])-> save();
}
 public function getEavConfig() {
    return $this -> eavConfig;
 }
}

This has worked perfectly, and the attribute is created, Now i need to add another attribute.

How that can be done, I need to edit the same file for new attribute? What changes i need to do suppose i like to add new attribute called customer_example?


texts: Remove index.php from links in admin panel

texts:
When I login to admin panel I get sent to:
http://example.com/index.php/admin/index/index/key/**********

and get 404 error

but when I remove "/index.php" from the url:
http://example.com/admin/index/index/key/**********

it works but every time I click a link in admin panel the index.php comes back

I am pretty much having the opposite problem as this guy:
https://stackoverflow.com/questions/10474740/how-to-remove-index-php-from-urls

whereas his links did not add index.php to the url, but his pages required them, my links are adding index.php to the url when the pages do not accept them


texts: Magento 2: Customer related notifications do not disappear even after refreshing the page

texts:
I am facing a problem, when customer enters incorrect username/password, error message appears below the navigation bar which does not disappear even after refreshing the page. When the customer navigates to another page, that message shows on that page too. Another thing, when the customer enters multiple times incorrect username/password then this error message list increases.

My cache is enabled and mode is default. What to do now?


texts:
We have a lot of module installed and lot of configuration done and just see that we are not able to add more category due to available product listing sort by not editable and the checkbox not clickable. Here is a picture of the error:

As you can see we always have the error message: "Available Product Listing Sort By" is required.

When we use different language than all store views, the available product listing work good, does anybody have same problem before?

We use Magento 1.9.2.4 and 1.9.2.3

We also have the Default Product Listing Sort By not clickable on checkbox and / or editable.

Thanks in advance!


texts: display scroll bar for attributes under "shop by" in magento

texts:
under "shop by" . "category", "gender" ,"age group" "price", "manufacturer", "brand".

there are lot of attribute values under "age group" attribute.

i want to apply a scroll box there , so i want to see only 6 values, if there is more values we have to use

"scroll bar" to see other attributes.

i want exactly like this:

http://www.snapdeal.com/products/mens-footwear-sports-shoes?

let me know if you need any clarifications....

please help me to find solution....

thanks in advance.


texts: Magento migrate products, categories and users

texts:
I got a simple (?) recommendation question about migration part of DB.

There's an old website we have which is in Magento 1.7. The problem with it is that it has long and colorful history behind it and it's time for it to go. The biggest issue was that it had a lot of custom changes and big step from 1.4-1.7 which didn't go that well. But it's now up and running and it's doing fine :) But fine is not enough so we're moving on.

We have a new Magento 1.8 website ready to go. The development is finished and we need to feed it with... Well, after long discussion we decided not to go ahead with orders and start from the scratch BUT migrate all products (around 1k) with categories and images AND users (~12k) with user data but not orders.

QUESTION:
What would be the best recommendation to do that? Do you have any plugin suggestion or should we go with development team to do it manually DB->DB (they quoted quite a lot of money to migrate and I mean a lot!). Also does anyone have any experience with this: http://www.shopping-cart-migration.com/ and can tell me how it works and is it safe/worth it?

Thanks in advance guys!


texts: M2 | ci6.googleusercontent.com gmail proxy server stopping images to load in email templates

texts:
I am having gmail proxy server issue for showing images in email templates.

At the start of image URL which is
http://localhost/pub/media/email/images/logo.png
this is getting appended
https://ci6.googleusercontent.com/proxy/tuG-pi...

Like: https://ci6.googleusercontent.com/proxy/tuG-pitMvoq3PwS0FSL5T-pV7Wh_9PffwfBhgEW_NuEAfWNG5rld6qaGEGRa0-pg50C9akGBwpPr3gx7U3IpT-jh_rnZUtn2MjK-7MuTJqXvFM0UHJWVe-Vz-86HvTVgkDcERAjIYt1ZWxOv7BYUawrPc42zYxEJkVNF=s0-d-e1-ft#http://localhost/pub/static/version1614839350/frontend/CustomTheme/default/en_US/images/email/logo.png
I found this remedy https://stackoverflow.com/a/51643787/10193644 but not sure how can I send HTTP header code 200 for sales emails (for example "new_order" email templete)
I have overridded the default order email temple from theme as:

app/design/frontend/[Vendor_Name]/[Theme_Name]/Magento_Sales/email/order_new.html

Looking for your valuable ideas as solution, Thanks


texts: Create New Module get 404 error(How to debug code)

texts:
Hello,
I have create new custom module and run frontend  get 404 Page error.
How to debug module what problem in code ?
Please Help me.
THANKS.


texts: Product page is not refreshing or updating. What am I missing?

texts:
I've tried everything I can find on the web about Magento 1.9 and refreshing a product page. I've updated the price and the old price is still displayed.

Things I've tried: - Hard refresh in browser - Different browser - Private browsing

I've refreshed the cache for all caches in the page "Cache Storage Management"
The Magento Cache has been flushed
The Cache Storage has been flushed
All indexes have been reindexed
Disable and re-enable combining CSS and JavaScript files.
I'm on the correct product page. Both the URL and the product ID match the page and the product in magento.

I've deleted all files in the "/var/cache" folder.

I've updated the product description by adding a period and other small stuff.

Yet the page stays the same. Every time I refresh it displays the old data.

What else can I try?


texts: Why does getChildHtml() display my block but getChildHtml() doesn't?

texts:
I can't figure why my block is not displayed as expected. Here what i've done to debug this. First of all my layout:

<layout>
<vendor_contest_contest_index translate="label" module="vendor_contest">
    Contests list
    <update handle="page_one_column" />
    <reference name="content">
        <block type="vendor_contest/contest_list" name="contest_list" template="vendor_contest/contest/list.phtml" />
    </reference>
</vendor_contest_contest_index>
<vendor_contest_contest_view translate="label" module="vendor_contest">
    Contest view page
    <update handle="page_one_column" />
    <reference name="content">
        <block type="vendor_contest/contest_view" name="contest_view" template="vendor_contest/contest/view.phtml" >
            <block type="vendor_contest/contest_content" name="contest_content" template="vendor_contest/contest/content.phtml" />
            <block type="vendor_contest/contest_answer_list" name="contest.answer_list" as="contest_answers" template="vendor_contest/contest/answer/list.phtml" />
            <block type="vendor_contest/contest_answer_answered" name="contest.answer_answered" as="contest_answered" template="vendor_contest/contest/answer/answered.phtml" />
        </block>
    </reference>
</vendor_contest_contest_view>
</layout>

Here is the contest_view block :

public function getAnswersListView()
{
    return $this->getChildHtml('contest.answer_list');
}

public function getAlreadyAnsweredView()
{
    return $this->getChildHtml('contest.answer_answered');
}

public function hasCustomerAnswered()
{
    $answered = false;
    $contest = $this->getCurrentContest();
    $customer = Mage::getSingleton('customer/session')->getCustomer();
    $collection = Mage::getModel('vendor_contest/participation')->getCollection();
    $collection
            ->addFieldToFilter('customer_id', $customer->getId())
            ->addFieldToFilter('contest_id', $contest->getId())
            ->load();
    if (count($collection)) {
        $answered = true;
    }
    return $answered;
}

And my view.phtml

echo $this->getChildHtml('contest_content');
if ($this->hasCustomerAnswered()) {
     echo $this->getAlreadyAnsweredView();
} else {
    echo $this->getAnswersListView();
}

Here only the block contest_content is diplsayed. If i change the first line to

echo $this->getChildHtml();

All my blocks are displayed. That means there is no error in my block code, i guess. Both my system.log and error.log are empty.

If needed i can provide more files. Just tell me which one you'd like to see.

On my side i tried to debug this way :
i went to

app/code/core/Mage/Core/Block/Abstract.php

and i dumped $childName in it.

string(15) "contest_content" string(19) "contest.answer_list" string(23) "contest.answer_answered"

And my three blocks are effectively displayed below.

I didnt manage to understand deeper why my block aren't displayed with the above snippets of code.

Thanks you all who'll take time to read this.

EDIT : here's my Content.php

<?php

class Vendor_Contest_Block_Contest_Content extends Vendor_Contest_Block_Contest_View
{

}

Notice the extends. Since basically block Content doesnt need anything more than View it felt right to me to extends Contest_View.


texts: How to automatically run custom module CRON only?

texts:
I've to insert/update/delete some data in my custom tables in each 6HR. so  i'm using a custom module with CRON and in that module i've written script to insert/update/delete the things.

So for automatically hitting the CRON as i R&D

(reference link:- https://www.cloudways.com/blog/magento-2-cron-job/) and found

that i need to follow following steps :-

1- Login on the server as Super User

2- from the CLI,i need to hit "crontab -e"

3- then,i need to set following in this file

*/1 * * * * php -c <ini-file-path> <your Magento install dir>/bin/magento cron:run

*/1 * * * * php -c <ini-file-path> <your Magento install dir>/update/cron.php

*/1 * * * * php -c <ini-file-path> <your Magento install dir>/bin/magento setup:cron:run

Where "ini-file-path" => https://nimb.ws/fx1p70

"your Magento install dir"=> you can get via DIR

Which is exactly working for me,but by doing this indexing,orders etc crons are also automatically running but i want to run automatically my custom module "custom_cronjob" CRON only

Here is the screenshot:-  https://nimb.ws/zoVApY

How can i achieve the same and avoid other CRONs?

Please help me!!!


texts: How to disable quantity and in-stock options for Virtual Products?

texts:
I'm new at Magento. I want to list real estate like home or office space in the site. Im doing this as a virtual product. Quantity and in stock options are no relevant to these products. Hence would like to disable those options in the site.
I could not find solution anywhere to fix the same.

Do we have any solution to fix this issue?
Kindly help.


texts: How to create Mouseover Shopping Cart Icon in right header?

texts:
GOAL: Add a SHOPPING CART ICON to Magento 1.8.1 - Ideal Cart will look like this: http://www.cctvhotdeals.com/ And contain the features such as # of items, mouseover to show items, etc.

To Clarify the goal:Currently my Sidebar.phtml code is:

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

<?php $_cartQty = $this->getSummaryCount() ?>

<?php echo $this->__('My Cart') ?>

<?php if ($_cartQty>0): ?>

       <?php if ($_cartQty==1): ?>

<?php echo $this->__('There is 1 item >in your cart.', $this->getUrl('checkout/cart')) ?>

       <?php else: ?>

<?php echo $this->__('There are %s >items in your cart.', $this->getUrl('checkout/cart'), $_cartQty) ?>

       <?php endif ?>

I want the subtotal, order details, and checkout buttons to show in another block when MOUSEOVER the shopping cart: Current code showing in the cart block:

           <?php if ($this->canApplyMsrp()): ?>
               <?php echo $this->__('ORDER >TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER'); ?>
           <?php else: ?>
               <?php echo $this->__('Cart Subtotal:') ?> ><?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
               <?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>

(<?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?>)
               <?php endif; ?>
           <?php endif; ?>

    <?php endif ?>
    <?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>

   <?php echo $this->getChildHtml('extra_actions') ?>
   <button type="button" title="<?php echo $this->__('Checkout') ?>" class="button" >onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')"><?php echo >$this->__('Checkout') ?></button>

   <?php endif ?>
  <?php $_items = $this->getRecentItems() ?>
   <?php if(count($_items)): ?>

      <?php else: ?>

<?php echo $this->__('You have no items in your shopping >cart.') ?>

I've found another post regarding this but cannot understand Jquery or what they are talking about:
https://stackoverflow.com/questions/6344838/jquery-hover-and-stay-until-mouse-out

Please help!


texts:
<?= $block->escapeHtml(__(
    'You added product %1 to the comparison list.',
    $block->getData('product_name'),
    $block->getData('compare_list_url')),
    ['a']
);

I have Swedish store view as well and this text is not translated in to Swedish How can I  translate it into swedish


texts: Magento 2 - Attributes options value is not showing

texts:
we're facing a new problem. The values of the product attributes no longer showing in backend, they dissapeared. The values are in database.

The old products still have these options for filtering but are not showing in backend.

I've tried all the situations, reindex, clear cache, disable production mode, deploy content, nothing helps.

LATER EDIT:
- i found that if i disable module Magento_Swatches the attributes not showing anymore.

Thanks,
Stefan


texts: Magento 2: implement your own captcha type

texts:
Out of curiosity, I was going through the captcha module of M2 and I noticed this interesting code in Magento/Captcha/Helper/Data.php

public function getCaptcha($formId)
{
    if (!array_key_exists($formId, $this->_captcha)) {
        $captchaType = ucfirst($this->getConfig('type'));
         if (!$captchaType) {
             $captchaType = self::DEFAULT_CAPTCHA_TYPE;
          } elseif ($captchaType == 'Default') {
               $captchaType = $captchaType . 'Model';
          }
          $this->_captcha[$formId] = $this->_factory->create($captchaType, $formId);
    }
    return $this->_captcha[$formId];
}

So that code seems pretty clear to me. Magento 2 is shipped with a default captcha with the associated model being Magento/Captcha/Model/DefaultModel

That model implements the Magento/Captcha/Model/CaptchaInterface with the following methods:

public function generate();
public function isCorrect($word);
public function getBlockName();

I can see that the dev team made the code flexible enough to implement your own captcha type which is great.

So I assume that if one wants to implement its own type of captcha he will have to create a captcha model that implements that interface.

My question is: apart from the model creation, what do we need to do to implement a custom captcha type (specially in terms of configuration, pretty sure there's some XML going on here I was expecting a captcha.xml to sit somewhere but there's none)


texts: Magento 2 : How to Change Category Page on Button Click

texts: I have a many categories in my magento 2 website. I want to make a custom button and when I am click on this button it will redirect me on next category. Can any one help me how to achieve this functionality. Thanks in advance.


texts:
I'm using Magento 1.9.2.4 on a CentOS VPS.

I'm trying to copy my Magento store from a web hosting server to my backup server(The VPS)

I ensured mod_rewrite was on for apache, the front-end now works properly. But now i'm unable to access the admin. Or i can but under really weird circumstances.

For instance, i'll access the admin panel typing in

/IP ADDRESS/Website/admin

and the panel loads up. I try in credentials but then the web url goes to

/websiteindex.php/admin/dashboard/index/key`

To fix this, i manually add a / between website and index.php. Appearing like /website/index.php. It works for that single page, but if you click on something else, the intialy error will appear.

I looked into the apache Error_log and it just mentions

script '/var/www/html/websiteindex.php' not found or unable to stat

Things I've tried:

Ensured Mod_rewrite is working. Works on the front end.
Applied MYSQL Query search mentioned here Error 404 - Can't access backend after moving to new server
.htaccess has AllowOverride all at <directory "/var/www/html>
Access admin panel by typing /IP ADDRESS/website/index.php/admin. Initial error occurs

Any ideas?


texts: How to get dropdown (and multiple) select value for a product collection?

texts:
In Magento 1.5 on the product page, I created a product collection (for related products) like this (I've omitted filters):

// $_products = Mage::getResourceModel('catalog/product_collection') // this variation makes no difference.
$_products = Mage::getModel('catalog/product')->getCollection()
                        ->addAttributeToSelect('name')
                        ->addAttributeToSelect('url_path')
                        ->addAttributeToSelect('price')
                        ->addAttributeToSelect('some_text_attribute')
                        ->addAttributeToSelect('some_dropdown_attr'); // does not work for dropdown/multiselect apparently

Now if I echo $_products->getSelect() I see that adding the dropdown attribute did nothing to modify the select. So the data for 'some_dropdown_attr' is not available that way. Isn't there a way to add it to the select. And if not, there certainly must be a way to get the value(s) of any dropdown (or multiselect) attribute for a certain product.

$_text_attr[] = array();
$_dropdown_attr[] = array();
foreach($_products as $_product) {
  $_text_attr[] = $_product->getData('some_text_attribute');
  // 1.) get resource - doesn't work
  // $_dropdown_attr[] = $_product->getResource()->getAttribute('some_dropdown_attr')->getFrontend()->getValue($_product); // results in array of "No"
  // 2.) get attribute text - doesn't work
  // $_dropdown_attr[] = $_product->getAttributeText('some_dropdown_attr'); // results in array of NULLS.
  // Get attributes - doesn't work - array of "No". Also, even if it did work it seems idiotic to have to get all product attributes just to get the value of one
  // $_attrs = $_product->getAttributes();
  // $_dropdown_attr[] = $_attrs['some_dropdown_attr']->getFrontend()->getValue($_product);
}


texts:
I a m using this function for getting child categories of current category

    public function getCurrentChildCategories()
    {
        $layer = Mage::getSingleton('catalog/layer');
        $category   = $layer->getCurrentCategory();

        $categories = $category->getChildrenCategories();
        $productCollection = Mage::getResourceModel('catalog/product_collection');
        $layer->prepareProductCollection($productCollection);
        $productCollection->addCountToCategories($categories);
        return $categories;
    }

But i want to sort the collection using category name in ascending order i.e. alphabetically sort i have modified the function like this

    public function getCurrentChildCategories($sort_by = 'name', $sort_order = 'asc')
    {
        $layer = Mage::getSingleton('catalog/layer');
        $category   = $layer->getCurrentCategory();

        $collection = Mage::getModel('catalog/category')->getCollection();

        $collection->addAttributeToSelect('*')
            ->addAttributeToSort('name','asc')
            ->addIdFilter($category->getChildren())
            ->joinUrlRewrite();
            ->load();

        $productCollection = Mage::getResourceModel('catalog/product_collection');
        $layer->prepareProductCollection($productCollection);
        $productCollection->addCountToCategories($collection);
        return $collection;
    }

This should work but this is not working at all..
Any one having any idea about it.


texts: Why does placing an order returns a MySQL Duplicate Entry?

texts:
I have tested a payment gateway on a fresh magento 2.1.3 install with sample data and it works well.

Unfortunately when implemented on your site it does not.

The payment gateway flow is:

Select payment method
Place Order - $this->orderRepository->save($order); is called in OrderService.php
Redirected to the payment gateway website to enter details
Goes to success page and updates the order with $this->orderRepository->save($order); again...however this time it breaks with an error

The error is:

    SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
 '1000000279-1' for key 'SALES_ORDER_INCREMENT_ID_STORE_ID', query was:
INSERT INTO `sales_order` (`state`, `status`, `protect_code`,
`shipping_description`, `is_virtual`, `store_id`, `customer_id`,
`base_discount_amount`, `base_grand_total`, `base_shipping_amount`,
`base_shipping_tax_amount`, `base_subtotal`, `base_tax_amount`,
`base_to_global_rate`, `base_to_order_rate`, `discount_amount`,
`grand_total`, `shipping_amount`, `shipping_tax_amount`,
`store_to_base_rate`, `store_to_order_rate`, `subtotal`, `tax_amount`,
`total_qty_ordered`, `customer_is_guest`, `customer_note_notify`,
`customer_group_id`, `quote_id`, `base_shipping_discount_amount`,
`base_subtotal_incl_tax`, `base_total_due`, `shipping_discount_amount`,
`subtotal_incl_tax`, `total_due`, `weight`, `increment_id`,
`applied_rule_ids`, `base_currency_code`, `customer_email`,
`customer_firstname`, `customer_lastname`, `customer_middlename`,
`discount_description`, `global_currency_code`, `order_currency_code`,
`remote_ip`, `shipping_method`, `store_currency_code`, `store_name`,
`total_item_count`, `discount_tax_compensation_amount`,
`base_discount_tax_compensation_amount`,
`shipping_discount_tax_compensation_amount`, `shipping_incl_tax`,
`base_shipping_incl_tax`, `gift_message_id`, `mageworx_fee_amount`,
`base_mageworx_fee_amount`, `mageworx_fee_tax_amount`,
`base_mageworx_fee_tax_amount`, `mageworx_fee_details`) VALUES (?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?)

This exception is thrown on line 191 of /vendor/magento/module-sales/Model/Service/OrderService.php

I think this has to do with the increment_id and the eav_entity_store table

My environment:

PHP 7.0
Magento 2.1.3
Using migrated data using the magento data-migration-tool from magento 1 site

Update

After a bit of investigation I found that the intial order creation on place order sets an order_id with the reserveOrderId() function. Once payment is successful another order is created with a different reserveOrderId as $this->getReservedOrderId() in Quote.php is falsey.

However on the migrated database $this->getReservedOrderId() is set or is truthy. That is why it tries to create a new order with the old order_id and mysql has issues.


texts: Show adminhtml form field when other checkbox is checked

texts:
I am new to magento and using magento 1.9 version.

I want show/Hide adminpanel form field based on the other checkbox is checked.

How to do this using javascript.


texts: Magento 1.9.3 SSL added just work with /index.php pages in frontend

texts:
I recently installed an SSL certificate on my test server and I got a problem with my front end. All the web pages return 404 if I don't put /index.php/.

I put Use Web Server Rewrites as No and Use Secure URLs in Frontend as Yes but nothing works.

Please help..


texts: Custom Adminhtml Grid - Set Global Width

texts:
I've created my own adminhtml grid for a module and was wondering if somebody could point out how I can adjust the width of the whole grid itself? (I.E to only utilize 80% of the page width).

Please note that I am not asking how to change the column width, but the % of the page that the grid's width will occupy.

Thanks in advance.

P.S I've got a feeling it will be in the Grid.php file?

  class Namespace_Module_Block_Adminhtml_Custom_Grid extends
  Mage_Adminhtml_Block_Widget_Grid

public function __construct(){
parent::__construct();
#Somewhere here?
}


texts: Can't get rid of class from deleted module

texts:
I created a module, which I later deleted.
The homepage of my site loads, and my categories page loads, but my products pages don't load.
I get an error saying
1 exception(s):
Exception #0 (ReflectionException): Class Company\Modulename\Model\Product\Attribute\FileUpload does not exist

That module doesn't exist. I've searched the entire project, and nothing that looks like that class exists.
I've delete var/viewpreprocessed, var/cache, var/page_cache, pub/static/frontend, pub/static/adminhtml, generated.
I've run setup/upgrade, setup:di:compile, setup:static-content:deploy -f, and c:c/c:f multiple times, and removed the record of the module from the db entirely, but it's changed nothing
Any other ideas?
Thanks


texts: How to set many extensions in the same tab in Magento 2 admin panel?

texts:
I'd like to create many extensions using the same tab like this sample on the image below, what I need to do in each extension to keep at the same tab?

Stores > Settings > Configuration


texts: How to implement multiple category filter in Magento 2 layered navigation

texts:
I am implementing multiple category filters for layered navigation. I am getting the result as per my requirement but the collection size is coming wrong remains same as the parent categories collection size.

Is there any other way to implement this functionality.

I have modified the following code :

public function apply(\Magento\Framework\App\RequestInterface $request)
    {
        $categoryId = $request->getParam($this->_requestVar) ?: $request->getParam('id');
        if (empty($categoryId)) {
            return $this;
        }

        $this->dataProvider->setCategoryId($categoryId);

        $category = $this->dataProvider->getCategory();

        **$this->getLayer()->getProductCollection()->addCategoryFilter($category);**

        if ($request->getParam('id') != $category->getId() && $this->dataProvider->isValid()) {
            $this->getLayer()->getState()->addFilter($this->_createItem($category->getName(), $categoryId));
        }
        return $this;
    }

replaced the addCategoryFilter($category) with addCategoriesFilter('eq' => $categoriesArray);

But as the layered navigation count is coming from somewhere else and not from product collection.

would like to know from where. And how could I apply multiple category filters there?


texts:
I need to remove/undo a wrong credit memo.
Can anyone confirm that the following code is correct/save to achieve this?

UPDATE `sales_flat_order` SET
`base_discount_refunded`=null,
`base_shipping_refunded`=null,
`base_shipping_tax_refunded`=null,
`base_subtotal_refunded`=null,
`base_tax_refunded`=null,
`base_total_offline_refunded`=null,
`base_total_online_refunded`=null,
`base_total_refunded`=null,
`discount_refunded`=null,
`shipping_refunded`=null,
`shipping_tax_refunded`=null,
`subtotal_refunded`=null,
`tax_refunded`=null,
`total_offline_refunded`=null,
`total_online_refunded`=null,
`total_refunded`=null,
`hidden_tax_refunded`=null,
`base_hidden_tax_refunded`=null
WHERE entity_id=71508

UPDATE `sales_flat_creditmemo` SET
`adjustment_positive`=0,
`base_shipping_tax_amount`=0,
`base_discount_amount`=0,
`grand_total`=0,
`base_adjustment_negative`=0,
`base_subtotal_incl_tax`=0,
`shipping_amount`=0,
`subtotal_incl_tax`=0,
`adjustment_negative`=0,
`base_shipping_amount`=0,
`base_adjustment`=0,
`base_subtotal`=0,
`discount_amount`=0,
`subtotal`=0,
`adjustment`=0,
`base_grand_total`=0,
`base_adjustment_positive`=0,
`base_tax_amount`=0,
`shipping_tax_amount`=0,
`tax_amount`=0,
`hidden_tax_amount`=0,
`base_hidden_tax_amount`=0,
`shipping_hidden_tax_amount`=0,
`base_shipping_hidden_tax_amnt`=0,
`shipping_incl_tax`=0,
`base_shipping_incl_tax`=0,
`state`=3
WHERE order_id=71508

UPDATE `sales_flat_creditmemo_grid` SET
`grand_total`=0,
`base_grand_total`=0,
`state`=3
WHERE order_id=71508


texts: How to customize or reduce the size of register trademark symbol

texts:
In my magento frontend i am displaying categories in the header navigation, one of the category title is containing register trademark symbol.

Now my question is how to reduce/customize the register trademark symbol in the category title?

From the admin panel i have tried giving html tags like <sup> to the register trade mark symbol which is working fine in header navigation but am displaying the same navigation(categories/subcategories)  in the left column the <sup> tag is also displaying along with the symbol.

Or is there any other approach to customize or style my trade mark without using html tags in the category name?

Many thanks in advance :)


texts: Magento 2 Minicart and Gallery Image slow

texts:
Not sure if it is only my problem. If i go to any product page until the gallery image loaded for the product mini cart never loaded. is there any idea how can i speed up this? as my site is very fast except this two things.

https://www.banglashoppers.com/ofra-perfecting-puff-beauty-blender.html

Any help will be greatly appreciated!


texts: Anyway of being Notified of a Magento 2 Update without logging in the Admin Panel

texts:
Say I have 2 sites that I don't really logon to the admin panel all that often, is there anyway to notify me of any updates to magento? e.g. RSS feed, Email ?

I heard of a potential rss feed from a host computer but i have no idea how I would set something like this up.

I'm surprised it isnt a feature that is more common knowledge as I imagine a large amount of people have several sites to manage at once.

Failing that, is there anyway to auto update ?


texts: Orders Api Error : "Request does not match any route"

texts:
In my Magento 1.9, I need to access orders by calling API:

http://somesiteUrl/api/rest/orders

but the response is 404 with error:

{"messages":{"error":[{"code":404,"message":"Request does not match any route."}]}}

any help will be appreciated.


texts: Update special prices: Problems with cache invalidation

texts:
i have strange problem/issue/bug/feature ... whatever...
Case:
Every day on defined times a module will import a few special prices for some products.
So in this case the cache and the index has to be rebuild/flushed for each products which has to be updated.
How is it implemented yet:
To improve the performance of the import and reduce the load on the database we use the \Magento\Catalog\Model\Product\Action class to update the prices for the products:
/** @var \Magento\Catalog\Model\Product\Action $productAction */
$productAction->updateAttributes([$id], [
  'special_price' => 123.45,
  'special_from_date' => '[...]'
], 0);

Lets get a little bit deeper into Magento and the indexer:
There are a few triggers in the database, which listen on the EAV-Tables.
So if there is an change on any table (in this case on catalog_product_entity_decimal) there will be an insert into table catalog_product_price_cl which triggers a reindex of the specific product.
Thats pretty cool :)
BUT:
It seems to be that the parent product of a configurable product will not be reindexed.
The customer (shop owner) also reported, that this issue also happens on a normal simple product (without a parent).
So I added an additional trigger to reindex the product and it's parents:
/** @var \Magento\ConfigurableProduct\Model\Product\Type\Configurable $configurableTypeInstance */
/** @var \Magento\GroupedProduct\Model\Product\Type\Grouped $groupedTypeInstance */
/** @var \Magento\Catalog\Model\Indexer\Product\Full $indexer */
$indexer->executeList(array_unique(array_merge(
   [$product->getId()],
   $configurableTypeInstance->getParentIdsByChild($product->getId()),
   $groupedTypeInstance->getParentIdsByChild($product->getId()),
   $product->getTypeInstance()->getParentIdsByChild($product->getId())
)));

But this will also not solve the problem, that the prices will not correctly displayed in the frontend. After checking the values in the database I noticed that the prices in the indexes are correct. (I am not sure if the extra-index which I added, is still necessary)
So I checked the installed Varnish-Cache (full_page cache). The Varnish-Cache is also valid. (adding a cache-buster to the URL will get a fresh page .... with the outdated special price :( )
I also checked the Block-HTML & Collection Cache. Also valid. (Cleared it, the price is still outdated.)
Now I have no idea anymore. And this is the reason why i coming up to you.
What am I doing wrong?
I look forward for your answers!


texts:
It looks as though tier-pricing, if set for a product, does not get applied when ordering in the backend, only on the frontend?  It means that at present, the sales team has to manually input the price on the backend when taking an order to apply the correct discount based on tier pricing. This is for configurable products that show on the front end, but they choose a simple product (option) (e.g. flavour) when buying it.

The tier price is currently set for the configurable product only.

Anybody come across this issue and the best way around it?


texts: Changed Base_Url and Now I am getting 404

texts:
I just migrated a Magento2 site from a cloud server to my localhost to do some developer work on.  I have everything I need installed and ready to go.  I am just trying to redirect the Base-URls.  I have already went into the command line and redirected both base and secure urls like this.
php bin/magento setup:store-config:set --base-url="http://localhost/upperlimitsinc/"
After changing the url I checked PHPMyAdmin and it shows that it has changed but when I go to the site url I get a 404 and not from Magento. Everything is running on MAMP.
404 ERROR: The requested URL /upperlimitsinc/ was not found on this server.


texts: I'm going crazy with the folder permissions! in magento 2

texts:
hello guys in my case when I want to run any command like 'bin/magento setup:upgrade && bin/magento cache:clean && bin/magento cache:flush
' or bin/magento setup:di:upgrade , it always shows met his error :

Warning: fopen(/var/www/html/myproject/web/var/cache//mage-tags/mage---a0a_CONFIG): failed to open stream: Permission denied in /var/www/html/myproject/web/vendor/colinmollenhour/cache-backend-file/File.php on line 646

  can anyone tell me how to solve this problem please ?


texts: What does type mean under carriers/shipping_code (default/carrier/shipping_code/type)?

texts:
Does it have any additional meaning in addition to being an identifier? Any grouping?
I checked UPS and it seems to be using it to determine whether and cgi(direct) or and xml request is coming through.


texts: How to get the data from the Session in a CustomerData Object without breaking the guidelines?

texts:
9.10. The Request, Session, and Cookie objects MUST NOT be injected in an object constructor. They MUST be passed only as method arguments.

from the Technical guidelines

How to comply with this rule when dealing with CustomerData objects?

Since this is usually related to data specific to a customer, how can we get its values without using the session object in the constructor?

Magento core is breaking these rules for the cart section and the messages section as can be seen in:

\Magento\Tax\Plugin\Checkout\CustomerData\Cart

And relying on a manager that is breaking this rule for the messages section:

\Magento\Framework\Message\Manager


texts:
Magento's default customer import doesn't import customer address.All other info except address is getting imported.

CSV header,

website email,group_id,prefix,firstname,middlename,lastname,suffix,password_hash,taxvat,billing_prefix,billing_firstname,billing_middlename,billing_lastname,   billing_suffix,billing_street1,billing_city,billing_region,billing_country_id,billing_postcode, billing_telephone,shipping_prefix,shipping_firstname,shipping_middlename,shipping_lastname,shipping_suffix,shipping_street1,shipping_city,shipping_region,shipping_country  shipping_postcode,shipping_telephone,shipping_company,shipping_fax,created_in,is_subscribed,group

Values,

base,someemail@msn.com,4,first,last,f7dcc0067542778c9444fsd68d5b369:kJ,none,mr,first,last,"22 some address",somecity,Australian Capital Territory,AUS,1111,123455,first,last,"22 some address",somecity,Australian Capital Territory,1111,123455,Default Store View,point sale

Are there any other ways available to import customers


texts:
Suppose you have a store with 10.000 products. You page per 30 products, have filters and search.

Suppose someone has bad intent and they request this page several times all with the ?limit=all param. This is very resource intensive + almost certain someone with ill intent

Question: Should I block ?limit=all? And if so how?


texts:
I have a client with an online store in magento 1.9.3. She said that before the store was operative, the agency told here to go on the store page, and she can modify every text on the live page, by just clicking on it end edit it.
How is this possible?


texts: Website disappeared after installing cart2cart files

texts:
I cannot see the front or back end of my website all a get is an error screen with this...

Warning: simplexml_load_string(): Entity: line 2: parser error : Start tag expected, '<' not found  in /var/www/vhosts/aspectspools.co.uk/httpdocs/lib/Varien/Simplexml/Config.php on line 510

Trace:

#0 [internal function]: mageCoreErrorHandler(2, 'simplexml_load_...', '/var/www/vhosts...', 510, Array)
#1 /var/www/vhosts/aspectspools.co.uk/httpdocs/lib/Varien/Simplexml/Config.php(510): simplexml_load_string('

I was experimenting with cart2cart and uploaded a some files to make a connection bridge and now when I went to the website with any url front or /admin I get the above message.

What has happened?

Using version 1.3. I deleted the installed files but it did not help.


texts: checking both updated_at and created_at filter with OR condition for product collection

texts:
Hello Please help me to updated this query to apply updated_at filter too with OR condition.

Here If I want to add 'updated_at' too in the filter with the same condition like 'created_at' then what should I do in below query:

 $products = Mage::getResourceModel('catalog/product_collection')
                                    ->addAttributeToSelect('*')
                                    ->addFieldToFilter('created_at', array(
                                    'from'     => strtotime('-2 days', time()),
                                    'to'       => time(),
                                    'datetime' => true
                                ))->load();

Please help


texts: Magento recurring profiles - billing frequency

texts:
I'm a little bit confused with descriptions in Magento Wiki: http://www.magentocommerce.com/knowledge-base/entry/working-with-recurring-profiles

Billing Frequency – (required) Specify how often within the billing period unit the payment system will initiate a payment transaction for the recurring profile.

So, if I have billing period = 1 week and billing frequency = 5, then the payment will be charged 5 times in a week? Or it will be charged 5 weeks 1 time a week? If the last way, then what is the reason for billing cycles usage?

Finally, try to explain me, how often such example will work:

Billing Period Unit = 1 week
Billing Frequency = 5
Maximum Billing Cycles = 4


texts:
I want to use reactjs in my magento 2 module for designing or developing PWA.
edit:- how to integrate jqery with magento 2


texts: Customer Attribute is missing in admin after data migrtion version(1.9.0.1 to 2.1.7)

texts:
I Have successfully migrated the Magento 1 to Magento 2 using the data migration tool after the migration I don't find the customer attributes in admin.

Here is the screenshot:


texts: How to add other language (like German) in Magento 2 stable version?

texts:
I installed Magento 2 stable version. and run static:deploy command. When I change language in locale admin, no change language.

How to add language package? or any other solution?


texts: Customers ordering out of stock products

texts: I have my store set up so that out of stock items do not show up. For some odd reason every so often a customer is able to purchase a product that is out of stock. When I look that item up on my computer on the site it doesn't even show up. Has anyone else experienced this issue?


texts: After migrate to PHP 7.0 i don't have image on my main page

texts: can somebody help me, I migrate my magento 1.8 from php 5.4 to 7.0 and now have problem with show image on main page


texts: Can't select simple product to associate with configurable product

texts:
I have several configurable products with associated products.  All have worked well and I am familiar with how to add both.

I have 2 products to add to one of my configurable products.

I added the first one by duplicating an existing item, and making necessary changes all the way through.

When I need to select it to add to the list of associated items, it's there but highlighted in red and not selectable.

I could not figure it out so I deleted the simple product and created from scratch.  Same thing.

I can add it other configurable products, but not this one - UNLESS - I uncheck one of the existing ones.  There are 5 there now.  Is there a limit on how many simples can be associated with a configurable?

I cannot find this question on the exchange, so if you mark as duplicate, please also leave the URL to the answer.

Any thoughts?  Magento 1.9x - Thanks for any input.


texts: Magento data migration: Customer custom attributes

texts:
I want to migrate customer custom attributes from Magento1.9.3.2(community) to Magento 2.3.0 (Enterprise). I have tried with default attributes its works fine. Then I am trying with customer custom attribute like a telephone but it is not working with migration.

Please give me some idea, where I map custom attributes and how I can add that in the XML file.
Please check below attachment.


texts: How To Change Default Layout Template as 2column-left.phtml

texts:
I have just installed the Magento Bootstrap theme webcomm/magento-boilerplate

By default, Mangeto loads the 2column-right.phtml as the skeleton layout template. How do I ask it to load another template, say 2column-left.phtml, as the default template? I tried to added following XML to local.xml in the theme package but no avail:

    <default>
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
        </reference>
    </default>

So how to do it? I know that I can specifically target a product or category page to be rendered in certain skeleton template but what I want is to apply this layout by default, especially for home page, either by editing the XML files or doing it in the backend admin panel?


texts: Magento 2.2.6 Shipping method price tax calculation

texts:
We have a problem with the shown price of the shipping methods at checkout.

I have tax rules setup for the netherlands 21% all other country don't have any tax rules.

We use the following settings:

Tax class for shipping: Taxable goods
Calculation settings > Shipping prices: Excluding tax
Price Display Settings > Display Shipping Prices: Including tax
Flat rate > Price : 1.50

When on the checkout page I choose county The Netherlands the price at the shipping methods shows 1.5 where it should show 1.82

When I change the settings to:

Calculation settings > Shipping prices: Including tax
Price Display Settings > Display Shipping Prices: Including tax

When on the checkout page I choose county The Netherlands the price at the shipping methods shows 1.50 and that is correct. But when I choose another country with no tax rules the shipping method stills shows 1.5 but this time it should be 1.24.

In the Order Summary block the price is always correct.

I checked the core file module-tax\view\frontend\web\template\checkout\shipping_method. Here you can see: method.price_incl_tax and method.price_excl_tax. these values are somehow always the same.

We tested on a magento 2.2.4 and there the problem does not exsist.
Does anybody have any idea?


texts:
I have created my eshop and i am testing it now. I have found the following issue:
Let me explain the case:

Lets say I am a customer and I have a paypal account with my address info . My country is Greece.
I have an onepage checkout plugin with geoip. Lets say i am in France now and i place an order so as to be shipped to Greece. I buy a product and i am redirected to my onepage checkout screen. Geo ip has detected and set the country to France. I dont want to use onepage fields so i click paypal express button in that screen and i am redirected to paypal.
When i login and click continue i am redirected from paypal to the eshop, to the review details page. There, the country is set to France and not Greece which is the country that my paypal account has. All other fields are correctly retrieved by paypal.
This means that magento ignores paypal country and overwrites it with magento's selected country.

Can it be fixed?

(i ve tried also to use core magento checkout, and i inserted country and other info to shipping address fields, i clicked next(so as to post them to server) and then i clicked paypal express button. again review ignored paypal data.)


texts: How to redirect to a specific page on any error in Magento 2

texts:
I have a live running e-commerce platform, when there is any kind of error, it displays error number with text saying "There has been an error processing your request".

How to avoid this page and show a normal page with default Magento header and footer and a custom content saying something like "Something went wrong, please try again"


texts:
When I am landing in a Product Category Page I am getting the sorting order Descending Direction like below. I need this only at "Sort By Name" but not in others.

But I would like to have Ascending Direction when I am landing a Product Category Page like below one.

I need this only at "Sort By Name" but not in others.

How can I do that ?

Thanks


texts: Magento2 add new Column on Cart Page and store in quote_items table

texts:
I added a new Column on Cart Page
Using this link : https://magecomp.com/blog/add-extra-new-column-on-shopping-cart-page-magento-2/
and add new field in quote_items table.
How to add this new Column on quote_items table on UpdatecartItems?
Please Check :


texts: How to correctly setup the cron jobs for sending of the Order Confirmation Emails?

texts:
I´m trying to fix the issue with Order Confirmation Emails being delayed by 20 minutes or so...I asked the hosting company to set up the cron jobs correctly and they replied this:

If the Magento shopping cart is using some kind of script that is run by cron job, you would have to provide more information so that we could set up the server accordingly. Please note that scripting issues are out of our scope of support. If you can provide us with the additional information on the name of the script and what cron job is used to run it, we will gladly make the changes for you.

Did you try searching for the plugins for the Magento that could do that kind of service? As I said before, I am unable to locate the right cron job that is running this action, and without the exact cron job, we aren't able to do anything regarding this delay.

Can you clarify do the confirmation emails go one by one, as any customer places the order, or are they accumulated and sent in larger number all at once?

Any additional information would be very useful in further troubleshooting.

When I went to the cPanel - Advanced - Cron Jobs - I saw 2 cron jobs setup in there. Do I need to modify one of these cron jobs?

Minute --) 12,18,38,48   php /home/ACCOUNTid/public_html/cron.php > /dev/null
Minute --) 03 Hour --) 22 /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/cli.php --backup --auto=1 --insid=67_58956

I also found this:

using cPanel - you can set up your cron in Advanced section -> Cron Jobs

In the Common Settings field, select once every five minutes in the drop-down.

In Command, put the following action (if your Magento root is public_html)

/bin/sh /home/ACCOUNTid/public_html/cron.sh

Add that cron job and your cron should be up and running.

So I did that. Is this correct you think? Where do I configure these Cron jobs for sending Order Confirmation Emails in the Admin panel of the Magento shopping cart? And what are the correct settings for that?


texts: CRUD operation step by step with example

texts:
Is there any working example for CRUD operations step by step with code? I tried many links but not getting the accurate result to understand the steps of crud operations.

I want to make it an extension for it. Not to heavy code but make it very simple so that anyone can understand easily.

If anyone can make it than it will be a great help to beginners.

Thank you!


texts: Unable to create table with foreign key?

texts:
        <column xsi:type="smallint" name="id" unsigned="false" nullable="false" identity="true"
                comment="ID"/>

        <column xsi:type="int" name="product_id" unsigned="true" nullable="false"
        identity="false" comment="Product ID"/>

        <column xsi:type="int" name="profile_id" nullable="false"  comment="Account code"/>

        <column xsi:type="int" name="account_id" nullable="false"  comment="Account code"/>

        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="ONBUY_PROFILE_PRODUCT_PROFILE_ID_ONBUY_PROFILE_ID" table="onbuy_profile_products"
            column="profile_id" referenceTable="onbuy_profile" referenceColumn="id"
               onDelete="CASCADE"/>

        <constraint xsi:type="foreign" referenceId="ONBUY_PROFILE_PRD_PRD_ID_CAT_PRD_ENTT_ENTT_ID" table="onbuy_profile_products"
            column="product_id" referenceTable="catalog_product_entity" referenceColumn="entity_id"
               onDelete="CASCADE"/>

        <constraint xsi:type="unique" referenceId="ONBUY_PROFILE_PRODUCT_PRODUCT_ID_PROFILE_ID">
            <column name="profile_id"/>
            <column name="product_id"/>
        </constraint>

        <index referenceId="ONBUY_PROFILE_PRODUCT_PROFILE_ID" indexType="btree">
           <column name="profile_id"/>
        </index>

        <index referenceId="ONBUY_PROFILE_PRD_PRD_ID" indexType="btree">
           <column name="product_id"/>
        </index>


texts: I Want to display images instead of text in multiselect attribute

texts:
Hi I am new to magento and I am trying to display images instead of text using a multiselect attribute in the product page.

To be more specific I have created a multiselect attribute with 4 options such as Precious, Made with love, Hand Crafted and One of its kind.

The text of which ever option the site admin selects in the backend shows in the frontend of the product page. But I want to show images instead of the text in the frontend. Some thing like the image below.

Is there a way I could achieve it?

I am using magento 1.9 CE

Thanks for any help in advance.


texts: How to use empty layout from controller?

texts:
It's my execute method from controller:

$this->_view->loadLayout();
$this->_view->renderLayout();

It's my layout inside the <page>:

<body>
    <referenceContainer name="content">
        <block
            class="Magento\Framework\View\Element\Template"
            name="printshipment_index_index"
            template="Module_PrintShipment::print_shipment.phtml"/>
    </referenceContainer>
</body>

In this case I have default Magento layout with header, footer etc. And I need fully empty page. I have tried to add

<update handle="empty"/>

but then my block doesn't appear. What can you advise me?


texts: Uncaught Error: Cannot instantiate interface Magento\Framework\App\Config\ConfigSourceInterface when deploying with Capistrano

texts:
In my daily I have installed Capistrano to deploy Magento 2 to a production / staging server.
For this one project whenever I try to run the command cap staging deploy it fails every time whenever I try to run any bin/magento command with this error:

PHP Fatal error:  Uncaught Error: Cannot instantiate interface Magento\Framework\App\Config\ConfigSourceInterface in /public_html/releases/20180501160912/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50
    Stack trace:
    #0 /public_html/releases/20180501160912/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
    #1 /public_html/releases/20180501160912/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(144): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
    #2 /public_html/releases/20180501160912/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(230): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'source', 'Magento\\Store\\A...')
    #3 /h in /public_html/releases/20180501160912/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50

and it fails right after installing magento with composer update from a composer.json and composer.lock file.
The main app work flawlessly but the new deployment in the release folder all fails because of this.
I've tried to cd into the release and clear the cache / generated folder, but didn't work.
Every bin/magento command trigger that error.

Magento 2.2.2
Server OS: Debian GNU/Linux 8.10 (jessie)
No Redis or Varnish Cache
PHP 7.0

Any help would be appreciated


texts: Trouble Opening Category Tab by Default (Layered Navigation)

texts:
In accordance with other posts/answers I've seen on this issue, I've overridden Magento_LayeredNavigation/templates/layer/view.html and edited the filter-options div with

<div class="filter-options" id="narrow-by-list" data-role="content" data-mage-init='{"accordion":{"openedState": "active", "collapsible": true, "active": "0", "multipleCollapsible": false}}'>

This partly works -- changing the expand/collapse arrow to what it would look like if the category tab was expanded and setting aria-expanded to "true" -- but it doesn't actually expand. The content div has an inline style="display: none;"

If I try it with other tabs in the layered navigation, it works for them. Any reason why it wouldn't work for Category?

Edit: should note thank I'm inheriting blank, and not Luma.


texts: Why do I still need to regenerate static content in developer mode?

texts:
I've noticed that in developer mode whenever I enable an extension, or a theme, I will have to regenerate the static content. Here's an example of such a case.

According to the magento 2 documentation it shouldn't be required to regenerate static content in developer mode. Often times I have to force the regeneration.

Any ideas why the static content has to be regenerated?


texts: Use Multiselect instead of dropdown customer groups code in backend Magento

texts:
I'm using a custom redirect extension from iPragmatech to redirect a customer to a different URL after logging in.
This is based on customer groups.

I have asked the developer for help which he gave me but I'm not fully experienced with programming.

At the moment I can only select one customer group in a dropdown in the backend. I can change the dropdown to a Multiselect but I also need to customize the _CustomerGroup method. In Model/Observer/Customer.php I need to change this line:

if($this->_CustomerGroup())

This is the total code:

    /*method for Login Redirection*/
public function customerLogin(Varien_Event_Observer $observer)
{

    if (Mage::helper('redirection')->isEnabled()){
        $lasturl = Mage::getSingleton('core/session')->getLastUrl();
        if (strpos(Mage::helper('core/http')->getHttpReferer(), 'checkout') === false){
            if (! preg_match("#customer/account/create#", $lasturl) && Mage::helper('redirection')->isoptionEnabled('login_redirection')) {
                    if($this->_CustomerGroup()) {
                    $_session = $this->_getSession();
                    $_session->setBeforeAuthUrl(Mage::helper('redirection')->setRedirectOnLogin());

      }
    }
  }
}

Is there someone who can help me out with a piece of code and help me get into the right direction?

Br,

Steve


texts: What if I change files in design/adminhtml/default/default/template/../../ directory

texts:
I need to change order page of magento's admin panel location of this page is-

design/adminhtml/default/default/template/sales/order/view/tab/info.phtml

Somewhere I heard if you want to make changes in core file then you need to rewrite core file. Is these "default/default" folder files comes under core files of magento?

What if I directly replace my code instead this code? Code is working properly so there is no any issue with it.

Please help me on this


texts: Remove/hide particular Anchor Categories in category properties

texts:
I am new to magento, I have created the Anchor Categories by referring magentocommerce, and it's working fine now the question is I want to Remove/Hide particular Anchor Categorie how can I do?

Example: I have 2 Anchor Categories like Color & Price. I want to hide/remove Color how can I Do this?

thanks in advance.


texts:
I'm trying to add custom block above the footer. I'm adding my custom block in page.xml:

<block type="core/template" template="page/html/socmed_footer.phtml" name="socmed_footer" as="socmed_footer" />

Then i create socmed_footer.phtml in /page/html/socmed_footer.phtml

Facebook

Line

Instagram

Then i called the custom block in footer.phtml

<?php echo $this->getChildHtml('socmed_footer') ?>

    <?php echo $this->getChildHtml() ?>
    <address class="copyright"><?php echo $this->getCopyright() ?></address>

It's working, but why my footer showing duplicate socmed_footer.phtml inside footer-container and also footer class?

Thank you


texts: How to Implement Rest API Magento 2 for Mobile App

texts: I read online tutorials for mobile app development.My question is this how I can implement those API in mobile which I will share with app developer.Does I need to add API in module and share module with App developer.Or just I need to share links for API format rest/V1/products etc.


texts: Prevent adding to cart a product in "non multiple" qty when qty Increments enabled

texts:
Is there any easy way to show a warning in the product page and prevent adding product to cart instead of showing the message in cart page, when the quantity increments entered in quantity input field are incorrect?

Thanks


texts: Magento 2.3 getResource is deprecated, what is the alternative?

texts:
I have a product attribute label get in category page below way.

<?php
$tablecolor = $_product->getResource()->getAttribute('xyz'); // attribute name
$attrTestValue = $tablecolor->getFrontend()->getValue($_product);
echo $Label = $_product->getAttributeLabel('xyz');
?>

it is working fine
but it is depricated in magento 2.3
What is a suggested an alternative way to get labels without using deprecated method?


texts: I want to make multiple contact forms which could be received to other email address

texts:
I have a Magento website for sorts of people use. So i want to make multiple Magento contact forms depending on the users type.

I make the contact forms that emails have received to general email i've fixed on Magento back-end server. I just duplicated first one to make the other form. but i can't find how to separate the destination of contact.

<?php echo Mage::helper('contacts')->__('Contact Us') ?>

<form action="<?php echo $this->getFormAction(); ?>" id="contactForm"     method="post" class="scaffold-form">

<?php echo Mage::helper('contacts')->__('Contact Information') ?>

<?php echo Mage::helper('contacts')->__('* Required Fields') ?>

                *<?php echo Mage::helper('contacts')->__('Name') ?>

                    <input name="name" id="name" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Name')) ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry" type="text" />

                *<?php echo Mage::helper('contacts')->__('Email') ?>

                    <input name="email" id="email" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Email')) ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email" type="email" autocapitalize="off" autocorrect="off" spellcheck="false" />

            <?php echo Mage::helper('contacts')->__('Telephone') ?>

                <input name="telephone" id="telephone" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Telephone')) ?>" value="" class="input-text" type="tel" />

            *<?php echo Mage::helper('contacts')->__('Comment') ?>

                <textarea name="comment" id="comment" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Comment')) ?>" class="required-entry input-text" cols="5" rows="3"></textarea>

    <input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
    <button type="submit" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Submit')) ?>" class="button"><?php echo Mage::helper('contacts')->__('Submit') ?></button>


texts: I want to add jquery validation to my form ! How can i do it?

texts:
I am using magento's inbuilt luma theme to practise and  i am not able to understand where exactly is js written how is the flow ?

This is my basic view page. And is working fine i want to add jquery validation here.

Add Content

  <form>

      Name
      <input type="email" class="form-control" id="email" placeholder="Enter email">

      Post Content
      <input type="password" class="form-control" id="pwd" placeholder="Enter password">

      <input type="checkbox"> Remember me

    <button type="submit" class="btn btn-default">Submit</button>
  </form>


texts: (SOLVED) Magento 2.3.5 Category backend data-binding not working & Category Frontend Landing Pages not showing (Migrated Data from Magento 1.7x)

texts:
The question I want to ask is this: How does knockout data binding work in Magento 2.3.5?

I have migrated data from Magento 1.7.0.2 using Magento Data Migration Tool.

The backend Catalog -> Categories -> (any category) does not pull the data from the database.  It seems the values are just defaults.

See image showing current values for Category ID: 7 (Brands)

After finding the related tables I ran this:

SELECT block.content, eea.attribute_code, eea.attribute_id, cat.*, ccet.*, block.*
   FROM catalog_category_entity_int ccet
   INNER JOIN catalog_category_entity AS cat
   ON ccet.entity_id  = cat.entity_id
   INNER JOIN eav_attribute eea ON
   ccet.attribute_id  = eea.attribute_id
   INNER JOIN cms_block as block
   ON block.block_id = ccet.value
   WHERE eea.attribute_code = 'landing_page'
   AND ccet.entity_id = 7
   ORDER BY eea.attribute_code ASC;

The results of the database data for ID 7 (as image above):

The query I ran targets landing_page attribute (all other attributes and categories have same issue as discussed here), which returns brands-landing-page (this is the correct item) and all other information - Brands category with Brands Landing Page.

The data-binding (or something else) does not work correctly.  This means I cannot save the Category,  (as Category Name is EMPTY but required).

How and where can I start to investigate what is wrong, how will I be able if Knockout (or PHP that populates the data and binds to Knockout) works correctly?

Frontend also doesn't display the landing page for the categories where set.

Side notes

Most important thing - Data is migrated using data-migration-tool:2.3.5 from Magento 1.7.0.2
The landing pages also doesn't show on the frontend (same issue with bindings maybe?)
No errors in log files, no errors displayed on page, or browser console
I have two Store IDs - 0 admin and 1 custom store
Changing Store IDs from 0 to 1 has no effect!

Thank you!

SOLUTION:

My instance was 100% related to data-migration-tool that doesn't correctly update all the related tables.  See LitExtension Magento Migration or my answer below for tables involved.


texts: Block with Cachable=false not rendered on product view page

texts:
I am using magento2-1.0.0-beta4

I have copied the checkout.root block from app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml to the product page.

Everything is working fine, until I enable the page_cache. That block is having cacheable="false" in the Layout XML.

Now when I open my product page, the block does not get rendered at all.

If I understood the page cache correctly, it should load such blocks via an AJAX call. But there does not seem to happen such an AJAX call as my break point in \Magento\PageCache\Controller\Block\Render::execute is never hit.

When opening /checkout/ or /checkout/cart/ everything works. But there also does not seem to happen an AJAX call. Instead the whole page does not seem to be rendered from the cache, which makes sense for the cart.

So should I simply exclude the product view page from the page_cache?
But I did not find a way to do so?


texts:
I'm making a sponsorship module and I need to find when a godson has paid his first order. For that matter, I have to use an event observer, but I can't find which. My customers can pay by credit card and by check.

It is difficult to understand Magento's mess around payment, sorry about that, but I'm truly lost.


texts: Difference between setValues() and addValues()

texts:
In magento module for the back-end part, for admin form edit tab we are using

  addValues()

and

  setValues()

I want to know difference between those 2 functions


texts: Can i add static block dynamically in page?

texts:
I am managing now 5 stores in my magento and in future the numbers of store may be increase. My problem is here whenever i create the new store the whole layout dismissed.

I only added the sliders images in cms page and for categories product i have managed the static block for each store. And finally i hard coded the block id into page template.

So, whenever i create the new store i have to write code for categories product static block id into page.

Can someone suggest me how can i manage it, that i wouldn't have to add the block id to call that block in page.

And here is the code i have written for each store static block

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('main-store')->toHtml(); ?>

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('beautiful-store')->toHtml(); ?>

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('cgr-store')->toHtml(); ?>

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('fragrances-store')->toHtml(); ?>

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('timeline-store')->toHtml(); ?>

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('cardles-mothercare')->toHtml(); ?>


texts:
we have integrated one step checkout. it's working fine in other browsers but in safari it's throwing error, because of that credit card form is not visible on checkout page.

above is the error i'm getting in console. please help how can i overcome this issue, thanks in advance.


texts:
I am trying to create a mobile app for a Magento 2.3 CE site, So far I have found where the Swagger documentation is and have managed to log in as a customer using the integrate endpoint.
What I don't understand is how I get the products and categories using the customer token, they all seem to require a admin token


texts: How to test the frontend for different countries

texts:
I have different stores for different countries.

I have also changed the checkout information depending on the country.

I would like to test if my logic works properly for each of the websites.

Is there a way to check the frontend for a website of a specific country?


texts: Magento 2.3 Wishlist API free extension needed

texts:
This is continuation for the following closed question:
Magento 2.3 Wishlist API free extension
As you can see I extremely sad about some god that closed a good question.
Well let us go again...

I need to add, and remove products from a client's wishlist via Magento REST API. But Magento 2 core code does not have it.
... Anyone can help me with free wishlist API extensions compatible with Magento 2.3 ?
I could make this by my own but it take me a couple of days coding....
Thanks.... and electricity binary bits empowered god I praise please don't close good questions again lol...


texts: Why two installer files in core Cms module

texts: I am working with custom module upgrade script. I know Once Magento runs an installer script for a module, it will never run another installer for that module again. I checked core "Cms" module  I found two installer script mysql4-install-0.7.0.php and  install-1.6.0.0.php. why two installer files? which will run or both will run? in which sequence they will run?


texts:
I'm trying to edit email template and format created date.
The date in the email is written using this variable

 {{var order.created_at}}

And I think that It is created using the following function of vendor/magento/module-sales/Model/Order.php

 /**
     * Get formatted order created date in store timezone
     *
     * @param int $format date format type (\IntlDateFormatter::SHORT|\IntlDateFormatter::MEDIUM
     * |\IntlDateFormatter::LONG|\IntlDateFormatter::FULL)
     * @return string
     */
    public function getCreatedAtFormatted($format)
    {
        return $this->timezone->formatDateTime(
            new \DateTime($this->getCreatedAt()),
            $format,
            $format,
            $this->localeResolver->getDefaultLocale(),
            $this->timezone->getConfigTimezone('store', $this->getStore())
        );
    }

This function must read Locale (it_IT in my case)

        $this->localeResolver->getDefaultLocale(),

but the date is always formatted in yyyy-mm-dd hh:mm

Is it correct?

I'd like to use italian version dd-mm-yyyy hh:mm, it is possible?


texts: Fatal error: Allowed memory size of A bytes exhausted (tried to allocate B bytes). Never happened before installing VM on CentOS with LAMP

texts:
I have installed Xammp and Magento CE  1.8 on windows 8.
I have been following the same tutorial once in a while for a year: developping a module with a simple Model. It worked fine. But now,adding a connection to the database resource causes the fatal error mentionned in the title.

Fine tuning php.ini does not solve the problem. Reinstalling everything (xammp and native Magento neither).

I am wondering why the fatal error never happened with the exact same code for 30 or so times in a year, and does always now. The only new thing on my computer is an Oracle VM running CentOs and LAMP.

Although I get the fatal error, even though VM is not launched, I am left with only one possible explaination: the VM (even off) has something to do with this.


texts:
Magento return 'VAT Number is Invalid' every time event I entered valid VAT Number.

I checked my VAT number here and it's working I got all information with my name. please help why Magento return Invalid.

Thanks


texts: Magento 2 to translate the html file from base folder is not working

texts:
I'm working on Magento 2.3.4.
I have tried to translate the text of the html file. The html file resides in the view/base folder.
Example: I want to add the translation for the below file.

vendor/magento/module-ui/view/base/web/templates/grid/filters/chips.html

            <each args="elems">

                        <text args="preview[0] || '...'"/> - <text args="preview[1] || '...'"/>

                    <button class="action-remove" type="button"
                        data-action="grid-filter-remove-chip"
                        click="$parent.clear.bind($parent, elem)">

                    </button>

            </each>

        <button class="action-tertiary action-clear" type="button" click="clear" translate="'Clear all'"
            attr="'data-action': hasPreviews() ? 'grid-filter-reset' : ''"/>

I have multi-website stores and need to translate the Active filters text.
But in the Magento_Ui core file itself, they didn't add the translation.
So, I have added the required translation in my language package. But it's not reflecting.


texts: How do you override LESS in a custom theme?

texts:
I've spent the better part of this week trying to find a clear guide on how to properly create a custom theme and extend exist LESS/CSS without having to copy the entire magento-blank theme.

The official documentation gives basics on overriding variables, but that has limited uses. Existing guides, like Sonassi's for example, appear to based on a beta release of Magento 2.

Coming from Magento 1, there was a bit of a learning curve figuring out how LESS works, and how Magento collects all the files into CSS. It took me a while to dig through pieces of guides and get a clear answer of which files to modify and when and I thought I would share what I found so future users (and future me) could have get a quick start on using LESS in Magento 2.


texts: How do I cancel remaining products on a partially invoiced order?

texts:
I have an order containing five product lines (A, B, C, D, E)
C, D and E have been shipped and invoices.
The customer now decides he no longer desires A, B and I need to cancel them out, returning the reserved stock.

But if I "edit" the order, I have no products left and it does not want to save.
if I "void" the order, it tries to void the payment (do not want)
If I "cancel" the order it also tries to void the payment.

What is the proper method of cancelling and returning to stock the two remaining lines on this order?


texts:
I would like to use JQuery.UI.Autocomplete component in my module for Magento 2.
Also, I am using KO.js for the user interface of my application.
So, I have added a custom binding for KO:

define([
'ko',
'jquery',
'jquery/ui'
], function (ko, $) {
'use strict';

ko.bindingHandlers.autoComplete = {

    init: function (element, valueAccessor) {
        var settings = valueAccessor();
        var selectedOption = settings.selected;
        var options = settings.options();
        var updateElementValueWithLabel = function (event, ui) {
            event.preventDefault();
            $(element).val(ui.item.label);
            if(typeof ui.item !== "undefined") {
                selectedOption(ui.item);
            }
        };

        $(element).autocomplete({
            source: options,
            select: function (event, ui) {
                updateElementValueWithLabel(event, ui);
            },
            focus: function (event, ui) {
                updateElementValueWithLabel(event, ui);
            },
            change: function (event, ui) {
                updateElementValueWithLabel(event, ui);
            }
        });
    }
};
});

I've added the following code in my html template:

<div class="suggestions">
<input id="suggestion_box" type="text" data-bind="autoComplete: { selected: $data.productSuggestions.selectedSuggestion, options: $data.productSuggestions.suggestions }" />
</div>

It looks good, but it doesn't work. I've got a error message in the browser console. I debugged it and as it turned out, the reason of the issue is in the following lines(they start from the 6819 line) of jquery-ui.js library:

this.menu = $( "<ul>" )
            .addClass( "ui-autocomplete ui-front" )
            .appendTo( this._appendTo() )
            .menu({
                // disable ARIA support, the live region takes care of that
                role: null
            })
            .hide()
            .data( "ui-menu" );

The this.menu field is undefined, because of invoking data( "ui-menu" ) method. Methods that invoke before data() one are returns their results.

It seems like I've inited JQuery.UI.Autocomplete in a wrong way, but all examples of configuring are quite simple and I'm not sure what have I done wrong.

Any ideas?


texts: Remove “Compare Prod” SideBar from Catalog XML?

texts:
I edited the catalog.xml file but still NOT working !!

Folder: /app/design/frontend/base/default/layout/catalog.xml

Code Removed:
Line 56 <block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>

Line 166 <action method="unsetChild"><name>catalog.compare.sidebar</name></action>

QTN: Is it the correct Folder ??


texts: Customer Tax Group not applied on order creation

texts:
Setup

I have

Crated different Customer Tax Classes (Retail/Company)
Created different Tax Rates (21%/0%) and applied them with Tax Rule
In Store Config enabled Enable Automatic Assignment to Customer Group and selected correct Customer Tax Classes based on Billing Address and Validate on each transaction

The problem

In the store front everything works as expected. The prices during checkout are calculated with different Tax Rates based on the billing address with and without VAT ID.

BUT the Order is saved with the Retail tax values, even though the Company tax group is saved properly.

So both the admin Sales -> Orders and API show that order correctly with the Company customer tax group, but the tax rates are applied from the Retail class.