texts: what should be in type attribute of block

texts:
I think I am confused because after going so further in learning magento, I am getting this basic doubt now.

The problem is that I created a new block in layout of my created theme folder. The thing which I can't understand is what should be the value of the "type" attribute of block layout element?

I know that "type" attribute refers to the php classes but what I can't understand is that which php class name should I assign as "type" attribute to the block layout element?

The block is as shown below with the "type" --> page/html_header. (I don't know why it is rendering fine with this "type" attribute value)

<block type="page/html_header" name="happy.label" as="happyLabel" template="page/html/happyLabel.phtml"/>

Here is the relevant xml layout code from design/frontend/default/{$mytheme}/layout/page.xml:

<default translate="label" module="page">
    All Pages
    <block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">

        <block type="page/html_header" name="header" as="header">
            <block type="page/html_header" name="happy.label" as="happyLabel" template="page/html/happyLabel.phtml"/>
            <block type="page/template_links" name="top.links" as="topLinks"/>
            <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
            <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
                Navigation Bar
                <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
            </block>
            <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
                Page Header
                <action method="setElementClass"><value>top-container</value></action>
            </block>
            <block type="page/html_welcome" name="welcome" as="welcome"/>
        </block>

    </block>
</default>

The template file just has five list items in UL and Li format.

EDIT:

How should I choose which value to pass to "type" attribute when creating a block?


texts: oracle.j2ee.ws.client.jaxws.JRFSOAPFaultException: Client received SOAP Fault from server : Invalid api path

texts:
I am trying to invoke Magento SOAP V2 APIs as web service from Oracle SOA Suite(11.1.1.9) using BPEL. but I am getting  "Invalid API Path"  with error code "3".
could you please suggest the best approach to get it invoke the required  operations
I am able to invoke default (v1)API with no issues.

Thanks
Kiran


texts: How to create and add 'buy now' button along with add to cart button on each product?

texts:
I am new to Magento, using Magento 1.9. with a custom theme. I successfully created buy now button on addtocart.phtml by the following codes

<button type="button" title="Buy Now" class="button btn-cart" onclick="setcheckoutLocation('<?php echo $this->getAddToCartUrl($_product) ?>')">Buy Now</button>
<?php echo $this->getChildHtml(", true, true) ?>

But am confused in where to paste below javascript on my view.phtml? can anyone say exactly next to which function or step number, I should paste these scripts?

I planned to have 2 buttons, without disturbing each other: When someone clicks

  Buy Now button which should redirect to checkout/onepage

  Add to cart button should do its default checkout/cart

Thanks in advance. Any suggestions are very welcome! :)


texts: magento2 checkout page incomplete rendered

texts:
When i checkout a product in cart, my checkout page renders incomplete as shown with the system log which says :

[2016-07-25 10:35:13] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_39779d713e3fbb1543956771d12cf7164 and handles default, checkout_index_index: Please correct the XML data and try again.  [] []
[2016-07-25 10:35:13] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_3177627f91af678a9b03e993f1a91917f and handles checkout: Please correct the XML data and try again.  [] []
[2016-07-25 10:35:14] main.CRITICAL: Broken reference: the 'header.panel.wrapper' element cannot be added as child to 'header.container', because the latter doesn't exist [] []
[2016-07-25 10:35:14] main.CRITICAL: Broken reference: the 'header-wrapper' element cannot be added as child to 'header.container', because the latter doesn't exist [] []
[2016-07-25 10:35:14] main.CRITICAL: Broken reference: the 'navigation.sections' element cannot be added as child to 'page.top', because the latter doesn't exist [] []
[2016-07-25 10:35:14] main.CRITICAL: Broken reference: the 'top.container' element cannot be added as child to 'page.top', because the latter doesn't exist [] []
[2016-07-25 10:35:14] main.CRITICAL: Broken reference: the 'breadcrumbs' element cannot be added as child to 'page.top', because the latter doesn't exist [] []
[2016-07-25 10:35:14] main.CRITICAL: Broken reference: the 'footer' element cannot be added as child to 'footer-container', because the latter doesn't exist [] []
[2016-07-25 10:35:14] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-25 10:35:14] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-25 10:35:14] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-07-25 10:35:14] main.CRITICAL: Broken reference: the 'header.panel.wrapper' tries to reorder itself towards '', but their parents are different: 'header.container' and '' respectively. [] []
[2016-07-25 10:35:14] main.CRITICAL: Broken reference: the 'navigation.sections' tries to reorder itself towards '', but their parents are different: 'page.top' and '' respectively. [] []
[2016-07-25 10:35:14] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_36f1b068ec7ccf4878f9284dd1137afd1 and handles catalog_product_prices: Please correct the XML data and try again.  [] []

My browsers console says:


texts: quoteCartRepositoryV1 serach by nested field

texts:
I would apply searchCriteria to /V1/carts/search in order to get all carts which contain specific sku. I've performed this query

https://shop.dicanio.it/rest/all/V1/carts/search?[filterGroups][0][filters][0][field]=items.sku&searchCriteria[filterGroups][0][filters][0][value]=xxxxxxxxx&searchCriteria[filterGroups][0][filters][0][conditionType]=eq

but system get me an error. There is any way to perform this kind of operation?

Final goal is remove a specific items sku from all active carts.

Thanks in advance!


texts: Place Order Button disabled with Virtual Products, PayPal Express, and Terms and Conditions

texts:
I have seen some ask this question around the web but without much of an answer given so I'm asking it here.

Customers who are trying to place an order for a Virtual Product using PayPal Express Checkout are unable to click the Place Order button on the review step after they have clicked the agree checkbox for terms and conditions. The button is disabled after checking the agree checkbox but not before.

This issue does not occur when dealing with a Simple Product or any product that appears to have a shipping method attached. The only visible difference I see on the page is the shipping option selection but I could be missing something.

I would imagine this is some sort of bug and not the intended outcome. Any thoughts on how to fix this?

It may also be important to note that I am using PayPal Payments Pro (Includes Express Checkout) method.


texts:
I need to give discount based on qty in stock,below are my conditions

Suppose i have 50 qty in Stock
1. When user buys between 1 to 10 he will 5% discount.
2. When user buys between 11 to 25 he will 3% discount.
3. When user buys between 26 to 50 he will 2% discount.

I have tried using catalog rule and shopping rule but nothing workout.

Please suggest how i can achieve above goal.


texts: Magento 2 create customer programmatically not working

texts:
I am trying to add customer data programmatically but it's not saving from the controller(override core controller)

<?php

namespace ConversionBug\ExitIntent\Controller\Account;

class Index extends \Magento\Customer\Controller\Account\CreatePost
{

    public function execute(){
        if ($this->session->isLoggedIn() || !$this->registration->isAllowed()) {
           // $resultRedirect->setPath('*/*/');
            return $resultRedirect;
        }
        if (!$this->getRequest()->getPost()) {
            $url = $this->urlModel->getUrl('*/*/create', ['_secure' => true]);
            $resultRedirect->setUrl($this->_redirect->error($url));
            return $resultRedirect;
        }
        $user =  $this->getRequest()->getPost('login');
        $userName = explode('@', $user['username']);
        $userDetails['firstname'] = $userDetails['lastname'] = $userName[0];
        $redirectUrl = $this->session->getBeforeAuthUrl();
        $password = $user['password'];
        $customer = $this->customerExtractor->extract('customer_account_create', $this->_request);
        $customer = $this->accountManagement
                         ->createAccount($customer,$password, $redirectUrl);
      }

}


texts: Magento 2 remove print.min.css from head

texts:
i want to remove print.min.css from head of html i tried below code in theme xml file but it is not wokring

<head>
         <remove src="css/print.min.css"/>
</head>


texts: Magento 1.9 where is the method $this->getImage()? phpstorm couldn't trace

texts:
File path: app/code/core/Mage/Catalog/Model/Category.php

method getImageUrl()

the $this-getImage() cannot be traced by phpstorm

Any advice how to look for it? or my settings in phpstorm for magento 1.9 isn't covering important area?


texts:
I am designing a theme in Magento 2 using blank theme as parent theme. I would like to change text on some of the the top links like this:

From "Compare Products 1 items" into "Compare (1)"

From "My Wish List 1 items" into "Wish List (1)"

From "My Cart 1 items" into "Cart (1)"

How do I accomplish that?


texts: magento2 product search criteria response associative array format issue

texts:
I am trying to return a set of product in magento 2 rest web api from the product repository. All working fine. But when I trying to return the result, the result is not in the form of a associative array. Following is the var_dump of the array before the return.

array(1) {
 ["product_categories"]=>
  array(3) {
    ["sale_items"]=>
    array(1) {
      [0]=>
      string(28) "array of items in sale items"
    }
    ["featured_items"]=>
    array(1) {
      [0]=>
      string(32) "array of items in featured_items"
    }
    ["new_style_items"]=>
    array(1) {
      [0]=>
      string(36) "array of items new_style_items items"
    }
  }
}

I am expecting the following result.

[
"product_categories": {
  "sale_items": [
    "array of items in sale items"
  ],
  "featured_items": [
    "array of items in featured_items"
  ],
  "new_style_items": [
    "array of items new_style_items items"
  ]
}
]

But I am receiving the following result.

[
{
"sale_items": [
  "array of items in sale items"
],
"featured_items": [
  "array of items in featured_items"
],
"new_style_items": [
  "array of items new_style_items items"
]
}
]

My php code is

$homePageProducts['product_categories'] = array ('sale_items' => array('array of items in sale items'),
                                                       'featured_items' => array('array of items in featured_items'),
                                                       'new_style_items' => array('array of items new_style_items items'));

    return $homePageProducts;

My return type is "mixed[]"


texts: Magento 2 | How can we use jQuery without "require(['jquery'],function($){" this code

texts:
We have face problem we implement some slider and also we have wrighten many script in phtml.
If we add the jquery library then magento is giving the error in core files and all script are stopped accept my cutome script once i remove the the jquery library
then core script are working but my custom script are not working its giving jquery not define you can see error below url.

http://php-scripts-form.blogspot.nl/2017/09/magento-2-how-can-we-use-jquery-without.html


texts: Hide or remove column from sales order grid

texts: I want to hide or remove Purchase Point column from sales order grid in backend using custom module, how do i do this?


texts:
I have set some custom attributes (with dropdown). This code works in grid + product view:

$_Promo =  $this->htmlEscape($_product->getData('promos'));

switch ($_Promo) {
case 0:

    break;
case 4:
            echo '
3 x 2
';
    break;
case 5:
            echo '
3 x 1
';
    break;
case 6:
            echo '
2 x 1
';
    break;

}

I want the attribute to be displayed in search results, found that  mytheme/template/catalogsearch/results.phtml   calls another function: $this->getProductListHtml()

where do I find that function?  Or what is the proper way of adding this?

Thanks.


texts: Get Country code during checkout in magento 2.3.2

texts:
I want to customise my order number in magento 2.3.2 during checkout.
I want to add Country code as a prefix to the order number.
How can i get the country name / country code from where the customer is placing order.


texts: Custom Console command __cunstructor always gets an error in Magento 2.3

texts:
I have a console command class with constrcutor that looks like this:

namespace Vendor\Module\Console\Command;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class ImportProduct extends Command
{

    const DUMMY_KEYBRAND_NAME = '-- Dummy Key Brand';
    const NAME_ARGUMENT = "name";
    const NAME_OPTION = "option";

    public function __construct(
      \Magento\Store\Model\StoreManagerInterface $storeManager,
      \Magento\Framework\File\Csv $csv,
      \Magento\Catalog\Model\ResourceModel\Product $productResource,
      \Magento\Eav\Model\ResourceModel\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory,
      \Magento\Eav\Api\AttributeRepositoryInterface $eavAttributeRepositoryInterface,
      \Magento\Catalog\Model\Product\Action $productAction,
      \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory $categoryCollectionFactory,
      \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,
      \Magento\Catalog\Model\ProductFactory $productFactory,
      \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry,
      \Magento\Framework\Indexer\IndexerRegistry $indexerRegistry
    ){
      $this->_storeManager = $storeManager;
      $this->csv = $csv;
      $this->productResource = $productResource;
      $this->_attrOptionCollectionFactory = $attrOptionCollectionFactory;
      $this->eavAttributeRepository = $eavAttributeRepositoryInterface;
      $this->productAction = $productAction;
      $this->categoryCollectionFactory = $categoryCollectionFactory;
      $this->productRepository = $productRepository;
      $this->stockRegistry = $stockRegistry;
      $this->indexerRegistry = $indexerRegistry;
      parent::__construct();
    }

...
}

when i run php bin/magento setup:upgrade` , it always shows an error like this:

  Type Error occurred when creating object: Vendor\Module\Console\Command\ImportProduct\Interceptor


texts: When I load my secure login page https://www.9gem.com/,my padlock does'nt show.


texts: Get custom attribute's value in Index (cms, home page)

texts:
I have custom attribute called slider_link and trying to display it's value in home/index/cms page. I use the following code:

<?php echo $_product->getData("slider_link"); ?>

After adding this, my index page dose not load.

However, I had used above code on my view.phtml and list.phtml with no errors. everything is working fine.

Any idea how can I get the attribute value of my custom attribute called slider_link on my home page?

UPDATED

    <?php
    $products = Mage::getModel('catalog/product')->getCollection();
    $products->joinField(
    'qty',
    'cataloginventory/stock_item',
    'qty',
    'product_id=entity_id',
    '{{table}}.stock_id=1',
    'left'
    );
    $products->addAttributeToSelect(array('name', 'thumbnail', 'price', 'special_price' , 'RegularPrice' )); //ovdje idu atributi
    $products->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id=entity_id', null, 'left' );
    $products->getSelect()->limit(5);
    $products->getSelect()->order('RAND()'); // random sortiranje
    $products->addAttributeToFilter('category_id', array('in' => array(21))); // ubacujem kategorije id
    $this->_reviewsHelperBlock = $this->getLayout()->createBlock('review/helper'); // pozivanje review helper, da bi se prikazao review summary
    foreach ($products as $product)  :
    ?>

            <a href="<?php echo $_product->getAttributeText("slider_link"); ?>"><img class="thumbnail" src="<?php echo Mage::helper('catalog/image')->init($product, 'thumbnail')->resize(780, 395)?>" alt="<?php echo $product->getName()?>">

    <?php endforeach; ?>


texts: Magento2 : Getting so many error js error

texts:
Getting so many js errors. Please help me how can I fix it. I did a lot search and tried given the solution. The site is in developer mode.

require.js:166 Uncaught Error: Script error for: Magento_Ui/js/lib/knockout/bindings/mage-init
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
makeError @ require.js:166
onScriptError @ require.js:1681
require.js:166 Uncaught Error: Script error for: Magento_Ui/js/lib/knockout/bindings/keyboard
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
makeError @ require.js:166
onScriptError @ require.js:1681
require.js:166 Uncaught Error: Script error for: Magento_Ui/js/lib/knockout/bindings/optgroup
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
makeError @ require.js:166
onScriptError @ require.js:1681
require.js:166 Uncaught Error: Script error for: Magento_Ui/js/lib/knockout/bindings/after-render
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
makeError @ require.js:166
onScriptError @ require.js:1681
jquery.js:248 Uncaught Error: cannot call methods on tabs prior to initialization; attempted to call method 'option'
    at Function.error (https://garagedoors4lessstore.com/pub/static/version1501755728/frontend/Etheme/yourstore/en_US/jquery.js:248:9)
    at HTMLDivElement.<anonymous> (https://garagedoors4lessstore.com/pub/static/version1501755728/frontend/Etheme/yourstore/en_US/jquery/jquery-ui.js:488:15)
    at Function.each (https://example.com/pub/static/version1501755728/frontend/Etheme/yourstore/en_US/jquery.js:384:23)
    at jQuery.fn.init.each (https://example.com/pub/static/version1501755728/frontend/Etheme/yourstore/en_US/jquery.js:137:17)
    at jQuery.fn.init.$.fn.(anonymous function) [as tabs] (https://example.com/pub/static/version1501755728/frontend/Etheme/yourstore/en_US/jquery/jquery-ui.js:484:9)

UPDATE : GETTING sIMILAR ERROR IN ADMIN  -----

admin-icons.woff2 Failed to load resource: net::ERR_CONNECTION_CLOSED
opensans-600.woff2 Failed to load resource: net::ERR_CONNECTION_CLOSED
opensans-400.woff2 Failed to load resource: net::ERR_CONNECTION_CLOSED
opensans-700.woff2 Failed to load resource: net::ERR_CONNECTION_CLOSED
magento-icon.svg Failed to load resource: net::ERR_CONNECTION_CLOSED
jquery.js Failed to load resource: net::ERR_CONNECTION_CLOSED
require.js:141 Uncaught Error: Script error for: jquery
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)

I WAS ADD SSL TODAY


texts:
I added below code

<?php

  require_once('app/Mage.php');
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
$installer = new Mage_Sales_Model_Mysql4_Setup;
$attribute  = array(
    'group'                     => 'General',
        'input'                     => 'select',
        'type'                      => 'int',
        'label'                     => 'Mobile (api)',
        'source'                    => 'eav/entity_attribute_source_boolean',
        'global'                    => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
        'visible'                   => 1,
        'required'                  => 0,
        'visible_on_front'          => 0,
        'is_html_allowed_on_front'  => 0,
        'is_configurable'           => 0,
        'searchable'                => 0,
        'filterable'                => 0,
        'comparable'                => 0,
        'unique'                    => false,
        'user_defined'              => false,
        'default'           => '0',
        'is_user_defined'           => false,
        'used_in_product_listing'   => true
);
$installer->addAttribute('catalog_category', 'mobile_api', $attribute);
$installer->endSetup();

?>

in my header.phtml for create custom attribute in category portion. I know it's not a best practice while adding db code in .phtml.

can you please anyone tell me where i have to add?


texts: I want to change condition of zero subtotal checkout payment method in magento-2.1?

texts: I have Grand total value is 0.5.If grandtotal price is less than 1,we placed order by free payment method.How it can achieve in Magento-2.1?


texts: Resourcemodel plugin not working - Magento2

texts:
app/code/Mymodule/Orderedproductsreport/etc/di.xml

<type name="Magento\Reports\Model\ResourceModel\Product\Sold\Collection">
   <plugin disabled="false" name="Mymodule_Module_Plugin_ProductSoldCollection" sortOrder="2" type="Mymodule\Orderedproductsreport\Plugin\ProductSoldCollection"/>
</type>

app/code/Mymodule/Orderedproductsreport/Plugin/ProductSoldCollection.php

<?php
namespace Mymodule\Orderedproductsreport\Plugin;
class ProductSoldCollection extends \Magento\Reports\Model\ResourceModel\Order\Collection
{

    public function afterAddOrderedQty(
        \Magento\Reports\Model\ResourceModel\Product\Sold\Collection $subject,
        $result,$from = '', $to = ''
    ) {

        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/ProductSoldCollection.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info('Your text message');

        return $this;
    }

}

public function afterAddOrderedQty isn't working.

Can any one help me what i'm doing wrong here?


texts:
I am preparing for Magento certification exam. There's question on most of study materials that Which block type is usually used for a content block on Magento pages?

Confusion occurs when some sites say answer is Mage_Core_Block_Text_List and some say its Mage_Core_Block_Template

I think answer should be Mage_Core_Block_Template as it uses template file which outputs content from template file whereas Mage_Core_Block_Text_List just outputs childs block one by one making it structural block.

Which is the correct answer and why?


texts: Selecting the product image for the specific webshop through phpmyadmin

texts:
At the product specific management page ("Catalog > Manage product > any product") you see the "image"tab. Please click on it.

At the left sidebar you can see: Choose store view "Default values". When you click on the dropdown menu, and choose for example "Webshop_A". Then you'll see a table with the images inside the cells. You also see a checkbox at the following columns:

Base Image
Small Image
Thumbnail

The admin has the ability to choose an image or to use the default value by unchecking or checking the checkboxes in the column.

I would like to uncheck the checkbox at "Use Default Value", and to check them at a specific image. Obviously, you can do that by using the checkboxes in the table. You can do it like the screenshot below:

I would like to do this not through the backend, but through phpmyadmin. I took a look at a table:

catalog_product_entity_varchar

But this table does not cater the checkbox settings.

Does anyone have the right know-how to do this?


texts: How to get the value of  tags from layout xml files?

texts:
I have a custom block in my layout file like this:

<block type="xxx/xxx" name="xxx" template = "bar.phtml">
<label>Foo</label>
</block>

How do I get the value of label from bar.phtml ?

Please note I do not want to use setData function to set my variable and pass it.
I want to extract the value inside  tags from the phtml (or anywhere else). I hope its clear.


texts: Google Search Console finds deleted products

texts:
We have a magento 1.8.0 webshop with over a 1000 products. We always check out Google search console, and try to remove all the 404 crawl errors.
The url rewrites have been flushed and corrected, but still google finds 99 deleted products.

It says it has found it in the sitemap, but I have checked it, and I cannot find the 404 url's inside it.
I also checked the Google products export csv, but alas.

My colleague says the problem possibly lies inside the related products table in the database. Is this possible?

I found the related products sku's with the help of this tutorial:
http://www.extensions.sashas.org/blog/how-to-export-magento-cross-sell-upsell-related-products.html

But this only has the sku's and google console only has the url's.

How do I get more information? How do I know where google got the deleted product links from?

EDIT: I think I found the answer, but I'm not sure.
-I found an old google export file, and it was suddenly picked up by google somehow.
-After I removed it, google still showed 50 crawl errors. I've searched the whole (website) filesystem with an in-text search, and I've searched the whole database for those links, but I couldn't find them in there.

Then I found this link, and it's probably why google still searches for those old links:
https://webmasters.stackexchange.com/a/30091


texts: why I can't set a custom template for street field in checkout shipping step via checkout_index_index.xml

texts:
Could you explain me please why I can't set custom template for 'Street' fields group via checkout_index_index.xml. My code below:
<item name="street" xsi:type="array">
    <item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
    <item name="children" xsi:type="array">
        <item name="0" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="elementTmpl" xsi:type="string">Magento_Ui/form/element/checkout-input</item>
            </item>
        </item>
        <item name="1" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="elementTmpl" xsi:type="string">Magento_Ui/form/element/checkout-input</item>
            </item>
        </item>
    </item>
</item>

But with the help of LayoutProcessor it's working fine...
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
        ['shippingAddress']['children']['shipping-address-fieldset']['children']['street'] = [
            'component' => 'Magento_Ui/js/form/components/group',
            'dataScope' => 'shippingAddress.street',
            'provider' => 'checkoutProvider',
            'sortOrder' => 0,
            'type' => 'group',
            'additionalClasses' => 'street',
            'children' => [
                [
                    'label' => __('* Address Line 1'),
                    'component' => 'Magento_Ui/js/form/element/abstract',
                    'config' => [
                        'customScope' => 'shippingAddress',
                        'template' => 'ui/form/field',
                        'elementTmpl' => 'Magento_Ui/form/element/checkout-input'
                    ],
                    'dataScope' => '0',
                    'provider' => 'checkoutProvider',
                    'validation' => ['required-entry' => true, "min_text_length" => 1, "max_text_length" => 255],
                ],
                [
                    'label' => __('* Address Line 1'),
                    'component' => 'Magento_Ui/js/form/element/abstract',
                    'config' => [
                        'customScope' => 'shippingAddress',
                        'template' => 'ui/form/field',
                        'elementTmpl' => 'Magento_Ui/form/element/checkout-input'
                    ],
                    'dataScope' => '1',
                    'provider' => 'checkoutProvider',
                    'validation' => ['required-entry' => false, "min_text_length" => 1, "max_text_length" => 255],
                ]
            ]
        ];

Thanks!


texts: Can't get getExceptionTraceAsString() to work. Errors still truncated. Magento 1.9 CE

texts:
I followed Steve's post here to try to show the full MySQL query in the log, instead of it being truncated, like this: ('INSERT INTO `fa...', Array)

I've triple checked the process, but it isn't working. Is there anything additional that needs to be done to achieve this?


texts: get ordered product amount since a specific date

texts:
currently I have got a function that is delivering me the sold amount of any given product id, but I would like to add another filter to it. It should just take all products that have been sold today

Here my code so far:

public function getOrderAmount($productId) {
    $product = Mage::getResourceModel('reports/product_collection')
        ->addOrderedQty()
        ->addAttributeToFilter('entity_id', $productId)
        ->setOrder('ordered_qty', 'desc')
        ->getFirstItem();
    return (int)$product->ordered_qty;
}


texts: How can I install Magento on Ubuntu 16.04 XAMPP with PHP version 7.1.1?

texts:
I'm totally new to Magento. I'm trying to install Magento 2 Community Edition on my XAMPP on Ubuntu 16.04 that having PHP version 7.1.1.

It gives an error :

  PHP Version Check Your PHP version is 7.1.1. The required PHP version
  is ~5.6.5|7.0.2|7.0.4|~7.0.6. Hide detail Download and install PHP
  from www.php.net using this PHP Documentation. For additional
  assistance, contact your hosting provider.

Is there any way to install Magento with this configuration ?

Edit :
My question is regarding PHP version, and with current PHP version is it possible to install Magento, or I've to downgrade it. is my question ?

Any kind of help is Appreciated. Thanks in advance.


texts: Magento 2.2.3 - Full text filter not working for sales order grid

texts: The full-text search filter is not working for sales order grid. Other filters are working correctly for sales order grid.


texts: Tax on Reseller commission and separate invoice

texts:
A client asks if it is possible to give resellers a commission and to charge Tax on that commission. They want to show the commission and the tax charged on the commission on the invoice. This needs to be a separate invoice only for resellers.

The invoice will show:

Travel price: € 1000
Commission (8,00%): € 40
Tax on commission (19%): € 7.60

I got a couple of questions which I hope someone can answer:

What is the best way to give resellers commission in Magento?
Is it possible to charge tax on that commission?
Is it possible to send resellers a seperate invoice?


texts:
I've got a question about making an extremely minor change within a .phtml file on 1.9. I've gone through the RWD guide here: http://www.magentocommerce.com/knowledge-base/entry/ee114-ce19-rwd-dev-guide#theme, and something isn't quite clicking in my head. I get the basic process for making a small change in a .phtml file: Create a module, define a new layout file, copy a default layout file into the new one, update the line that points at the .phtml file with a new .phtml file, copy the phtml file to a new location and make your updates there. That general process makes sense to me.

Here's the part I'm not getting: I've done all that, and it seems to have broken all the css. Mind you, I'm a backend dev, and try to stay out of CSS and JS as much as possible. I really have no need to update anything but php and phtml files. All I want to do is make one minuscule update to product pages. However, I'm still finding answers online that tell me I need to be copying EVERYTHING from the RWD theme into my new theme, all the styles, the JS, images, etc, and the fact that my CSS all broke when I didn't copy it all over from RWD seems to back that theory up. I'd really like to avoid having to make a whole huge production out of a minor change. Am I wrong? Do I not have to copy anything but what I'm planning on updating?

Second, the part about 'setting your theme' in the backend. I understand that if I so choose, I can create a whole custom theme with my own styles and JS and all that jazz, and then set it as the site theme in the backend. What I don't get is all that work is required if all I need to do this to make a small text update on product pages. It feels like a TON of labor to update the text on, say, the add to cart button on product pages. It feels like there should be a simpler way (though I know Magento hates being simple!)

I also don't quite understand how multiple modules can make template updates if a 'theme' has to be set in the backend. What if I have 10 different modules that each make a tiny template update somewhere on the site? Surely I can't set 10 different modules as my theme. So there has to be a simpler way of doing this than creating a whole custom theme. Recall that I'm a backend developer, so the word 'theme' in general sounds like an overwhelming amount of convolution to people of my persuasion.

Hopefully my rambling makes sense and my questions aren't too dumb, but as we all know Magento isn't a beast that's well documented, so best practices are often difficult to figure out.


texts: how to set different prices to a magento configurable product in assoiciated product?

texts:
i am new to magento and i have referred too much magento tutorials for configurable product with associated product and super attribute but still my issue is not fixed,so i have asked this question.please i need help.

i wants to make a configurable product like,
tshirts having 2 attributes as color and size,
tshirt product with $20 with size 28,30,32 having color red,green,blue but i wants to make different price for only one associated product tshirt with size 30 having color blue as $25(+ $5 more than any other combinations). how can i do this??

i have created all combinations of associated products for attribute color and size and i have also change the price of that assoiciated product tshirt size-30 having color-blue as $25 but it not showing in store it shows price of configueable product. please help...


texts:
My magento store has products around 30000.

Everytime When i upload/update new product, i have to reindex the whole store which takes very huge time.

So basically i would like to have a php script or any method which reindex all the indexes of a particular single product.

Is there any defined script/method to achieve?? please help.


texts: How to get the name of the product finally added to cart

texts:
I want the name of the product which was finally added to the cart.

$productID=Mage::getSingleton('checkout/session')->getLastAddedProductId(true);
$_product=Mage::getModel('catalog/product')->load($productID);
$session= Mage::getSingleton('checkout/session');
foreach($session->getQuote()->getAllItems() as $item)
{
    $productID = $item->getProductId();
    $productSku = $item->getSku();
    $productName = $item->getName();
    $productQty = $item->getQty();

}

I found some code like this, but it does not works as the way in which I need. This returns the set of all products in the cart.

If a product already in cart is added to cart again, this code does not give the correct output.


texts:
I want to load customer collection by email and mobile but not general group

for email load

 $customer = Mage::getModel("customer/customer")->loadByEmail($customerEmail);

for mobile

 $customer = Mage::getModel("customer/customer");
 $customerCollection = $customer->getCollection()
                       ->addAttributeToFilter('mobile', $query)
                       ->getFirstItem();
 $entityId =  $customerCollection->getEntityId();


texts: Magento v. 1.9.2.4 - MYSQL Table core_email_queue still empty after Updates

texts:
got a strange Problem here in my Magento Installation.
My Cron Job is running with AOE_scheduler - works fine. Cron Job is running.
Screenshot:

My MYSQL Table is still empty - no e-mails where send through the backend. no order mails, no cutsom messages to customers. nothing.

MYSQL Tables core_email_queue and core_email_queue_recipients are still empty.

Someone got an Idea what is wrong in my Magento Installation?

Thanks!!!
louis88

EDIT:
Found this in the exception.log File:

2016-05-11T17:08:21+00:00 ERR (3):
exception 'Zend_Mail_Protocol_Exception' with message 'Could not read from smtp.strato.de' in /pages/3b/7f/d0009998/home/htdocs/magento/lib/Zend/Mail/Protocol/Abstract.php:385
Stack trace:
#0 /pages/3b/7f/d0009998/home/htdocs/magento/lib/Zend/Mail/Protocol/Abstract.php(415): Zend_Mail_Protocol_Abstract->_receive(300)
#1 /pages/3b/7f/d0009998/home/htdocs/magento/lib/Zend/Mail/Protocol/Smtp.php(199): Zend_Mail_Protocol_Abstract->_expect(220, 300)
#2 /pages/3b/7f/d0009998/home/htdocs/magento/lib/Zend/Mail/Transport/Smtp.php(200): Zend_Mail_Protocol_Smtp->helo('localhost')
#3 /pages/3b/7f/d0009998/home/htdocs/magento/lib/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#4 /pages/3b/7f/d0009998/home/htdocs/magento/lib/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#5 /pages/3b/7f/d0009998/home/htdocs/magento/app/code/local/Aschroder/SMTPPro/controllers/Smtp/TestController.php(136): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#6 /pages/3b/7f/d0009998/home/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Aschroder_SMTPPro_Smtp_TestController->indexAction()
#7 /pages/3b/7f/d0009998/home/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#8 /pages/3b/7f/d0009998/home/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#9 /pages/3b/7f/d0009998/home/htdocs/magento/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#10 /pages/3b/7f/d0009998/home/htdocs/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#11 /pages/3b/7f/d0009998/home/htdocs/magento/index.php(83): Mage::run('', 'store')
#12 {main}


texts: RapidFlow Import Error: Empty or invalid product type for a new product

texts:
I'm trying to do a product import of some downloadables into Magento via RapidFlow. Their documentation is less than stellar, and I can't seem to figure out how to get rid of this error: Empty or invalid product type for a new product. My understanding was that the Type Alias column of the Import Columns tab was the value you use in tow 1 in your csv. My very first cell in my CSV (A1) is product.type

In the Import Columns tab I've added Product Type [product.type], with the alias product.type to match my CSV. So how come I keep getting the same error for every row? Every row has a value of downloadable for the product.type. I think if I can figure out this column, I'll be able to figure out all the other ones I have errors on.

Help greatly appreciated!


texts: Modals - How to specify custom template for modal

texts:
How can I specify an custom template for an modal? I tried to specify the type and customTemplate, but no luck.
The template file is called modal-gallery.html and is placed on the same path as the modal-popup.

var modalOptions = {
    type: 'gallery',
    customTpl: 'gallery'
};
jQuery('<div />').modal(modalOptions).modal('openModal');


texts: Magento 2: More Information Tab Attribute order

texts:
Is it possible to change the attribute order in More Information Tab.

Please refer the screen shot below:

I want to rearrange order to USP/Features/Benefits. Please help.


texts: Excluding block from cache is not working

texts:
We have installed Varnish v4 on our server to improve the Magento response time (we have installed the Turpentine extension as well to manage varnish). I am currently working on excluding cache for certain blocks however nothing is working for me.

In the before_body_end, I have this code:

    <reference name="before_body_end">
                <block type="core/template" name="compare.products"
                        template="page/html/compare-products.phtml" />
    </reference>

I have modified the turpentine_esi.xml and added the following code which to me seems correct however the block is still being cached:

<default>
         <reference name="compare.products" type="core/template">
             <action method="setEsiOptions">
                <params>
                    <access>private</access>
                </params>
                <flush_events>
                    <catalog_product_compare_add_product/>
                    <catalog_product_compare_remove_product/>
                    <catalog_product_compare_item_collection_clear/>
                </flush_events>
             </action>
          </reference>
<default>

Is someone able to point me in the right direction? I am currently at a loss to why this code is not working.


texts: FedEx shipping calculation disappearing when ordering more than four tires

texts:
We're experiencing an odd issue with our Magento store: the calculated shipping price disappears when ordering more than four tires for some reason. This is such an odd issue, I'm not even sure where to start.

Here's how to replicate:

Go to http://tagmotorsports.com/pirelli-trofeo-r-991-gt3-458-speciale-488 and add two of each tire to the cart.
Estimate the shipping and tax by entering in a country, state and zip code.
It will return a shipping quote for four tires just fine.
Change the quantity of tires to anything beyond four and update the cart.
The FedEx shipping quote disappears.

I think it may have something to do with input settings, but I'm not even sure where to start at this point. Looking through the FedEx shipping method settings didn't reveal anything immediately that might be contributing to this issue.

Any help will be super appreciated. Thanks.


texts:
I have a magento 1.9.1.2 installation and from some browsers, right after clicking  shipping rate button in one page checkout, the page redirects to cart page. When I checked console it showed 499:Request has been forbidden by antivirus error.

How can I fix this error


texts:
I have created some order statuses.
One order status is a backend status.

Is it possible to hide this status from the frontend?

As example say you have status A and status B.

First you assign status A and a few days later you assign status B witch is only for backend users visible.

Customers who are logged in should see status A as active status instead of status B.


texts: Want to display all images as base no thumbnail required

texts: I want to display all images as base images ie (big in size) dont want to display thumbnail images how can i do this ?


texts: Error when saving configuration in Magento 2

texts:
I've been trying to add a system.xml configuration file to a Magento 2 module but I'm getting this error:

Fatal error: Call to undefined method Magento\Config\Model\Config\Structure\Element\Field\Interceptor::shouldCloneFields() in /Users/mludd/Sites/magento2.pippin.pantburk/vendor/magento/module-config/Model/Config.php on line 211

From what I can tell the method shouldCloneFields() does in fact not exist in that class but the question I have is, am I doing something wrong or is this a bug? The method seems to be declared in another class but I can't even seem to find the Interceptor class referenced in the error.

This is what my system.xml looks like:

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

        <tab id="dummymodule" translate="label" sortOrder="100">
            DummyModule
        </tab>

            DummyModule
            <tab>dummymodule</tab>
            <resource>Mludd_DummyModule::config_dummymodule</resource>

            <group id="first" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                First
                <field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    Enabled
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>
            <group id="second/id" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                Second
                <field id="enabled" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    Enabled
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>

    </system>
</config>


texts: How much traffic a Magento 2.2 can handle on VPS with 2 GB RAM with! CPU core?

texts:
To run properly for few users or development and testing shared hosting is enough for Magento 2.2.

But if go further and run Magento 2.2 on VPS.
How much traffic magento 2.2 can handle on VPS with 2GB RAM and 1 Core CPU  (Basically Godaddy - Launch plan VPS)?

Or should we need to go higher version of VPS or Dedicated Server (I know dedicated server is not required in starting.


texts: Customize Invoice - Add email to ship to area

texts: I am attempting to add the customer email address to "address information"  area of the invoice.  Under Bill To information would be great.  Essentially adding email under telephone number.


texts: I'm working with magento2,i want custom field drop down city with dynamic data for checkout page in magento2.


texts: Magento2 : How to override FinalPrice.php file in Magento2

texts:
I want to override

  vendor/magento/module-catalog/Pricing/Price/FinalPrice.php

with constructor argument.

  Note : File overriding is working fine but when I create constructor in the overridden file it is giving me an error.


texts: Magento2: Created Date search result wrong in french but right in English admin site

texts:
I have create a custom module for creating the orders report.Add Created Date TO 2 FROM Filter its working fine in English language .
like :
But when i change Interface Locale french :

Then created Date TO 2 from filters not working properly :

Please elaborate the issue.
i have add Created Date column

        $this->addColumn('created_at', ['header' => __('Created Date'), 'index' => 'created_at','type'=>'date','filter_index' => 'main_table.created_at']);


texts: how to check if product has a shopping cart rule or not in magento 2

texts:
I have tried these

$currentDate = $this->_stdTimezone->date()->format('Y-m-d');
        $rules = $this->collection->create()
                        ->addFieldToFilter('is_active', 1)
                        ->addFieldToFilter('from_date', ['lteq' => $currentDate])
                        ->addFieldToFilter('from_date', ['neq' => 'NULL']);
        $product = $this->_coreRegistry->registry('product');
            foreach ($rules as $rule) {
            try {
                if ($rule->getActions()->validate($product)) {
                        $activeRules[] = $rule;

                }
            } catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
                continue;
            }
        }
        $rulesApplied = "";
        foreach ($rules as $rule) {
                $code = $rule->getCode();
                $rulesApplied .= "".$code.""."
";
        }
        return $rulesApplied;

but i am getting all the rules which are satisfying the given conditions.I need only the rules which are applied to a products.


texts: Magento edit form fieldset - get value of select dropdown into a label

texts:
I am working on an edit screen for my grid row. This is what I have so far for this form:

<?php

class Intellibi_Integration_Block_Adminhtml_Manageasendiapickinglists_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
{
    protected function _prepareForm()
    {
        $form = new Varien_Data_Form();
        $this->setForm($form);

        $fieldset = $form->addFieldset('integration_form', array(
            'legend' => Mage::helper('integration')->__('Asendia Pick Information')
        ));

        $fieldset->addField('order_number', 'label', array(
            'label' => Mage::helper('integration')->__('Order Number'),
            'name' => 'order_number'
        ));

        // snipped

        $fieldset->addField('pick_status', 'select', array(
            'required' => false,
            'class' => 'required-entry',
            'label' => Mage::helper('integration')->__('Pick Status'),
            'name' => 'pick_status',
            'values' => Mage::getSingleton('ibi/asendiapickstatus')->getOptionArray(),
            'readonly' => 'readonly'
        ));

        // snipped

        return parent::_prepareForm();
    }
}

This produces the following output in the admin backend:

What I would like to do is change the pick_status column from a select to a label. When I do this, instead of showing the status value "New" it shows the array index like this:

My option array for asendiapickstatus is defined like this in my model:

class Intellibi_Integration_Model_Asendiapickstatus extends Varien_Object
{
    const PICK_STATUS_NEW       = 1;
    const PICK_STATUS_SENT      = 2;
    const PICK_STATUS_SHIPPED   = 3;

    static public function getOptionArray()
    {
        return array(
            self::PICK_STATUS_NEW       => Mage::helper('integration')->__('New'),
            self::PICK_STATUS_SENT      => Mage::helper('integration')->__('Sent'),
            self::PICK_STATUS_SHIPPED   => Mage::helper('integration')->__('Shipped')
        );
    }
}

So my question is; on the edit form fieldset builder, how do I show the dropdown field "pick_status" value, rather than the current index it's at? So the output will say "New" instead of "1" as shown above. Will I need a custom renderer?


texts: add carrier field dropdown field in order grid magento

texts:
i am adding the form field through the observer but cannot able to post form field on mass action below my code

public function render(Varien_Object $row)
{

    $orderdata=Mage::getModel('sales/order')->load($row->getEntityId());

        $value .='Carrier:';
        $value .='<select name="carrier'.$row->getEntityId().'">';
        $options=$this->getCarrierOption();
        foreach ($options as $option) {
            $value .='<option value="'.$option['value'].'">'.$option['label'].'</option>';
        }
        $value .='</select>';
    return $value.$valyee;
    }
}

any help will be appreciated.


texts:
Magento2 how can I redirect following contact URL to another
contact-us/?id=104972   >> contact/


texts: Magento 2 Configurable Product REST API add to cart?

texts:
Hi I am trying to add configurable product add to cart using REST API in magento 2.1.8. but its getting

  {
      "message": "You need to choose options for your item." }

Note:- For logged in users i am trying to add.

{
   "cartItem": {
      "quote_id": "308",
      "sku": "WSH12",
      "qty": "1",
      "product_option": {
         "extension_attributes": {
           configurable_item_options [
               {
                  "option_id": "",
                  "option_value": ""
               }, {
                  "option_id": "",
                  "option_value": ""
               }
            ]
         }
      }
   }
}

Screen shots:-

Please clarify how to consider option_id an option_value?
what exact values need to consider as per this example?
Is it default magento 2 api issue?


texts: shipping address is missing out on checkout

texts:
I don't know why but i get an error js on checkout.
When I'm on the payment step, The shipping address Below the choice of method of payment is absent.
The problem come from an error with Knockout.
Nevertheless i refresh cache, deploy static files, delete folder pub/static but I still have the problem

I inspected with firebug and find this error there :

TypeError : $parent.getCode is not a function

I searched the forum but found nothing

Here is the capture of the step of payment and firebug :

Would anyone have an idea?
Thanks for your help


texts: How can I increase product names length in pdf?

texts:
Magento version 1.9 and in pdf I want to increase the length of product name please give me the solutions.
Please share path of pdf where we need to do changes

This is the link of our web site

  http://youstorehk.aquaspade.cloud/

i am using Magento 1.9 ver need to increase product name length in pdf


texts: magento 2 data migration : Integrity Check failed

texts:
i did setup of magento 2 i all wen well i started data migration using below command :

php /var/www/html/bin/magento migrate:data --reset etc/ce-to-ce/1.9.2.4/config.xml

now it stopped with error

Source fields are not mapped. Document: sales_flat_order. Fields:
adj_sku,adj_product

Can you please guide what to do to fix it


texts:
I'd like to know how to edit an existing column in the orders grid.

For example, I've added my own columns using an observer by joining the sales_flat_order_grid table with the sales_flat_order table to get the fields I need. However, if I try to filter based on the increment_id, then the filter fails because it is coming across an ambiguous field since both tables have that same field.

I'm trying to add a "filter_index" with the value "main_table.increment_id" to that column. So I'm able to use an event observer to grab the block based on the "core_block_abstract_to_html_after" event but I think this event is fired too late for the filter to actually be set. Also, I tried the "core_block_abstract_prepare_layout_before" event but the column doesn't exist at that point.

What other event can I use?

Note: I've tried rewriting the sales grid with my own and I'm able to get this working via the following code in the _prepareColumns() method but I'm trying to do it via the observer since that won't conflict with any other extensions:

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

    $this->addColumnAfter('custom_column', array(
        .....
    ), 'shipping_name');

    $this->getColumn('real_order_id')
        ->setData('filter_index', 'main_table.increment_id');

}

Thanks.


texts: Add custom link to top link next to My Account in magento 1.9

texts:
this is my config file in etc\module :

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

then added this code in app\code\local\net\Toplinks\etc\congif.xml

<?xml version="1.0"?>
<config>
<modules>
    <Net_Toplinks>
        <version>0.0.1</version>
    </Net_Toplinks>
</modules>
<global>
    <blocks>
        <net_toplinks>
            <class>Net_Toplinks_Block</class>
        </net_toplinks>
    </blocks>
</global>
<frontend>
    <layout>
        <updates>
            <net_toplinks>
                <file>net_toplinks.xml</file>
            </net_toplinks>
        </updates>
    </layout>
</frontend>
 </config>

Added block file as block\Stores.php

<?php
class Net_Toplinks_Block_Stores  extends Mage_Core_Block_Template {
public function addCustomLinks()
 {
    $parentBlock = $this->getParentBlock();
    if ($parentBlock )
    {
        $text = 'casa';
        //Top link Display Text
        $url = ‘testmodule’;
        $position = 3;
        $parentBlock->addLink($text, $url , $text, $prepare=true, $urlParams=array(), $position , null, 'class="top-link-testmodule"');
    }
    return $this;
}
}
?>

& finally added this in mycustom-theme folder under \app\design\frontend\net\custom-theme\layout\net_toplinks.xml

<?xml version="1.0"?>
<layout>
<default>
    <reference name="top.links">
        <block type="net_toplinks/stores" name="stores_links">
            <action method="addCustomLinks"></action>
        </block>
    </reference>
</default>
</layout>

Still no link is shown in top links. Currently it shows link in Myaccount dropdown.I want link outside dropdown next to or before Account.


texts: How to sort the product collection by a custom parameter?

texts:
In my file, the $ranking of each product is an integer numeric value derived from a particular formula.

$productCollection = Mage::getModel('catalog/product')
     ->getCollection();

foreach($productCollection as $product){
     $ranking = formula; //integer numeric value
}

I want to sort the products according to the $ranking.What should I do?


texts: How do I remove the Add to Cart button from Wishlist based on specific products?

texts:
I have already removed the "Add to Cart" button from both the Product Detail page and the Product List/Grid Page based on an attribute.

I now need to be able to remove the button from Wishlist and compare for those specific products based on an attribute, but can't find the button construction anywhere for these two pages.

I would appreciate any help.


texts: Add to cart attribute validation for configurable products?

texts:
I have two attributes used on my configurable products.

I have seen other Magento sites that have a warning appear if you try to click the Add to cart button before selecting all attributes.  Is this standard Magento behaviour? If so why does mine not do it?

I am using 1.9 and if I do not choose the attributes (I am using swatches) and i click the Add to cart button, noting happens.


texts: sales_order_save_after Observer is preventing the order from saving

texts:
I created a module that changes a customer's group if their order is completed. I'm using magento 1.9.3.1 and my module is causing some problems when checking out as a guest.

In one example, checking out returns an error to the customer saying "Customer email is required". The order email is sent and the payment is processed but the order is not actually saved in the database. The customer is returned the error "Customer email is required" on the checkout page as if the order/payment hasn't gone through.

I've disabled the magestore onestepcheckout/giftcard extensions I'm using and the problem persists. I've disabled my template to confirm that's not related to the issue.

My setup file (app/etc/modules/EXAMPLE_ApproveCustomer.xml)

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

My config file (app/code/local/EXAMPLE/ApproveCustomer/etc/config.xml)

<?xml version="1.0"?>
<config>
    <modules>
        <EXAMPLE_ApproveCustomer>
            <version>1.0.0</version>
        </EXAMPLE_ApproveCustomer>
    </modules>
    <global>
        <events>
            <sales_order_save_after>
                <observers>
                    <EXAMPLE_approvecustomer_model_observer>
                        <type>singleton</type>
                        <class>EXAMPLE_ApproveCustomer_Model_Observer</class>
                        <method>updateCustomers_SalesOrderSaveAfter</method>
                    </EXAMPLE_approvecustomer_model_observer>
                </observers>
            </sales_order_save_after>
        </events>
    </global>
</config>

My observer file (app/code/local/EXAMPLE/ApproveCustomer/Model/Observer.php)

<?php
class EXAMPLE_ApproveCustomer_Model_Observer {
    public function updateCustomers_SalesOrderSaveAfter(Varien_Event_Observer $observer) {
        // set group for approved customers
        $approved_group = 6;

        // load order being updated
        $order = $observer->getOrder();

        // check if order is complete
        if(($order->getState() == Mage_Sales_Model_Order::STATE_COMPLETE) || ($order->getStatus() == "complete")){
            // get customer id
            $customer_id = $order->getCustomerId();

            // get customer
            $customer = Mage::getModel('customer/customer')->load($customer_id);

            // update group
            $customer->setGroupId($approved_group)->save();
        }
    }
}
?>


texts:
I am moving a store from GO to CE.  I've exported the products to a csv.  My issue is that the original store has leading zeros on the skus but when I open up the csv in Excel it kills the leading zeros.  I need to edit the top row attributes but when I do the zero issue comes up.

Is there a way to fix that?  There are only 2000 skus but I'd rather not go cell by cell.


texts: Magento 1.7.0.2 - Subtotal and grand total doubled in cart

texts:
A few customers have complained that they are getting subtotal and grand total prices that are double of what they should be. After some tests, I've found that when a user adds a product to cart, go to checkout, then changes his mind and removes the item from the cart - the next time he will add a product to the cart, the subtotal and grand total prices will get doubled. It happened only in IE and Firefox, not in Chrome.

I've found this post: https://web.archive.org/web/20150227130454/http://www.magentocommerce.com/boards%20/viewthread/227560/P0/

I've checked the DB table sales_flat_quote_address and saw there were quote ids that had more than one shipping and billing address.

I implemented the solution that is shown in this post: https://web.archive.org/web/20150227035906/http://www.magentocommerce.com/boards%20/viewthread/227560/P15/#t393997

and the price is no longer getting doubled in the situation I described above.

The problem is that since this fix I still get occasionally a complaint from customers about the price being doubled and I see the same situation in the DB table sales_flat_quote_address, but I can't reproduce this issue so I don't know when it happens.

Any ideas what I can do?


texts: How to add custom js & css for specific pages

texts:
I trying to add custom js & css  only for all category pages.

I create a local.xml file  at app/design/frontend/package/theme/layout/local.xml
& add this code inside it.

< ?xml version="1.0"?>
<layout version="0.1.0">
     <catalog_category_default>
         <reference name="head">
             <action method="addItem">
                  <type>skin_js</type><name>js/myjavascript.js</name>
             </action>
             <action method="addItem">
                   <type>skin_css</type><name>css/mycss.css</name>
             </action>
         </reference>
     </catalog_category_default>
</layout>

But I don't get that files in head section. So my question is how to add custom css & js files for all category pages ?


texts: How do I ensure that all links on my Magento site use the correct base URL

texts:
I get my localhost URL of my Magento store on some parts of my site

So when I open the website (now on a live server) I get the URL I want but when I check links in my footer I'll get the localhost URL (from my home pc where I created the store).

The sites are loading correctly but I don't want my Localhost URL show in the browser navigator. How can I fix this ?


texts: Error : Source Model not found while creating a new attribute in customer entity

texts:
I wrote a simple sql upgrade script to add a custom attribute to the customer table.
My script :

<?php
$installer = $this;

$installer->startSetup();

$installer->addAttribute('customer', 'whatsapp_active', array(
    'type'       => 'static',
    'input'      => 'boolean',
    'label'      => 'Is Customer Active',
    'default' => '1',
    'visible' => true,
    'required' => false,
    'user_defined' => true,
));

Mage::getSingleton('eav/config')
    ->getAttribute('customer', 'whatsapp_active')
    ->setData('used_in_forms', array('adminhtml_customer'))
    ->save();

$installer->endSetup();

I get the error  :

a:5:{i:0;s:57:"Source model "" not found for attribute "whatsapp_status"";i:1;s:2983:"#0 /var/www/html/fresh/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(387): Mage::exception('Mage_Eav', 'Source model ""...')
#1 /var/www/html/fresh/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(201): Mage_Eav_Model_Entity_Attribute_Abstract->getSource()

Now, even when I have removed the file, then also I get the same error.

PS : I have changed, my core_resource table code customer_setup versions accordingly.

So, what is the thing which I am missing?


texts: Dividing two attributes together with the result showing as a third attribute

texts:
trying to divide two attributes by each other to get the value of Price Per unit.

 <?php echo $this->escapeHtml( $_item->getFinalPrice() / $_item->getPackSize()) ?>

Not sure what im missing but it shows blank on the frontend. any help is appreciated.

Simplified: When i enter a Price and I enter the custom attribute "Pack Size" and save the Price per piece should populate automatically.

Price / Packsize = price per piece


texts:
I want to apply some logic when displaying a category depending on the category layout.
The logic should be applied if the category has a custom layout applied i.e. 1 column
I can get the category data i.e. name in my template with $_category->getName() how can I get the name of the layout currently applied to the category?
Is it also possible to detect the category mode i.e. products only, static block only etc. ?


texts:
When I do an export of my products and open this .csv list in excel and add the new products, i always recieve a error regarding the SKU
See image below.


texts:
how can i get sales report based on customer group

Bacially i want to add extra filter customer group to amdin > report > sales > order

How i can do it pls help , if possible via module observer will be helpful


texts: a GOOD way to extend the function getAddressesHtmlSelect() in Onepage\Abstract.php

texts:
I want to filter the addresses in the checkout process. For that I have to overwrite the function getAddressesHtmlSelect() in app\code\core\Mage\Checkout\Block\Onepage\Abstract.php

One way would be: take the file Abstract.php out of core into local. But that is a very dirty way, and I am not sure if I could just take out one file or if I had to take the hole Checkout module into the local folder? (that as a small side question)

What I search is a clean and good way to do what I want to do.

Can you lead me in the right direction?


texts:
i'd like to know, how i can remove the most recent category from the URL.
The structure looks for example like following: "/parentCategory/subCategory/"

Now, after pressing a button i want to get back to the "parentCategory" and therefore removing the "subCategory" from the URL.
Does magento provide something out of the box?


texts:
We are updating and changing our site, so we do a lot of config in the backend

But the backend is so incredibly slow (we have APC for both OPCODE and CACHE)

Is there a way to speed up the backend significantly?


texts: Magento 2 categories at layered navigation

texts:
In Magento 2 all the subcategories aren't showing in layered navigation. I am having categories structure for 4th level. If any 3rd categories having sub categories along with products - then it isn't showing at layered navigation.

Is there any settings available for same? Highlighted categories aren't showing in left from screenshot.


texts:
I have created new project using

npx @magento/pwa-buildpack create-project ./projectname \
--name @magezilla/projectname \
--template venia-concept \
--backend-url https://127.0.0.1/projectname/

How can I override packages/venia-ui/lib/components/Logo in my project ?
I have added in /projectname/src/components/Logo and update logo but this is not working


texts:
i open this topic for a problem that is generate in exception.log

2016-03-25T15:25:07+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Blog_Block_Blog' in /var/www/vhosts/higift.it/httpdocs/upgrade/app/Mage.php:595
Stack trace:
#0 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('blog/blog', Array)
#2 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('blog/blog', 'blog.custom')
#3 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('blog/blog', 'blog.custom')
#4 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Cms/Helper/Page.php(113): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'toronto_homepag...')
#9 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'toronto_homepag...')
#10 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#11 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#12 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /var/www/vhosts/higift.it/httpdocs/upgrade/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#14 /var/www/vhosts/higift.it/httpdocs/upgrade/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 /var/www/vhosts/higift.it/httpdocs/upgrade/index.php(83): Mage::run('', 'store')
#16 {main}

I tried to delete the block of blog but without success. Where it could be the problem?

Thank you.


texts: First time user. Just installed on InMotion Hosting VPS. Front displays OK, bu the admin area is a mess (see attached) and I can't go anywhere.


texts:
Talking about Default Field Values, I'd like to intercept and edit those autogenerated values.
I'd like to do this for:

Sku
URL key

E.g.
Product name: My Beautiful Product
Autogenerated SKU: m-btfl-prdct
Autogenerated URL key: my-beautiful-product-download

How can I achieve this?
I tried to edit Magento_Catalog/js/components/import-handler
Located in: vendor/magento/module-catalog/view/adminhtml/web/js/components/import-handler.js
but without any result.


texts:
I have got very late order-related mail for some customer what can I do any have an idea for same?
I have checked with the same email address with custom PHP mail function then it will working but when the order place customer get late mail after 30 minute
I have noticed,  Mail received properly for Indian customer but UK customer get late mail
Thank you in advanced.


texts:
I'm integrating Varnish for my site Magento ver 2.3 with the web server using Nginx.

During learning varnish, I encountered some problems:

When a request is sent to the server, where is the Varnish's cache stored?
Where does varnish's cache come from?

Thanks, everyone for reading.


texts: Pub folder html file: serving from nginx + CDN and CORS

texts:
In my pub/static folder I can see that most themes are serving HTML files.

However, these are not specifically handled in the Nginx configuration file.
When serving the full folder from CDN I get CORS issues.

Is it a good idea to allow CORS on HTML files?

add_header 'Access-Control-Allow-Origin' '*' 'always';

Or should I add behavior in my CDN that excludes *.html from being cached in the CDN?


texts: give custom roles for administrator only ,so problem in displaying other menus in admin panel

texts:
i went  to system > configuration > users .

i select "Administrators" and than "custom" than i selected some dashboard", newsletter and click on save.

now when i open admin panel with administrator, its showing only "dashboard" and "sales" and "system"

menu. please help me to find how to get back the other menus in admin panel.


texts: Product quantity not saved when EAV cache enabled - Magento 2

texts:
When I'm trying to change the quantity of a product in the admin, it will not be stored in the database. This problem only occurs when the EAV cache is enabled.

The quantity input field has the name: "product[quantity_and_stock_status][qty]". If I save the product, javascript will create a new hidden input field with the name "product[stock_data][qty]". After saving the product, there will be a page refresh. After that page refresh, there is a POST request visible in the Network tab from my Chrome Developer Tools.

When I check the Request Payload in the tab Headers, both input field values are visible, I see the quantity_and_stock_status:

    Content-Disposition: form-data; name="product[quantity_and_stock_status][qty]"
    1700

And I see the stock_data:

    Content-Disposition: form-data; name="product[stock_data][qty]"
    1500

1700 is the value that I entered in the quantity field, but the value didn't change in the database, so it sets the old value (1500) in the input field:

When I check the page source (after the page was saved), the JSON of the product form data contains quantity_and_stock_status and stock_data. But now the values are both 1500.

"product_form_data_source": {
  "type": "dataSource",
  "name": "product_form_data_source",
  "dataScope": "product_form",
  "config": {
    "data": {
      "product": {
        "status": "1",
        "name": "Target Power Star Air G3 Black",
        "sku": "330800",
        "price": "1.07",
        "tax_class_id": "4",
        "quantity_and_stock_status": {
          "is_in_stock": 1,
          "qty": 1500
        },
        "attribute_set_id": "11",
        "current_product_id": "1878",
        "stock_data": {
          "item_id": "1868",
          "product_id": "1878",
          "stock_id": "1",
          "qty": 1500,
          "min_qty": 0,
          "use_config_min_qty": "1",
          "is_qty_decimal": 0,
          "backorders": 2,
          "use_config_backorders": "1",
          "min_sale_qty": 1,
          "use_config_min_sale_qty": "1",
          "max_sale_qty": 10000,
          "use_config_max_sale_qty": "1",
          "is_in_stock": 1,
          "low_stock_date": null,
          "notify_stock_qty": 1,
          "use_config_notify_stock_qty": "1",
          "manage_stock": 1,
          "use_config_manage_stock": "1",
          "stock_status_changed_auto": "0",
          "use_config_qty_increments": "1",
          "qty_increments": 0,
          "use_config_enable_qty_inc": "1",
          "enable_qty_increments": 0,
          "is_decimal_divided": 0,
          "website_id": "0",
          "type_id": "simple",
          "min_qty_allowed_in_shopping_cart": "1"
        }
      }
    }
  }
}

(This is only the relevant info of the JSON)

Has anyone encountered this problem or could this be a Magento bug?


texts:
Can grouped products be added to a category? For some reason it doesn't allow me to (I've sorted by type so 'grouped' should be first alphabetically):

Am I missing something really obvious?

EDIT:

I've removed all the products from this category and added a grouped product via the database.  It doesn't show in the back end (although the count says 1) however it displays on the front end:

Why is this??


texts: Magento 2: How to show the number of cart items in a custom phtml using KnockoutJS?

texts:
I'm trying to get total number of cart items in my custom_header.phmtl. But I'm unbale to get the result.

I've tried using KnockoutJS. I added minicart UI component to my block, which allowed me to display the summary_count variable.

My XML looked something like this:

        <block class="Magento\Framework\View\Element\Template" name="custom_header" as="custom_header" template="Magento_Theme::html/custom_header.phtml" before="-">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="my-item-count" xsi:type="array">
                            <item name="component" xsi:type="string">Magento_Checkout/js/view/minicart</item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </block>

And in my custom_header.phtml file I added these two codes,

so I can get summary count:

  <span id="HeaderCartBadge" data-bind="scope:'my-item-count'">
      <!-- ko text: getCartParam('summary_count') --><!-- /ko -->
  </span>

  <script type="text/x-magento-init">
      {
          "#HeaderCartBadge": {
              "Magento_Ui/js/core/app": <?php /* @escapeNotVerified */ echo $block->getJsLayout();?>
          }
      }
  </script>

But I'm getting this error:

[ERROR] Failed to load the "Magento_Checkout/js/view/minicart" component.

Do I need to extend minicart.js file or something else. Please help me out as I'm new in it.

Thanks.


texts: Apply all attributes of default product type to custom product type via install script

texts:
There is a way to add specific attributes to a Custom product type via install script like this:

$fieldList = array(
    'price',
    'special_price',
    'special_from_date',
    'special_to_date',
    'minimal_price',
    'cost',
    'tier_price',
    'weight',
    'tax_class_id'
);

// make these attributes applicable to products of Custom Product type
foreach ($fieldList as $field) {
    $applyTo = explode(',', $installer->getAttribute('catalog_product', $field, 'apply_to'));
    if (!in_array('coreproduct', $applyTo)) {
        $applyTo[] = 'customroduct';
        $installer->updateAttribute('catalog_product', $field, 'apply_to', join(',', $applyTo));
    }
}

Is there a way to apply ALL attributes of, let's say, Simple product (with all created and custom attributes and tabs, not known at the moment of extension installation) via install script to Custom product type? My guess would be something with LIKE statement for 'apply_to' field.


texts: How do I configure Magento 1 to work with Elasticsearch?

texts: I have installed Elasticsearch on my CentOS server, however, there is no tutorial on the web that could explain how to configure it to work with Magento 1. All tutorials available are about M2 only. Any help?


texts: Magmi importing product attributes with custom made group not taking values https://ibb.co/hUmVY9

texts:
Magmi product attributes in "custom made group" not taking values even after clearing cashes and reindexing.
https://ibb.co/hUmVY9


texts: How to call function in my controller in browser url which shows 'hello world' in magento 2.3.5

texts:
I am here trying to make a hello world message when trying to access my controller function using browser url
demomagento.com/app/code/Icosmoz/Unicenta/Controller/Adminhtml/Home/index.php

This is the path to my controller file.
In that file i have a function execute(). I have to access that function in my browser
like
http://demomagento.com/app/code/Icosmoz/Unicenta/Controller/Adminhtml/Home/index.php/execute

or any other formate of url.
please help me out... Thanks in advance


texts: How to add new or customize existing top header links in Magento?

texts:
I want to change the existing top links AND add some new.I need them to be in larger font (not default one) with icons or images before them. I read some tutorials and came to know its done by writing XML but could not find where to write XML and where to add icons and CSS classes for styling. Also tell what else needs to be done apart from adding XML.
For reference, see the example image attached with top links outlined in black line that's exactly what I am looking for. Please elaborate your answer as much as possible and mention all steps.


texts: display poll questions after buyer places an order in magento

texts:
After buyer completes transaction ("place an  order"), I want to provide an option for "survey" or "poll" about the site.

So I can know about the buyer's satisfaction about our site.


texts:
I needed to add an attribute brand to Luma theme. For this, I will have to create a new theme. I created one by extending Luma theme. I followed all the steps to extend Luma theme as described here How to extend the Luma Theme?. However, I am still not seeing the content of Luma theme. It looks like the Magento blank theme. I have followed every step adding theme.xml, reistration.php, composer.json, the etc, media,i18n & web folders & also have checked the theme table in database. I am not sure what am I missing here.
I theme folder is at app/design/frontend/Mycompany/Mytheme with capital  Ms in the folder names.However,  when I used capital letters in theme.xml, it gave me an error. I switched back to small letters there was no error , however there's no content of luma theme either.
Can anyone please point to the error?
Regards,
Sujatha


texts: What are methods I can use to display a list of all categories under main category?

texts:
I have a dropdown menu that has categories three levels deep. At the end of each dropdown column, I have a "view all" link, which I'd like to lead users to a page similar to this page:
Categories list example
Clicking on Main Category name leads you to Category landing page with a static block, whereas the "view all" linked page should contain a list of links to all categories within the main category on the dropdown.
I've edited "app/code/local/mage/page/block/html/Topmenu.php" on line 126 to contain this anchor tag:
  $html .= 'getUrl() . '" class="viewAllLink">View All';
I've been trying to make this happen for the past couple of days and I'm very stumped. I'm also wondering if this can be accomplished through phtml files. Is this possible?
Can anyone please provide me with direction as how to create functionality like this?


texts: Admin Report_Grid or Widget_Grid bootstrap

texts:
Is anyone aware of a set of command-line tools that bootstrap Widget Grid or Report Grid code in the Adminhtml module? I know the following toolkits have a lot of amazing functionality, but nothing as a quick-start for backend views.

https://github.com/alistairstead/MageTool

https://github.com/dankocherga/MTool

https://github.com/classyllama/Wiz

Is there a generator or plugins available for some of these already amazing toolkits that ease this work? Any tips for this certain someone who is sick of copying Grid.php and forgetting to rename the class?

Thanks in advance - all feedback welcome.


texts:
We have had several websites where the sales emails have not been received by the client or customer (configured in System -> Configuration -> Sales Emails).

We have no problems receiving any of them and often it's a matter of the store owner not getting the BCC/separate emails.

Does anybody have any recommendations with regards to server setup/changes in Magento to help with the reliability of sending emails?

We have looked at using AShroder's SMTP Pro module but before going down that road I'd be interested to hear opinions.


texts:
I'm running composer update command, but it's showing error, that says :

  Cannot create cache directory
  /home/111111.cloudwaysapps.com/esdasrdss/.composer/cache/repo/https---repo.magento.com/,
  or directory is not writable. Proceeding without cache Cannot create
  cache directory
  /home/111111.cloudwaysapps.com/esdasrdss/.composer/cache/repo/https---repo.magento.com/,
  or directory is not writable. Proceeding without cache Cannot create
  cache directory
  /home/111111.cloudwaysapps.com/esdasrdss/.composer/cache/repo/https---packagist.org/,
  or directory is not writable. Proceeding without cache Cannot create
  cache directory
  /home/111111.cloudwaysapps.com/esdasrdss/.composer/cache/files/, or
  directory is not writable. Proceeding without cache

I noticed here, the path should be /home/111111.cloudwaysapps.com/esdasrdss/public_html/ instead /home/111111.cloudwaysapps.com/esdasrdss/. Missing /public_html. Magento2 is installed at /public_html directory.

How to Change Composer Cache directory ?

Anyone can help to change this path accordingly ? As it doesn't have write permission at /home/111111.cloudwaysapps.com/esdasrdss/ directory.


texts:
Fatal error: Uncaught Error: Call to a member function setBodyAttachment() on null in /home/vestuv/web/vestuviniaiziedai.lt/public_html/app/code/Dipolis/Callmeform/Mail/Template/TransportBuilder.php:11 Stack trace: #0 /home/vestuv/web/vestuviniaiziedai.lt/public_html/app/code/Dipolis/Callmeform/Controller/Index/Post.php(77):

Getting error while trying to send custom email with attachment In Magento 2.3.3

Sent mail code

$fileDirectoryPath = $this->directoryList->getPath(\Magento\Framework\App\Filesystem\DirectoryList::VAR_DIR).'/tmp';

                $filePath =  $fileDirectoryPath . '/' . $_FILES['attachment']['name'];
                move_uploaded_file($_FILES['attachment']['tmp_name'], $filePath);

                try {

                if($_FILES['attachment']['name']){

                    $fileName = $_FILES['attachment']['name'];
                    $mimeType = $_FILES['attachment']['type'];

                    $transport = $this->_transportBuilder->addAttachment(file_get_contents($filePath), $fileName, $mimeType);
                }

                $transport = $this->_transportBuilder
                    ->setTemplateIdentifier('callmeform_email_template')
                    ->setTemplateOptions(['area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $storeId])
                    ->setTemplateVars([
                            'name'  => $username,
                            'phone'  => $userphone
                        ])
                    ->setFrom(['name' => $sentToName,'email' => $sentToEmail])
                    ->addTo($sentToEmail)
                    ->getTransport();

                $transport->sendMessage();

Attachment function

public function addAttachment($content, $fileName, $fileType)
    {
        $this->message->setBodyAttachment($content, $fileName, $fileType);

        return $this;
    }

public function setBodyAttachment($content, $fileName, $fileType)
    {
        $attachmentPart = $this->partFactory->create();
        $attachmentPart->setContent($content)
            ->setType($fileType)
            ->setFileName($fileName)
            ->setDisposition(Mime::DISPOSITION_ATTACHMENT)
            ->setEncoding(Mime::ENCODING_BASE64);
        $this->parts[] = $attachmentPart;
        return $this;
    }


texts:
The site that I am working on is using he_IL as primary language of the theme (I think).
I installed a plugin which only has en_US.csv its i18 folder
I added an he_IL.csv in the i18l folder, but I don't see that it is picked up in the UI.
I tried running these commands, and refresh the UI (ctrl-f5) but it is still not working.
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f en_US he_IL --language en_US --language he_IL
php bin/magento cache:clean; php bin/magento cache:flush

I checked, and the string that I want to replace is wrapped in __() inside the phtml file.
What am I missing?


texts: magento cron job is working or not? how to check?

texts:
we are using magento 1.9.0 version.

we applied catalog price rules for our products to give discounts for products.

but these special prices will disappear after some time.

is  it problem with magento cron job. if so how to check whether cron job is working or not in site.

if not working means, what's the solution.

let me know if you have any queries.


texts: Custom API adapter handler and wsdl files

texts:
I read Alan Storm article (http://alanstorm.com/debugging_magento_api_method_calls) about magento core API. And now I just a bit confused, when I creating my custom API in magento, do I have to implement adapters and handlers? If no, is it any case when I will need to do this?

Also is there any good source where would be explained how to create custom API wsdl.xml and wsi.xml files ? or full tutorial of working custom API ?

I really would appreciate if anyone could share the resources or the knowledge about creating magento custom API :)


texts: How can show website wise currency with price according to website in custom module magento 2 admin

texts:
I have multi websites in magento 2 with multi currency.
I have set up 2 currencies , one(main website) is USD and EURO is for 2nd website(france website). Base currency is USD. I have shown form in product page. Form fields are like name, email, quantity and price. I have inserted data into my custom table from front end. I have stored above fields data as well as i have saved store_id and website_id in custom table from front end.
Now, I have shown custom table data in admin gird , also i can edit data from admin as well. But price is showing in admin only with base currency(USD).
I want to show price(with currency symbol) according to website wise in admin in my custom module.
For france website want to show like - €9,877.00
For main website want to show like - $11,900.00
Do anyone have idea on this?


texts: how to install magento 1.9 premium theme to magento 1.7 live website

texts:
Is it possible to install a theme developed for magento 1.9 version to magento 1.7 version.I have lot of customization in my current magento website which is magento version 1.7.

If can how can i perform this task? Please advice me to update this theme.


texts: Get Customer custom data in product page in Magento2

texts:
I have added a custom link in My Account page, In that link I have added custom collection.
I Would like to get that custom Collection of specified customer in Product view page.

Help me great.

Thanks


texts: What if I create configurations in simple product?

texts: What will happen if I create configurations inside a simple product? Will the simple product switch into configurable product by itself?


texts: Magento 1.9 - PayPal gateway has rejected request error

texts:
Mail remainder,

  Payment transaction failed. Reason PayPal gateway has rejected
  request. A successful transaction has already been completed for this
  token (#10415: Transaction refused because of an invalid argument. See
  additional error messages for details).

  Checkout Type onepage

  Customer: Abc (abc@gmail.com)

  Items abc x 1 USD 11
   xyz x 1 USD 10 Total: USD 33.93

What is the main cause for this above error?


texts:
I currently have a extension that sets a hover on an image when ever it finds a label that is called 'hover'. I wish to change this to hover an image if there is an image with sort order id which is '2'. But I do not know how to do this. The code is below.

    $html = "";
    $imgcount = Mage::getModel('catalog/product')->load($_product->getId())->getMediaGalleryImages()->count();
    if ($imgcount>0):
        $_gallery = Mage::getModel('catalog/product') -> load($_product -> getId()) -> getMediaGalleryImages();
        foreach ($_gallery as $_image ):
            if ($_image->getLabel() == 'hover'):
                $html = 'getImgSources($_product, $imgType, $w, $h, $_image -> getFile()) . ' alt="" />';
            break;
            endif;
        endforeach;
    endif;
    return $html;

I was hoping it would be as simple as if ($_image->getSortOrder() == 2): but that was just flawed thinking. Any ideas?


texts: Back button on product details page after search results

texts:
I am using below code to show back button on product details page after search results but the back button doesn't show if I go the details page after search results. I am now checking using $_product->getCategory() but i need some condition to show back button after search result as well.

<?php if ($_category = $_product->getCategory()): ?>

    <button onclick="history.back();" class="button" title="<?php echo $this->__('Back') ?>" type="button">

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

    </button>

<?php endif;?>

I want to show back button on product details page when someone click product details page from search results.


texts: Unable to Find js of data-action="add-to-wishlist" in magento 2

texts:
I want to find where JS is written for data-action="add-to-wishlist" in Magento 2

I saw add-to-wishlist and data-action many times and on research I found the action in this file Mageto_Wishlit/js/addtowishlist.js

Here is a widget with two functions as below.

bindFormSubmit: function () {
    var self = this;

    $('[data-action="add-to-wishlist"]').on('click', function (event) {
        var element, params, form, action;
    alert("Hi I am Here");
        event.stopPropagation();
        event.preventDefault();

        element = $('input[type=file]' + self.options.customOptionsInfo);
        params = $(event.currentTarget).data('post');
        form = $(element).closest('form');
        action = params.action;

        if (params.data.id) {
            $('<input>', {
                type: 'hidden',
                name: 'id',
                value: params.data.id
            }).appendTo(form);
        }

        if (params.data.uenc) {
            action += 'uenc/' + params.data.uenc;
        }

        $(form).attr('action', action).submit();
    });
}

And

_updateAddToWishlistButton: function (dataToAdd) {
    var self = this;

    $('[data-action="add-to-wishlist"]').each(function (index, element) {
        var params = $(element).data('post');
        alert("Hi I am Here");

        if (!params) {
            params = {
                'data': {}
            };
        }

        params.data = $.extend({}, params.data, dataToAdd, {
            'qty': $(self.options.qtyInfo).val()
        });
        $(element).data('post', params);
    });
},

I have tried to interupt these two events by adding alert but I'm not getting any success on this.


texts: Magento 2: load disabled category childrens

texts:
I need to get all category children of a specific category but disabled categories too.

I have this category tree:

+ Root (ID: 2) // enabled
| + Main 1 (ID: 3) // enabled
| | + Sub 1 (ID: 4) // enabled
| + Main 2 (ID: 5) // enabled
| | + Sub 2 (ID: 6) // enabled
| + Main 3 (ID: 7) // disabled

I need to get all childrens of category with ID 2 [Main1(3),Main2(5),Main3(7)].

I tried with:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$parentCategoryId = 2;
$parentCategory = $objectManager->get('Magento\Catalog\Model\Category')->load($parentCategoryId);

/*
Also tried with:
$parentCategory = $objectManager->get('Magento\Catalog\Model\Category')->getCollection()
    ->addIdFilter($parentCategoryId)
    ->addAttributeToFilter('is_active', false/0/null/2) // always return an empty array...
    ->getFirstItem();
*/

$parentCategory->getChildren(); // return [3,5]

$cats = [];
foreach($parentCategory->getChildrenCategories() as $cat)
    $cats[] = $cat->getId();

print_r($cats); // return [3,5]


texts: Charge only shipping as a repair cost after an order

texts:
There are possible instances when a customer has a product, and will need to send it back to be repaired or some modifications.
I want to add shipping at customer's expense again.
How can I charge a customer for the $5.99 shipping without them ordering a product again as it is a repair for the same ordered product?


texts: Add CSS class name to body tag for a checkout step

texts:
Does anyone know of a reliable way in which I could add a css class name on the body tag for a specific checkout step? For example  my-custom-step or payment-step.

I was thinking I could use jQuery in a JavaScript mixin for when a checkout step is initiated, i.e. stepNavigator.next().  But I don't think this is very reliable, as a user can land on a step from anywhere using the # symbol in the url, i.e. example.com/checkout/#payment


texts:
How to create a rule Buy X get @888?

Please explain me.

Thanks.


texts:
I try to update labels options on my size label in an installer.
I use the following code :

$attributeId = Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product', 'size_label');
$attribute = Mage::getModel('catalog/resource_eav_attribute')->load($attributeId);

$attribute->setData('option', array(
    'value'=> array($optionId => array (
        0 => 'default label',
        1 => 'FR label',
        2 => 'DE label',
        3 => 'ES label',
        [...]
        )),
    'order' => array($optionId => $orderId)
    )
);

$attribute->save();

This code work when I use it like a script, but if I use it in my installer, there is an issue on this line :

$attribute->save();

In both case, $attribute->getData() return the same array..

When I launch the installer, that remove all my label (even the default one "default label"), but I still have the line on my BO with the position.

Someone now what could be the difference between the script and the installer ? Why that work in the first one and not in the second one ? Any idea ?