texts: Magento Shipping : Multiple Carriers with different Categories of Product

texts:
I'm working on a custom shipping module. The store basically sells two types of product like Heavy bulky product and normal goods. So the carriers we have tied up with will not carry all types of product. So suppose assume that a consumer orders both bulky product and normal goods so in the checkout while selecting the shipping method i will have show both carriers ie the carrier one which will shipping heavy bulky product and carrier which will carry normal goods.

As per my understanding currently the user can select only one carrier. Is it possible to override this. How can solve this issue. Can any one suggest a better approach to this problem.


texts: It's possible to use same order number to reorder?

texts: I need to edit the customer order (reorder) and I need to reorder have the same order id. In the original Magento Core, every time I edit the order, it gets a new ID. I need to apply the same id.


texts: How to Debug UI Component only showing spinner

texts:
I am currently developing a customer AdminHtml page with a form, and after fixing some other errors (which showed error messages) it shows only the spinner when loading the page.

How can this be debugged further? How can I see a proper error message?

Browser Console and Logs are showing nothing of value.

I already found

UIComponent Form - Spinner showing

Magento 2: Spinner kept running and not showing data after creating custom admin grid

but I want to know how to debug this instead of posting my code on StackExchange and let somebody else debug this.

Is there any way to get a proper error message?


texts:
i am new on Magento 2 i have a new magento 2 instance , i want to check the reset password functionality in my website , when i enter the email they said to men the email was sent to the email that I filled ,but i didn't receive anything, i think because i haven't configure the smtp yet.

can anyone help me please to configure and send the email to the customers for resetting their passwords ?

what they said to me :
If there is an account associated with careca@gmail.com you will receive an email with a link to reset your password.


texts: Magento : How to Add City List in magento

texts: I want to add city list in magento database and use that list in dropdown of custom module. How Can I do that?


texts: Magento 2 CSV image upload from external url saves image name with full url path

texts:
Does anyone know why magento saves image name with the full path or url e.g http://123.123.123.123/images/image.jpg will save the image name as http123123123123imagesimage.jpg.

It doesn't seen right it can't be?

How can I upload image from external server with proper name?
Thanks.


texts: PDOException when executing $stockItem->save()

texts:
I am using this code to add a stock item:

$stockItem = Mage::getModel('cataloginventory/stock_item');
$stockItem->setData(array(
                   'use_config_manage_stock' => 0,
                   'manage_stock'=>1,
                   'min_sale_qty'=>1,
                   'max_sale_qty'=>2,
                   'is_in_stock' => 1,
                   'qty' => 999
               )
);
$stockItem->save();

I am getting this error:

  Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (usr_web29785976_1.cataloginventory_stock_item, CONSTRAINT FK_CATINV_STOCK_ITEM_PRD_ID_CAT_PRD_ENTT_ENTT_ID FOREIGN KEY (product_id) REFERENCES catalog_product_entity (entity_id) ON)' in /var/www/web29785976/html/magento/lib/Zend/Db/Statement/Pdo.php:228 Stack trace: #0 /var/www/web29785976/html/magento/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) #1 /var/www/web29785976/html/magento/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) #2 /var/www/web29785976/html/magento/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array) #3 /var/www/web29785976/html/magento/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #4 /var/www/web29785976/html/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT in /var/www/web29785976/html/magento/lib/Zend/Db/Statement/Pdo.php on line 235


texts: Remove a wishlist item from a customers session

texts:
I'm creating an Ajax Handler where one of the methods is removing an item from the wishlist.

I know how to add a product to the wishlist:

$wishlist = Mage::getSingleton('wishlist/wishlist')->loadByCustomer(Mage::getSingleton('customer/session')->getCustomer());

if ($wishlist->addNewItem($product)) {
  $wishlist->save();
  $result['result']=true;
  $result['count']=$wishlist->getItemsCount();
}

I just can't find the functionality relating to removing the item from the wishlist.

Any help appreciated!


texts: Prices, How to hide decimals when are .00?

texts:
I want to know if exists one elegant option to hide decimals in the price when are ,00 I want this format:

8,45€

299€ ---> Now I have 299,00

Thanks.


texts: How to Remove meta title tag in magento 2

texts: I have issue any time in meta="title" and  both are display all Pages So i have Remove Meta="Title" Using File Override In Magento Core Module


texts: Magento 2 CSS Media Queries not working on

texts:
I am facing the problem that my media queries in my custom theme derived from luma do not work as expected, when I am deploying the static files via the command line. The result is, that the styles defined without media queries and the styles defined in the media query bracelets end up in the styles-l.css file.

I cannot assure you, that I did everything right, so here is what I did exactly:

I have created a new theme, with the luma theme as parent. I added some overall css changes, including some media queries in

<vendor>/<theme>/web/css/source/_theme.less

excerpt from _theme.less

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .navigation {
        max-width: initial;
        text-align: center;
        a {
            display: inline-block;
        }
        .level0 {
            display: inline-block;
        }
        .submenu {
            text-align: left;
        }
    }
}
//Add hover effect on menu items to mobile styles
.navigation {
    a {
        &:hover {
            .lib-css(background, @navigation-hover_background_color);
        }
    }
}

These media queries do work as expected!

But further I including this one in the _theme.less:

@import "_overview.less";

_overview.less:

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
.subcategories-grid {
    .subcategory-item {
        width: 24%;
        height: 300px;
        line-height: 300px;
        img {
            line-height: 300px;
            width: 200px;
            height: 200px;
        }
    }
  }
}

.subcategories-grid {
    list-style: none none;
    .subcategory-item {
        width: 49%;
        height: 200px;
        line-height: 200px;
        display: inline-block;
        text-align: center;
        vertical-align: middle;
        padding: 1px;
        img {
            vertical-align: middle;
            line-height: 200px;
            width: 120px;
            height: 120px;
        }
    }
    .subcategory-item:hover {
        box-shadow: 3px 3px 4px 0 rgba(0,0,0,0.3);
        border: 1px solid #bbb;
        padding: 0px;
    }
}

So, if I understand correctly the first part should reside only in the styles-l.css and the second part should reside only in the styles-m.css.
This is not the case. Both definitions are written to the styles-l.css resulting in the second part being used on large devices. The order does not matter btw. If I swap the desktop media query with the mobile definitions, still the mobile definitions are used on desktop sizes.

Maybe I did something wrong here and I cannot apply these media queries the way I did.
Maybe I can only use this media query once?
Maybe additional imported files are ignored somehow?

Sorry for the long question, but you may get a better idea of my current file/code structure this way. In the case there is something wrong.

Thanks in advance.


texts: how to call navigation bar in magento 2.2.6

texts:
How to call navigation main menu in magento2.2? please let me know.

I follow this code for our custom header in default.xml file.

<referenceContainer name="header.container">
    <block class="Magento\Theme\Block\Html\Footer" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
    <move element="minicart" destination="myheader"/>
    <move element="top.search" destination="myheader"/>
    <move element="logo" as="logo" destination="myheader"/>

Then echo this elements call in myheader.phtml file.

<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?>

so my i have coming menu toggle but not display navigation bar please let me know how we can fix this issue.


texts:
I'm getting the following error message while trying to upload a new version of my extension to Magento Connect:

  An error occurred during upload to channel MagentoConnect: Release not
  created.

This occurs while trying to upgrade a M1 extension in the way that I have always done it. This error has been constant for the last few days and happens after uploading the .tgz file.

Has any one else seen this error and does anyone know what causes it? Could it be an issue on Magento's end and if so, who would I contant about fixing it?


texts: How can I add a container div for each color of the swatch colors on the product page?

texts:
I am trying to add a container div for each color of the swatch colors to give it the look I need (configurable product, in PDP). I am adding the div in the following file that I inserted in my theme ../Magento_Swatches/templates/layered/renderer.phtml

 case '1':
                        ?>

                            <div class="swatch-option color <?= $block->escapeHtmlAttr($label['custom_style']) ?>"
                             tabindex="-1"
                             option-type="1"
                             option-id="<?= $block->escapeHtmlAttr($option) ?>"
                             option-label="<?= $block->escapeHtmlAttr($label['label']) ?>"
                             option-tooltip-thumb=""
                             option-tooltip-value="<?= $block->escapeHtmlAttr($swatchData['swatches'][$option]['value']) ?>"
                             style="background: <?= $block->escapeHtmlAttr($swatchData['swatches'][$option]['value']) ?> no-repeat center; background-size: initial;">


texts: How to get particular column data from the CSV?

texts:
I have read the data from the CSV

$data = $fileCsv->getData($file);
foreach ($data as $row => $data) {
    if ($row > 0) {
        print_r($data);
    }
}

I have got the content only the one column that is Customer Email.


texts: How to set the category ids to a products from category path?

texts:
I want to progrmmatically create products from a xml.

Ex : I am getting the product categories as like below.

Default Category/Beer ,
Default Category/Beer /CRAFT,
Default Category/Beer /CRAFT/BOMBER BEER,
Default Category/BEER,
Default Category for Store 2/Beer ,
Default Category for Store 2/Beer /CRAFT,
Default Category for Store 2/Beer /CRAFT/BOMBER BEER,
Default Category for Store 2/BEERe

I am getting the category path from the xml.I want to assign the category to the product.How can i assign the categories to the product?

Below is the model of xml


texts:
I'm getting a bit frustrated with caching as I can't figure out where the CSS files are being cached, and I'm hoping someone can help me out.

Here's the situation.

I am amending the RWD theme to create a custom design
when I make changes to the phtml or xml files, flushing cache allows me to see the changes
when I change to make changes to the CSS files, I can see them being compiled by compass, and I can see my changes on the server in the newly created styles.css file
No matter which cache I clear, I don't see the changes on the site until an arbitrary amount of time later. Some Times 5 minutes, sometimes 30 minutes plus
If I browse to the CSS file location from a browser, the changes are not there, yet FTPing to the site, I see the changes.

Here are the various methods I have tried to clear cache (I have done all of these together with no success):

Through admin - flush cache, flush cache storage, flush CSS/JS, clear full page cache
Deleting contents of var/cache
Deleting contents of media/css and media/css_secure
Flushing browser cache
Turned off merging of CSS files in admin

I have even tried a browser on a separate PC that has never loaded the site before, and the changes are not visible.

Am I doing something silly? I hope so, but at present, I just can't complete my design as I can't test the changes I am making to the CSS in live without a massive time overhead.

Any help is greatly appreciated.

Thanks.


texts: Menu doesn't show right in Internet Explorer (Latest Version)

texts:
I would appreciate if someone could help me here. The menu on my website https://sssextreme.com/ does not show correctly in IE but works fine in chrome and firefox.

My stylehseet is https://sssextreme.com/skin/frontend/rwd/default/css/styles.css

enter image description here


texts: merge two attribute sets to one attribute set

texts: Except deleting one attribute set and merge its attributes to the other attribute set.  Is there any easy way to merge two attribute sets to just one attribute set for Magento 1.9.2?


texts: Custom Category Attribute - Adding 'insert images' button

texts:
I've created a new category text area attribute called featcms.  In my custom module category_form.xml I have;

<field name="featcms" template="ui/form/field" sortOrder="13" formElement="wysiwyg">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="wysiwygConfigData" xsi:type="array">
                <item name="settings" xsi:type="array">
                    <item name="theme_advanced_buttons1" xsi:type="string">bold,italic,|,justifyleft,justifycenter,justifyright,|,fontselect,fontsizeselect,|,forecolor,backcolor,|,link,unlink,image,|,bullist,numlist,|,code</item>
                    <item name="theme_advanced_buttons2" xsi:type="boolean">true</item>
                    <item name="theme_advanced_buttons3" xsi:type="boolean">true</item>
                    <item name="theme_advanced_buttons4" xsi:type="boolean">true</item>
                    <item name="theme_advanced_statusbar_location" xsi:type="boolean">true</item>
                </item>
                <item name="files_browser_window_url" xsi:type="boolean">true</item>
                <item name="height" xsi:type="string">100px</item>
                <item name="toggle_button" xsi:type="boolean">true</item>
                <item name="add_variables" xsi:type="boolean">true</item>
                <item name="add_widgets" xsi:type="boolean">true</item>
                <item name="add_images" xsi:type="boolean">true</item>
                <item name="add_directives" xsi:type="boolean">true</item>
            </item>
            <item name="source" xsi:type="string">category</item>
        </item>
    </argument>
    <settings>
        <label translate="true">Featured CMS Small Squares</label>
        <dataScope>featcms</dataScope>
    </settings>
    <formElements>
        <wysiwyg class="Magento\Catalog\Ui\Component\Category\Form\Element\Wysiwyg">
            <settings>
                <rows>8</rows>
                <wysiwyg>true</wysiwyg>
            </settings>
        </wysiwyg>
    </formElements>
</field>

As you can see I've added 3 buttons - add variables, add widget and add image.  The insert variable and insert widget buttons work fine, but when I click the 'insert image...' button, the popup loads and an ajax call is made and succeeds;

[domain/admin]/catalog/category/edit/id/5307/target_element_id/category_form_featcms/?isAjax=true

But the call responds with json only and nothing renders in the popup - we should be expecting the image upload form here.

I notice when you scrutinise the CMS page 'insert image' button, the ajax url fired is;

[domain/admin]/cms/wysiwyg_images/index/target_element_id/cms_page_form_content/?isAjax=true

So appears to hit a cms/wysiwyg_images specific end point.  Do we need to replicate this path for a category attribute?   and if so how should this be set in the category_form xml.

Thanks


texts: Magento 2 Update Cart button is not display after customize Product page

texts:
I have so much customization in product page of my website.everything is working fine on product page while when we go to cart page and click to edit any page it redirect to `

  websiteurl/checkout/cart/configure/id/366/product_id/2555/

and it still display add to cart button in place of "update cart" button.

I hit and try and replace whole catalog_product_view.xml in my theme with original xml file,now it display now.

One thing more:

Why it is using catalog_product_view.xml as per Magento standard it should call
checkout_cart_configure.xml  file as per url.
Is anyone have idea which part is responsible for Update cart button on page "checkout/cart/configure"?

Please help me.


texts: How to redirect from magento 2 checkout page to the 3rd party payment gateway api?

texts: I am working on the Magento 2 payment gateway. The backend is completed but in frontend we stuck for getting the Magento 2 customer detail and post it to our 3rd party API. Please suggest.


texts: M2 - How to include custom theme directory less file path into my CMS block?

texts:
I have created custom theme which is inherit from blank theme,
I have created more than one CMS block and include into CMS page for home page design.
One of my CMS block named service banner
In the CMS block i have created some design:

I have created _cms_block.less file under
app\design\frontend\Myrwd\mytheme\web\css\source\ _cms_block.less
@media only screen and (max-width: 600px) {
    .container service-banner{
        body {
            background-color: lightblue;
        }
    }
}

and imported into _extend.less file
@@import "_cms_block.less";

How to include custom theme directory CSS file into my CMS block?


texts: How to increase the length of the product meta_description in Magento1.9 (when importing)?

texts: How to increase the limit of meta_description in magento1.9 .When we have import bulk of products during CSV then showing meta_description limit error.Please give me any solution?


texts:
I have create a module which consists an extra button on the product description page . For this I have added a layout catalog_product_view.xml which is below.

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <link src="Test_ClickToCollect::js/product/view/clickToCollect.js"/>
    </head>
    <body>
        <referenceContainer name="product.info.main">
            <block
                class="Test\ClickToCollect\Block\Product\View"
                name="product.info.clicktocollect"
                template="Test_ClickToCollect::product/view/pdpClick.phtml"
                after="product.info" ifconfig="click_to_collect/general/enable"/>
        </referenceContainer>
    </body>
</page>

I do have created the respective block file and the template but my phmtl file is not rendered on the PDP . May I know why is this happening. As you can see I have added a js file as well in my layout which is rendering perfectly , but the phtml file is not. Also please note that I have removed the var/ generated/ pub/static/ did content:deploy but have no luck.


texts: How to add some custom content in magento header before welcome text

texts:
I want to add some content(a drop down) in header menu first item before welcome text message.

I have followed this answer How to add extra container to page header in Magento 2

It adds below the header. So I modified it by changing    <referenceContainer name="header.container"> to    <referenceContainer name="header.panel.wrapper">

Now it is appearing in the header but below welcome text, sigin in links. I need to add it before Welcome text.

What is the change I need to make?


texts: product images missing after installing extension

texts:
When I am installing some extension in Magento 2 using PHP bin/magento then after doing that then my site has a problem which is the all the images including product and everything appears to be missing. This problem doesn't happen before. So I started uninstalling the extension in the hope that it will return back to normal. unfortunately, it didn't

so are there any advice on how to restore all my missing images back in Magento 2? I install the image using sample data.

Update: Below is the screenshot of the error using F12.

Why is all the image nonexistent after I do an upgrade?

any help would be appreciated


texts: Please suggest any free module which can provide the filter in the product listing page like the below screenshot.


texts: Creating a custom module to send order details to external supplier API via XML or JSON

texts:
I'm trying to write a custom module for Magento that when certain items are ordered and payment has been made, posts to our clothing supplier's site with details of the ordered item, delivery address and other data in either XML or JSON format.

Whilst I've been a web developer for some years, I haven't worked with the Magento system much before and was wondering if anyone could point me in the right direction?

I think I've found a hook (sales_order_invoice_save_after) that could do the trick but not too sure it's the right one or how to begin putting the code together!

Thanks in advance


texts:
In want to add an unique link in the transactional email template, that confirms the order and sets the Status from On Hold to Pending. To make the link unique I am using the order id. Is there a way to parse the orderid via php, like

example.com/index.php/shipping/confirm.php?orderid=100002205

or should it look like here:

example.com/index.php/shipping/confirm/100002205

Is there a way to generate these confirmational links?


texts: magento generate white space image to fit the thumb

texts:
I got a problem with magento image generator process. Image will be placed with 3 size of thumb for homepage, listing page and detail page.

Homepge , product thumb will be 365x265 px
Listing page, product thumb will be 225x190 px
Detail page, product thumb will be 350x241 px

At detail page customer can click on thumb to see lightbox with full image.

My Problem is that images on each page not ratio, but I want magento resize and crop with proper size (full image on thumb), I mean can show partial image just fit to the thumb with no white space on image.

How can I do this ? is it not default by mangeto ?

My website:
Homepage

stellaanddust.com/

Listing Page

stellaanddust.com/new-arrivals.html

Detail Page

stellaanddust.com/women/simple-product-49.html

Please guide,


texts: Change order of external and internal JS files

texts:
I'm trying to work with a geo ip API, and have included the JS for it in my default_head_blocks file, however it is being called after my own geoip-api.js file and therefore it's not picking up the Geo location until after my script has run.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <link src="js/modernizr.js" />
        <script src="//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js" src_type="url"/>
        <link src="js/geoip-api.js" />

    </head>
</page>

How can I get the external script to be called before my theme file?

EDIT:

I've removed the link from the above code and instead used:

requirejs.config({
    paths: {
        'maxmind': '//js.maxmind.com/js/apis/geoip2/v2.1/geoip2'
    }
});

require(['jquery', 'jquery/ui', 'Magento_Ui/js/modal/modal', 'maxmind'], function($, modal){
    #my code goes here;
});

However it's still running the maxmind JS after my code has run.


texts: Exclude sample product from “starting at” minimal price

texts:
Im trying fo find a solution to manage this. I have an item on every grouped product with a low value (5 dollar) witch is a sample of the main product.

I like to exclude the samples from minimal price calculation on category view (Starting at:) The sample item can be identified with SKU = "****SAM" or by name = "*** Sample"

Later i like to set samples free for wholesale (0.00) and would also like to exclude them from minimal price listing Starting at:

Here the code of /template/catalog/product/price.phtml
How can i exclude grouped item who has "SAM" in SKU or "Sample" in name from minimal price calculation please.

 <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>

    <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
    <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
        <?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
    <?php endif; ?>

    <?php if ($this->getUseLinkForAsLowAs()):?>
    <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
    <?php else:?>

    <?php endif?>
        <?php echo $this->__('As low as:') ?>
        <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
            <?php echo $_coreHelper->currency($_minimalPriceDisplayValue, true, false) ?>

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

    <?php else:?>

    <?php endif?>
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>

<?php else: /* if (!$_product->isGrouped()): */ ?>
<?php
$_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
$_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
?>
<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>

            <?php echo $this->__('Starting at:') ?>
            <?php if ($_taxHelper->displayBothPrices()): ?>

                    <?php echo $this->helper('tax')->__('Excl. Tax:') ?>
                    <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                        <?php echo $_coreHelper->currency($_exclTax, true, false) ?>

                    <?php echo $this->helper('tax')->__('Incl. Tax:') ?>
                    <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                        <?php echo $_coreHelper->currency($_inclTax, true, false) ?>

            <?php else: ?>
                <?php
                $_showPrice = $_inclTax;
                if (!$_taxHelper->displayPriceIncludingTax()) {
                    $_showPrice = $_exclTax;
                }
                ?>
            <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                <?php echo $_coreHelper->currency($_showPrice, true, false) ?>

            <?php endif; ?>


texts: Magento 1.9 - Sending Shipment email to customer but without Packing Slip

texts:
i would ask how send shipment email to customer, when the order status change in backend, without the attached of Packing Slip. Where can i go for not include packing slip in shipment email?

Thank you very much.


texts: How to add new class form-control input field to billing address section in magento 2.4

texts: How to add new class form-control input field to billing address section in magento2.4


texts: When Customer Register from checkout page then which Magento event called?

texts:
Customer can add the product in cart and without logged in he is click on proceed to checkout page.

From there is is create the account then which event called.


texts: Can't find Magento attributes for Custom Export module

texts:
Downloaded and installed the Custom Export module from Connect, and works fine.  However I want to add some include some more fields in the exported CSV.

Currently, the template CSV file looks like this:

order.increment_id|order.status|order.created_at|customer.name|customer.email|customer.taxvat|address.street_1|address.street_2|address.street_3|address.street_4|address.city|address.region|address.postcode|address.telephone|order.shipping_description

I also want to include the shipping address customer name (because if they purchase as a Guest, the [customer.name] field is blank. The attributes I want to include are as below:

Shipping Customer Name (as mentioned)
Weight
Shipping Arrival Date
Order Value
Additional instructions / comments

These all seem to be the built-in Magento attributes and aren't visible or configurable in the Manage Attributes panel, which is understandable, but it does mean I can't easily find the code for these.

I've tried searching for a list of the standard built in attributes codes, but nothing helpful came up.

If anyone can tell me what codes I need to add, or give me a clue where I can find them, that would be seriously appreciated!

Thanks in advance!


texts: Set child product category to the same as parent product

texts:
Having problems with setting up Google Shopping integration.
A majority of my products have a parent product which holds the general information about it, other than size or colour. I have have associated products that include the information for the product, as well as size ect.. These products are set as non visible, however, the parent products are set to Catalog and search.

All of my child products do not have their categories set to the same as the parent product. How can I assign these attributes after the product has been created?

I have over 1000 products which need the category information updating to the same as its parent product, so I need something that will do this all in one.

Thanks.


texts: Magento 2 slow open categories and products

texts:
Help me please understand, why my store is working slowly on Magento 2.1.1. Ubuntu x64, DO 16cpu, 48Gb ram, ssd. We use nginx, php-fpm 7.0, varnish 4, mysql 5.6.

This is very strange situation for me because i have another magento 2 store with 8 cpu with same env, and it work well. We got about 3000 products id DB.


texts:
In my custom theme, I'm loading products images using this :

 <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(182) ?>" width="182" height="182" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" />

Unfortunatly, theses images are the only medias that are not loaded in https while the website is accessed in https. I double checked configuration.

Example of the resulting url :

http://mydomain.com/media/catalog/product/cache/1/small_image/182x/9df78eab33525d08d6e5fb8d27136e95/n/o/non_deco_mix_plus_1_candle_best.jpg

Note : I've also tried to flush the cache, no clue.

Is there anything else I should do or verify about that?


texts: Show prices including and excluding tax on product information's Price set up in backend

texts: Is it possible to show both prices (incl. and excl. tax) in product information part of the backend. I mean the Price tab of the product information.


texts: What happens with contents when I install a new theme?

texts:
Let's say that we have an existing Magento store in 1.9.1

This is a live store with customer accounts and purchases, categories, products etc. etc.

This is using a certain template (which is crap)

Let's say i want to create a new look using the rwd theme as starting point.

Is it (when finished) just a matter of moving the new "theme" files to the correct app and skin folders of the live site and will that have no effect on contents etc. (i guess that's all in dbase while these are just files)

And is it the same when i want to update to new version of Magento?


texts:
A 3rd party server is calling my webhook api controller method.

Is it possible to get the URL of the server calling my magento server.

I tried looking for a solution but could not find any.


texts: Add a column to sales order grid without breaking the order's view

texts:
Here is the plugin code i tried to add the columns of the custom table to the sales order grid

<?php
namespace Testing\Testorder\Plugins;

use Magento\Framework\Message\ManagerInterface as MessageManager;
use Magento\Sales\Model\ResourceModel\Order\Grid\Collection as SalesOrderGridCollection;

class AddColumnsSalesOrderGridCollection
{
    private $messageManager;
    private $collection;
    protected $request;

    public function __construct(MessageManager $messageManager,
        SalesOrderGridCollection $collection,
        \Magento\Framework\App\Request\Http $request
    ) {
        $this->request = $request;
        $this->messageManager = $messageManager;
        $this->collection = $collection;
    }

    public function aroundGetReport(
        \Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory $subject,
        \Closure $proceed,
        $requestName
    ) {

        $result = $proceed($requestName);
        if ($requestName == 'sales_order_grid_data_source') {
            if ($result instanceof $this->collection) {
                $select = $this->collection->getSelect();

                $select->joinLeft(
                   ['tt' => "Test_Testing"],
                   'main_table.increment_id = tt.order_id',
                   ['username']
                )->distinct();

            }

        }
        return $this->collection;
    }

but this will break the order's view page, there is an error when i click on the tabs like invoices/shipment/credit memos

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'order_id' in 'where clause', query was: SELECT COUNT(*) FROM sales_order_grid AS main_table WHERE (order_id = '26')

the plugin also breaks "All customers"

Notice: Undefined index: website_id in /home/m22/public_html/vendor/magento/module-customer/Ui/Component/Listing/Column/Confirmation.php on line 69

Any ideas how to fix it?


texts: How do I correctly configure Magento to support 2 currencies

texts:
Currently I have one website/storeview that uses Danish Krones as currency. Now I would like to expand with a new website that uses Euro as currency. This causes some problems as I am trying to achieve the following:

I want to input product + tier prices only one time. The product prices should then be automatically converted to other currencies.
Current problem: Tier prices are converted correctly from DKK to EUR but the product price is not converted.
Shipping cost should not use currency conversion (system -> configuration -> shipping method). For example, if I have a website using EURO I want to input fx. 5 EURO for shipping cost. On a website that is using DKK I want to input fx. 15 DKK for shipping cost.
This works with the current configuration
There can be not difference between the amount the customer think he is paying and the amount that is actually deducted from the customer’s bank account. So I assume that I need a Base Current for DKK and a Base Currency for EURO?
This works with the current configuration

My current configuration is as follows:

CURRENCY SETUP
Default Config (Base Currency: Danish Krone, Default Display Currency: Danish krone, Allowed Currencies: Danish Krone)

websitedk (Base Currency: Danish Krone, Default Display Currency: Danish krone, Allowed Currencies: Danish Krone)
- storedk
- - storeviewdk (Default Display Currency: Danish krone, Allowed Currencies: Danish Krone)

websiteeu (Base Currency: Euro, Default Display Currency: Euro, Allowed Currencies: Euro)
- storeeu
- - storevieweu (Default Display Currency: Euro, Allowed Currencies: Euro)

Catalog -> Price -> Catalog Price Scope: Website

So my question goes, how can I solve the issue listed in point number 1: “Tier prices are converted correctly from DKK to EUR but the product price is not converted.” ?

Links:
DKK product: http://www.dk.DELETETHISbrisingi.com/neodym-skivemagnet-6x6-mm-magp10011a
EUR product: http://www.eu.DELETETHISbrisingi.com/neodym-disc-magnet-6x6-mm


texts: Which is the method for getting list of all coupon codes in magento2?

texts: Which is the method for getting list of all coupon codes in magento2 ?


texts: How to display USD values within reorders above the international value in Order totals?

texts:
I am trying to display the USD values above the international value in Order totals in REORDER PAGE ADMIN.
I can see that the columns and ORDER TOTAL section is generated in this file
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php
  public function renderTotal($total, $area = null, $colspan = 1)
    {
        return $this->_getTotalRenderer($total->getCode())
            ->setTotal($total)
            ->setColspan($colspan)
            ->setRenderingArea(is_null($area) ? -1 : $area)
            ->toHtml();
    }

I am not sure how do i render the "USD" values same as order page in REORDER page.
Below is the expected Order section, highlighted the USD values that i want to display in order section on reorder page.


texts: Using the Mage_Sales_Model_Order_Shipment_Api create() method to create a new shipment

texts:
I am making a connector for Magento, where orders from Magento are pushed into our system, then get shipments created that need to be pulled back into Magento and converted to the right format. In Magento 2, this is accomplished with shipRepo->create()

I believe, but I'm struggling to find the correct Magento 1 solution. I have the order's increment ID from the original order, so I'm trying to use that. Right now here is what I'm trying:

$order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
if($order->canShip()) {
        $itemQty =  $order->getItemsCollection()->count();
        $shipment = Mage::getModel('sales/service_order', $order)->prepareShipment($itemQty);
        $shipment = new Mage_Sales_Model_Order_Shipment_Api();
        $shipmentId = $shipment->create($orderId, $itemQty,null,true,false);
}

However, when I try this out, I get a data_invalid error. What am I doing wrong?

PS: I'm basing my code off of this inchoo post and this stack overflow post but I'm pretty sure it's still failing on the create method.

I'm curious why we set $shipment twice. Does that first assignment actually accomplish anything?


texts: Magento 2.3 -After migration new theme not applied

texts:
I am migrated from Magento 1.9.2.3 to magento 2.3, after applied new purchased theme frond error,

still some resource poit out magento 1 path, my magento 1 theme name theme327k


texts:
So I can see plenty of information about what to do with Magento and APC for single storefronts but how about multi stores?

I have 1 local.xml files that has 3 storefronts on that are on 3 different domains. In my local.xml I have the following:

<cache>
   <backend>apc</backend>
   <prefix>sitename_</prefix>
</cache>

Is this correct or should there be different prefixes for the different storefronts? I'm inclined to say that way I have done is correct but could anyone else confirm either way?


texts: magento 2: how to display region name in dropdown

texts:
Hi to all I added Italian region name in magento db by SQL in directory_country_region as follows:

INSERT INTO directory_country_region(country_id, code, default_name) VALUES ('IT', 'TO', 'Torino');
INSERT INTO directory_country_region(country_id, code, default_name) VALUES ('IT', 'VC', 'Vercelli');
INSERT INTO directory_country_region(country_id, code, default_name) VALUES ('IT', 'NO', 'Novara'); [...]

I also handled directory_country_region_name like this:

INSERT INTO directory_country_region_name (locale, region_id, name)
SELECT 'it_IT', dcr.region_id, dcr.code
FROM directory_country_region dcr
WHERE dcr.country_id = 'IT';

INSERT INTO directory_country_region_name (locale, region_id, name)
SELECT 'en_US', dcr.region_id, dcr.code
FROM directory_country_region dcr
WHERE dcr.country_id = 'IT';

clicking on the dropdown I'm not able to see the region name and I get this result:
  I'd like to see 'Agrigento' instead of 'AG' (e.g.)
Any idea of what I'm missing? Thanks to all


texts:
I moved a friends website to another server and then also changed the domain name . The site seems to work all fine except two issues:
   - When you will out the customer registration form and click submit no success or even error message is shown. Yet when I login to the Magento admin I see the customer row listed??

When I try to login with the customer email and password the login page is just reloaded no message is shown and also I am not actually logged in??

I looked in the Chrome browser console and see no errors in there. I also can confirm that the customer registration and login worked before it was moved to another server and the domain name changed. I also have no issues accessing the admin panel. So this seems to only be an issue of the login function.

I have the below cookie settings:

Cookie Lifetime box: 86400

Cookie Path: /

Cookie Domain:
(have this field blank)

I am not sure where to look or how to troubleshoot this? Anyone ever have similar happen to them?


texts: Magento 2.3 - Get all values from custom multiselect attribute

texts:
On the product page (within the "column main" area) I have created a phtml file. In this I want to echo all the chosen options of a custom multiselect attribute.

What I have:

current product (via
\Magento\Framework\App\ObjectManager::getInstance())
name of my custom attribute (xyz)
for example 3 selected options out of 5 (e.g. "red", "green" and "black")

What I need:

The three values of the selected options

I tried

<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance();?>
<?php $currentProduct = $objectManager->get('Magento\Framework\Registry')->registry('current_product'); //get current product ?>
<?php echo $currentProduct->getCustomAttribute('xyz')->getValue(); ?>
<?php echo $currentProduct->getAttributeText('xyz'); ?>

But there is no output.

I found a lot of possible solutions using ->getResource() but I have come to learn this method is deprecated as from 2.3.


texts: Magento 2: how to insert data when submit product in backend?

texts:
I am a newbie for magento 2 and try to save data into custom table when user submit a product data in backend.

I tried to use di.xml and events.xml, but I still don't know when and where do this action insert the data into table.

Because there is basic on the exist page that is product submit page, not a new page to do it.

So, I am confused the data flow.

Updated:

I used the events.xml to do it. but not working for me.
there is the file code:

Demo\User\etc\adminhtml\events.xml:

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="controller_action_catalog_product_save_entity_after'">
        <observer name="demo_user_product" instance="Demo\User\Model\Product" method="testEvent" />
    </event>
</config>

Demo\User\Model\Product:

<?php
namespace Demo\User\Model;
use Magento\Framework\Model\AbstractModel as AbstractModel;
class Product extends AbstractModel
{
    public function testEvent()
    {
        $myfile = fopen("/file_path/Product.txt", "w");
        fwrite($myfile, 1);
        fclose($myfile);
    }
}

when I click the save button of product in backend, there is no data is written into "Product.txt" file. this file's permission is 777.
so, anybody know what's wrong in my code?


texts: How can I display the value of an attribute in list.phtml?

texts:
I have this attribute

CODE PHP:

  $attributeCode = 'product_text';

                if ($_product->getData($attributeCode) !== null){
                    echo $_product->getAttributeText($attributeCode);
                }else{
                    echo 'Is NULL';
                }

The problem is I get NULL for each product and I can not display the value of the attribute.

What is wrong?

Thanks in advance]2


texts: Magento - Set default filter of customer attribute in order grid

texts:
I've just managed to include a custom customer attribute in the order grid columns like this:

$agenteAttribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'agente');
$agenteTable = $agenteAttribute->getBackendTable();
$agenteId = $agenteAttribute->getAttributeId();
$collection->getSelect()->joinLeft(
    array('ca' => $agenteTable),
    'ca.attribute_id='.$agenteId.' AND ca.entity_id =main_table.customer_id',
    array('agente'  => new Zend_Db_Expr('ca.value')
    )
);

But when I try to search in the filter field of the order grid, I get this log error:

  Unknown column 'agente' in 'where clause', query was: SELECT COUNT(*) FROM sales_flat_order_grid AS main_table WHERE (agente LIKE '%312%')";i:1;s:5885:"#0

I tried these two functions but without success:

$collection->addFieldToFilter('agente',array('in' => array(313)));
$this->setDefaultFilter(array('agente'=>312));

How can I do?
Thanks for any help


texts:
I have uploaded an image on website level at Content => Design => Configuration.

When I look into core_config_data table, path of this image is saved against column design/watermark/small_image_image with scope_id 2.

public function __construct(
    ....
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
    )
    {
    ....
     $this->storeManager = $storeManager;
     $this->scopeConfig = $scopeConfig;
    }
    public function getWatermarkSmallImage() {
       $image_url = $this->scopeConfig->getValue('design/watermark/small_image_image', \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE);

            var_dump($image_url);
    }

it prints null. Though when I use below code, it gives string(18) "websites/2/red.jpg"

$image_url = $this->scopeConfig->getValue('design/watermark/small_image_image', \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE, 2);

How I can get complete url of this image which can be used with src tag?


texts: How we can install magento 2.2.0 via command line comand?

texts:
How we can install magento 2.2.0 via command line command(CLI) using Ubuntu ?
Could you please some share command?


texts: Magento 2: How to change text in admin panel?

texts:
how can I change the (German) labels in admin panel like in the screenhot for example?
I have tried to change this in "i18n" folders in custom theme and custom module but nothing worked.
For frontend it is working fine but I have no idea to change that for admin panel.
I have also cleaned all caches of corse.
Can anybody help please?


texts:
One of the products in my store don't have image associated with it, infact image was available on staging server and when moved to production image is no more available. I'm trying to re-upload the image but soon as I hit edit product button it issues following error (warning):

  Cannot gather stats! Warning!stat(): stat failed for /var/www/vhosts/example.co.uk/example.co.uk/pub/media/catalog/product/b/u/business.jpg


texts: Disable certain modules with custom theme

texts: I have a custom theme that doesn't support rating, review or poll. How to disable those modules when I activate this theme. Is there a way?


texts: How to find which websites a certain product belongs to?

texts:
A product can be enabled in several Magento websites. How can I get a list of these websites based on a product SKU?

Obviously, there is no $product->getWebsites().

Looks like this information is in the table catalog_product_website, but I'd prefer solving this without direct SQL.

mysql> select * from catalog_product_website;
+------------+------------+
| product_id | website_id |
+------------+------------+
|          1 |          3 |
|          2 |          3 |
|          3 |          3 |
|          1 |          4 |
|          2 |          4 |


texts: Multiple Conflicts trying to update to 1.9.3.3

texts:
I'm trying to update from 1.9.2.1 to 1.9.3.3 using Connect Manager. First attempt I checked for and selected to update all core packages to 1.9.3.3. This resulted in a heap of "conflict" errors, some packages updated and the site dead.

The dead site was because it modified permissions on several key files and folders from 644 to 666, resulting in Apache refusing to load. I fixed this by reverting permissions back as they should be. Connect Manager also dead for the same reason so fixed permissions there too.

Now I'm stuck. About half the core packages have updated to 1.9.3.3 and the other half not and won't. I get multiple errors like the following:

    Checking dependencies of packages
Already installed: community/Lib_Unserialize 1.9.3.3, skipping

CONNECT ERROR: Package community/Mage_Core_Modules 1.9.3.3 conflicts with: community/Magento_Mobile 1.9.2.1
Package community/Lib_Varien 1.9.3.3 conflicts with: community/Mage_Core_Modules 1.9.2.1
Package community/Lib_Google_Checkout 1.9.3.3 conflicts with: community/Mage_Core_Modules 1.9.2.1
Package community/Lib_Js_Calendar 1.51.1.9 conflicts with: community/Mage_Core_Modules 1.9.2.1
Package community/Lib_Js_Mage 1.9.3.3 conflicts with: community/Mage_Core_Modules 1.9.2.1
Package community/Lib_Phpseclib 1.9.3.3 conflicts with: community/Mage_Core_Modules 1.9.2.1
Package community/Mage_Locale_en_US 1.9.3.3 conflicts with: community/Mage_Core_Modules 1.9.2.1
Package community/Lib_Mage 1.9.3.3 conflicts with: community/Mage_Core_Modules 1.9.2.1
Package community/Lib_Magento 1.9.3.3 conflicts with: community/Mage_Core_Modules 1.9.2.1
Package community/Lib_Credis 1.9.3.3 conflicts with: community/Mage_Core_Modules 1.9.2.1
Package community/Lib_Pelago 1.9.3.3 conflicts with: community/Mage_Core_Modules 1.9.2.1
Package community/Lib_IDNA2 1.9.3.3 conflicts with: community/Mage_Core_Modules 1.9.2.1
Package community/Lib_ZF 1.12.10.8 conflicts with: community/Lib_Varien 1.9.2.1
Package community/Lib_Js_Prototype 1.9.3.3 conflicts with: community/Mage_Core_Modules 1.9.2.1, community/Lib_Js_Mage 1.9.2.1
Package community/Lib_ZF_Locale 1.12.10.8 conflicts with: community/Lib_ZF 1.12.10.1

If I try to update individually, it say it conflicts with others that are at 1.9.2.1. Yet if I try to update all, each packages says it conflicts with the  version of others currently installed.

As I cannot believe Connect Manager would have been written to behave like this, anyone have any clue how to fix it so it's checking against the packages requested to be installed and not against packages already installed, which will obviously conflict with the each package being updated.

I tried clearing both normal and downloader caches. Makes no difference.

There are other questions like this but with no reasonable answer other than update Magento manually via FTP/SSH. Surely there must be an answer to get updates working correctly through Connect Mananger? Otherwise what's the point of having it!?

UPDATE:
Tried using ./mage upgrade-all - same conflict errors

So tried ./mage upgrade-all --force - wow! Completely messed up the site - phew, it's the test copy! Critical files were deleted and the site was dead well beyond a permission issue. Had to restore from backup.

Tried again following other advice, this time just selecting to upgrade the Mage_All_Latest package. Same again, half of the core packages updated, half not and site dead because permissions are wrong. And I'm left with the same conflicts as above. Fixed permissions and tried updating just Mage_Core_Modules - same. Tried just Magento_Mobile - same.

One thing I have noticed is that upgrading creates a directory in pkginfo called Mage_All_Latest.txt - not a file, a directory. Anyhow, tried deleting that and made no difference.


texts: Magento 2 : Add "View All" Link after all sub categories

texts:
How to display "View All" Link after all sub categories in Magento 2.
I used this blog. But, It's display main menu and sub menu. I want to add "View All" in all sub categories after 5 categories.
How to Add "View All" Link?
Any help would be appreciated.
Thanks.


texts: Magento 2: Set robots noindex on layered navigation results

texts:
How can I set robots :

<meta name="robots" content="NOINDEX,NOFOLLOW"/>

for layered navigation results in Magento 2?

I have searched the internet but there is no information to be found for this pretty important feature.


texts: Checkout layout block xml display two places

texts:
Inside the checkout, I wanted to add a shoppingcart in the right sidebar.
This works perfectly, but now the cart is displayed on two places. It is added to the right sidebar, that is correct.

But it is also displayed at the bottom of the checkout page.

How can I remove the element on the bottom of the page and only display it in the right sidebar?

<checkout_onepage_index>

        <!-- Block below progress block, inserted directly -->
        <reference name="right">

        <block type="checkout/onepage_review_info" name="checkout_review_sidebar" output="toHtml" before="-" template="checkout/onepage/review/minicart.phtml">
            <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/onepage/review/item_mini.phtml</template></action>
            <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/onepage/review/item_mini.phtml</template></action>
            <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/onepage/review/item_mini.phtml</template></action>
            <block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="checkout/onepage/review/totals_mini.phtml"/>
        </block>

        </reference>

        <!-- Block below progress block, inserted directly -->
        <reference name="left">

        </reference>

    </checkout_onepage_index>


texts:
On my localhost i create a react app (getting data from magento 2 rest api).
Magento is set on vagrant so they are on other domains.

When I try to send request ...

   var uploadReq = new Request(LOGIN_URL, {
        method: 'post',
        headers: new Headers({
            'Content-Type': 'application/json',
        }),
        body: JSON.stringify({
            username: this.state.username,
            password: this.state.password
        })

    });

    fetch(uploadReq)
        .then(this._requestHandler)
        .catch(function (err) {
            console.log('Fetch Error :-S', err);
        });

.. I get an CORS error:

 Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 400. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I found this config example: https://enable-cors.org/server_nginx.html

But nothing has changed.


texts: Description & Short description not updating

texts:
We're using Magento v1.9 and if we change the Description and/or Short Description of a product, the new text does not show on the frontend.
So, these 2 fields are not updated properly.

Any help is most welcome!


texts: Magento 2 : How to save data in database

texts:
I want to save some data in to custom table.When I use static value to save data then it is going good but If I try to use dynamic data or used any calculation in between then It is going in infinite loop.

Please have look :

namespace Namespace\Module\Model;
use Magento\Framework\Model\AbstractModel;
class Test extends AbstractModel
{
    protected function _construct()
    {
        $this->_init('Namespace\Module\Model\ResourceModel\Test');
    }
    public function aftersave()
    {
        $data = $this->_objectManager->get('Namespace\Module\Model\Test')->load(10);
       /* I also try
       $data = $this->_objectManager->create('Namespace\Module\Model\Test')->load(10);  */
       $this->customValues($data);
    }
    public function customValues($data)
    {
         $date = new \Zend_Date('2016-09-12', self::DB_DATE_FORMAT);
         $data->setDate($date);
         $data->save();
    }
}


texts: How to show product total price calculation in Magento cart

texts:
I'm having problems trying to show the product full total price in Magento, and by product total price I mean full product price without the discount; the price has to be multiplied for each product quantity added to the cart, and custom options additional price should be added as well. Which files should I edit in Magento? is it possible to show the product discount inside the cart (amount that varies with the amount of ordered products)?
Thanks

Edit:

In the blue rectangle it shows the regular price, which should be regular price X 2 (since product quantity is 2) with added 122€ as chosen in product special options. Instead now it shows regular price with discount applied and for only 1 product, without special option added.


texts: getting error "PHP Fatal error: Uncaught Zend\Uri\Exception\InvalidUriPartException"

texts:
I am using Magento ver. 2.3.2. I am getting following error in error_log after moving the site on new server (AWS Server):

  PHP Fatal error:  Uncaught Zend\Uri\Exception\InvalidUriPartException:
  Host "[IP ADDRESS]" is not valid or is not accepted by Zend\Uri\Http
  in /public_html/vendor/zendframework/zend-uri/src/Uri.php:746

anyone have idea how to fix this error?


texts: php curl rest api token return false Magento 2

texts:
I'm trying to get an auth token with Magento 2 rest API with following code

$userData = array("username" => "user", "password" => "password");
$ch = curl_init("https://domain/index.php/rest/V1/integration/admin/token");

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($userData));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Content-Lenght: " . strlen(json_encode($userData))));

$token = curl_exec($ch);
var_dump($token);

It works fine on the local server, but $token = false from the test server. I can retrieve token with curl from a console.

curl -X POST "https://domain/index.php/rest/V1/integration/admin/token/" -H "Content-Type:application/json" -d '{"username":"user", "password":"password"}'

Why am I receiving false in a PHP script? Any ideas?


texts: Add child to a layout block programmatically

texts:
I want to add "children" to a given layout (custom-) block.

In my layout-xml:

<block type="core/text_list" name="custom_html_blocks_body_end" as="custom_html_blocks_body_end">
    ...
    <block type="page/html" name="custom_svg_icons" as="custom_svg-icons" template="my_templates/custom_svg-icons.phtml" />
    ...
</block>

The block i want to add childs programmatically is custom_svg_icons.

In custom_svg-icons.phtml:

<?php $this->getChildHtml(); ?>

And in my script to set the children:

$objSVG = $this->getLayout()->createBlock('page/html')->setTemplate('my_templates/svg_image.phtml')->setData(array('imageName'=>'svg-image-demo'));
$objSVGBlock = $this->getLayout()->getBlock('custom_svg-icons')->append($objSVG);

I get no Error, but nothing happens. There is no child.


texts: How to change logo on Newsletter subscription email template magento 2

texts: How to change logo on Newsletter subscription email template magento2


texts:
I am trying to open the Magento connect manager from the admin and getting 403 -Forbidden
You don't have permission to access /downloader/ on this server.

I changed the folders permission to 777 and make it read and write and nothing help.


texts: How to create custom category attribute with wysiwyg editor in magento2?

texts: Hi i want to add custom category attribute with wysiwyg enable editor i get the code of custom category attribute but not able to find with wysiwyg editor.if anyone is there help me please.


texts: Magento : unable to get value of getIsInStock()?

texts:
I am using a plugin that can sent info to a google spreadsheet.

In this plugin, I am able to get id,name,price,sku,qty but I am facing issue while calling getIsInStock().

The current code is returning empty result and I am not sure what i am doing wrong.

    /* Manipulate first sheet */
            foreach ($worksheet->getRows() as $row)
            {
                if ($product->getId() == $row->data()->getId())
                {
                    $rows[] = $row;
                }
            }

            if ($rows)
            {
                /* Update record */
                foreach ($rows as $row)
                {
                    $data = $row->data();

                    $data->setName($product->getName());
                    $data->setPrice($product->getPrice());
                    $data->setSku($product->getSku());
                    $data->setQty($product->getStockItem()->getQty());

                    $data->setIsInStock($product->getStockItem()->getIsInStock());
                    if($product->getStockItem()->getIsInStock())
                    {
                       ('in stock');
                    }
                    else
                    {
                      ('out of stock');
                        }

                    $row->update
                    (
                        $data->getData()
                    );

                    Mage::getSingleton('adminhtml/session')->addNotice('Price was saved on Google Drive successfully.');
                }
            }
            else
            {
                /* Create new record */

                /* No updatable rows found */
                $worksheet->addRow(array
                    (
                        'id'    => $product->getId(),
                        'name'  => $product->getName(),
                        'price' => $product->getPrice(),
                        'sku' => $product->getSku(),
                        'qty' => $product->getQty(),
                        'status' => $product->getIsInStock(),


texts:
I have a .phtml file that loops through dropdowns. There are 6 dropdowns belonging to two different groups (so 3 dropdowns per group).

I set a session on button click:

if ($this->getRequest()->getParam(self::USERBIKE)) {
    $block = $this->layoutFactory->create()->createBlock('Vendor\Module\Block\Garage');
    if ($block->getGarageCollection()->getFirstItem()->getCustomerId()) {
        $block->getCoreSession()->setUserBike(1);
    }
}

Which I then use to check in the dropdown .phtml file:

if ($session->getUserBike() == 1) {
    $useUserBike = true;
    # etc.
}

However, nothing seems to happen.

I added some logging to check each dropdown to see what was going on:

$writer = new \Zend\Log\Writer\Stream(BP. '/var/log/logfile.log');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);

# log each dropdown ID
$logger->info('OUTSIDE: '. $block->getDropdown()->getDropdownId());

# log Session value per dropdown
$logger->info('OUTSIDE USER BIKE SESH: '. $session->getUserBike());

if ($session->getUserBike() == 1) {
    $useUserBike = true;
    $userBike = $blockGarage->getGarageCollection()->getFirstItem();

    # log cur dropdown ID
    $logger->info('CURDROPDOWNID: '. $block->getDropdown()->getDropdownId());

    # log cur dropdown group ID
    $logger->info('CURFINDERID: '. $block->getDropdown()->getFinderId());

    if ($block->getDropdown()->getFinderId() == 1) {
        switch($block->getDropdown()->getDropdownId())
        {
            case 1: $compareTo = $userBike->getMakeId(); break;
            case 2: $compareTo = $userBike->getModelId(); break;
            case 3: $compareTo = $userBike->getYearId(); break;
            default: $compareTo = 0; break;
        }
    }

    # log compareTo value
    $logger->info(isset($compareTo) ? $compareTo : 'empty str');
    $logger->info('======================================'); # visibility break
}

The output of my logfile:

  2019-01-09T16:33:47+00:00 INFO (6): OUTSIDE: 1
  2019-01-09T16:33:47+00:00 INFO (6): OUTSIDE USER BIKE SESH:
  2019-01-09T16:33:47+00:00 INFO (6): OUTSIDE: 2
  2019-01-09T16:33:47+00:00 INFO (6): OUTSIDE USER BIKE SESH:
  2019-01-09T16:33:47+00:00 INFO (6): OUTSIDE: 3
  2019-01-09T16:33:47+00:00 INFO (6): OUTSIDE USER BIKE SESH:
  2019-01-09T16:33:47+00:00 INFO (6): OUTSIDE: 4
  2019-01-09T16:33:47+00:00 INFO (6): OUTSIDE USER BIKE SESH: 1
  2019-01-09T16:33:47+00:00 INFO (6): CURDROPDOWNID: 4
  2019-01-09T16:33:47+00:00 INFO (6): CURFINDERID: 2
  2019-01-09T16:33:47+00:00 INFO (6): empty str
  2019-01-09T16:33:47+00:00 INFO (6): ======================================
  2019-01-09T16:33:47+00:00 INFO (6): OUTSIDE: 5
  2019-01-09T16:33:47+00:00 INFO (6): OUTSIDE USER BIKE SESH: 1
  2019-01-09T16:33:47+00:00 INFO (6): CURDROPDOWNID: 5
  2019-01-09T16:33:47+00:00 INFO (6): CURFINDERID: 2
  2019-01-09T16:33:47+00:00 INFO (6): empty str
  2019-01-09T16:33:47+00:00 INFO (6): ======================================
  2019-01-09T16:33:47+00:00 INFO (6): OUTSIDE: 6
  2019-01-09T16:33:47+00:00 INFO (6): OUTSIDE USER BIKE SESH: 1
  2019-01-09T16:33:47+00:00 INFO (6): CURDROPDOWNID: 6
  2019-01-09T16:33:47+00:00 INFO (6): CURFINDERID: 2
  2019-01-09T16:33:47+00:00 INFO (6): empty str
  2019-01-09T16:33:47+00:00 INFO (6): ======================================

As you can see, The session doesn't have a value 'til the 4th dropdown. Why is this happening? What am I doing wrong?

Edit:

Minified Block Controller Session Code:

class Garage extends Tempalte
{
    protected $customerSession;

    public function __construct(
        \Magento\Customer\Model\Session $customerSession
    )
    {
        $this->customerSession = $customerSession;
    }

    public function getCustomerSession()
    {
        return $this->customerSession;
    }
}


texts: Validate Customer credentials in Magento 2

texts:
I'm trying to make a login of a user externally in PHP.

Need to know which class should be used in Magento 2 to validate by Email & password and once validated, open the session.

I'm dealing with CustomerRepository Class, where there is a function that's supposed fetch a Customer by Email and returns a CustomerModel Object but no success. The idea is to get the Model from such user and in case the Model has data, get the password and compare.

$this->answer = $this->customer_Repository->get("pepe1@pepe.com");

When I print in console the answer, it's empty.

I do not find anything related to this topic. Is There any Class that makes this operation directly?


texts: Free shipping / delivery set per customer

texts: Is it possible or is there an extension that will allow me to set free delivery for customers at customer level and not customer group level


texts: Magento 1.9.1 Static Block not visible in Front End

texts:
I have created the static block in cms/static blocks

Then added the following code to catalog/product/view.phtml

<?php echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘your_block_identifier’)->toHtml() ?>

also enabled Allow Symlinks in system > configuration > Developer > Template Settings

Is there any suggestions?


texts:
i want to enable my new theme's ( cleversoft novetty theme) extensions. and it wants me to run following command

php bin/magento setup:upgrade

but as i am new to Magento i don't know where to place this code.... can someone guide me where to paste this code and run the command please.


texts: Search Term keep on reappearing after deleted

texts:
I deleted all search terms in catalog/search terms/select all/delete to clear but then in few minutes later it reappears in the dashboard.I want to show new search terms in the dashboard from scratch.

Same thing is happening to report/shopping cart/Products in carts.After I cleared with sql script.

How can I prevent this problem?


texts: Invalid scope type 'containers_stores' in Magento 2.3.3

texts: In Magento 2.3.3 on going to the listing page, it's showing an error like main.CRITICAL: Invalid scope type 'containers_stores' [] [] and because of that my listing page getting blank. I followed this issue https://github.com/Smile-SA/elasticsuite/issues/1361 for it doesn't help. So how do I overcome this issue?


texts: Patch SUPEE-6788 Caused issues, now unable to revert

texts:
I recently had problems applying PATCH_SUPEE-6788_CE_1.7.0.2_v1-2015-10-27-12-00-16.sh

After looking around I found that replacing my modified .htaccess file with the one that came with the original install then applying the patch would work, and it did. Unfortunately now I'm getting a M2E Pro error.

Also, image uploads have slowed, and oddly my carousel slider on the home page has disappeared.

I've tried to revert the patch but not get this error:

ERROR: Patch can't be applied/reverted successfully.
patching file .htaccess
Unreversed patch detected!  Ignore -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file .htaccess.rej
patching file .htaccess.sample
Unreversed patch detected!  Ignore -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file .htaccess.sample.rej

I've tried reverting with both the modified and original .htaccess files with no luck. Any idea on how to revert the patch? Thanks


texts: Category does not exists in rows: 119, 120, 121, 122, 123, 124, 125... Problem in importing products in magento 1.9

texts:
I tried to import product from import/export. I got an error Category does not exists in rows: 119, 120, 121, 122, 123, 124, 125...

What i did was :

Checked uppercase, lowercase, whitespace from _category column
Checked backend categories. They do exists.
If i place a single category to every product. No error.

What can be the possible solution for this issue. Please suggest.
Thanks.


texts: Is there a method to get a custom customer attribute value from a drop-down attribute through the Magento soap API?

texts:
I have extended the Magento soap API in a custom module via wsi.xml and wsdl.xml to bring in a custom attribute added to my customers. The extension works fine to bring in the custom attributes I add via the back-end. However, if that attribute is a drop-down, the value retrieved through the API is the drop-down's option id.

I am retrieving my custom attributes via customerCustomerInfo. As seen in the Magento API documentation. I have provided my wsi.xml and wsdl.xml below for clarity's sake.

Is there a way to get the actual option name through the soap API instead of the id?

wsi.xml

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:typens="urn:Magento" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="Magento" targetNamespace="urn:Magento">
    <wsdl:types>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
            <xsd:complexType name="customerCustomerEntity">
                <xsd:sequence>
                    <xsd:element name="customertype" type="xsd:string" minOccurs="0" ></xsd:element>
                </xsd:sequence>
            </xsd:complexType>
        </xsd:schema>
    </wsdl:types>
</wsdl:definitions>

wsdl.xml

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:typens="urn:{{var wsdl.name}}" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"
    name="{{var wsdl.name}}" targetNamespace="urn:{{var wsdl.name}}">
    <types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
            <import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
            <complexType name="customerCustomerEntity">
                <all>
                    <element name="customertype" type="xsd:string" minOccurs="0" />
                </all>
            </complexType>
        </schema>
    </types>
</definitions>


texts:
I am using the following to remove an Item from the Mass Action menu in the orders screen, I am struggling with making it work for multiple items.
class MassAction extends \Magento\Ui\Component\MassAction
{
    private $authorization;
    public function __construct(
            \Magento\Framework\View\Element\UiComponent\ContextInterface $context,
            \Magento\Framework\AuthorizationInterface $authorization,
            array $components,
            array $data
    ) {
        $this->authorization = $authorization;
        parent::__construct($context, $components, $data);
    }

    public function prepare() {
        parent::prepare();
        $config = $this->getConfiguration();
        $allowedActions = [];
        foreach ($config['actions'] as $action) {
            if ('cancel' != $action['type']) {
                $allowedActions[] = $action;
            }
        }
        $config['actions'] = $allowedActions;
        $this->setData('config', (array)$config);
                parent::prepare();
        $config = $this->getConfiguration();
        $allowedActions = [];
        foreach ($config['actions'] as $action) {
            if ('hold_order' != $action['type']) {
                $allowedActions[] = $action;
            }
        }
        $config['actions'] = $allowedActions;
        $this->setData('config', (array)$config);
    }
}

Can anyone assist?


texts: Magento 2 - Blank Theme not showing up good on mobile

texts:
I have a child theme that is exactly like the blank theme in Magento two. I have uploaded my product images. On some of the product pages, the site does not fill the size of the mobile screen. Its actually bigger, and the user needs to shrink the page to view the product page.

This is only happening with some products, so I assume it has something to do with some of the product images. For example, some of the product images when they load on mobile, are half on screen, and half off screen, so the user will have to shrink it to see the whole page.

Weird right? Only on some products. The rest of the pages are fine. I have used both PHP GP and Imagik to resize the catalog photos, but for some reason, some of them on mobile are making the screen size bigger than the mobile device.

And Google does not like this! Any advice?


texts: how to join custom table in sales order table \Magento\Sales\Model\OrderRepository magento 2

texts:
i want to join custom table in repository in magento 2

but i tried

this tutorial (blog)

https://fishchenko.com/blog/magento-2-join-table-in-orderrepositorygetlist-custom-field/
it was not clear
is anyway to join custom table in orderRepository ?


texts: Magento 2 Catalog Search not showing correct results

texts:
Whenever I enter the keyword in the search bar and hit enter then the results are not related to that keyword.

For example, when i start typing madinah arabic there is a lot of results against that keyword in product search suggestions but when I hit enter it is giving totally different results in the Magento catalog search.

Product Search suggestions  :

Catalog Products Result :


texts:
I want to display the custom text under payment method(admin order).

How to display the custom text under payment method in below layouts

sales_order_view.xml
sales_order_invoice.xml
sales_order_creditmemo.xml

Thanks.


texts: I need a extension to let customer choose dealer location on check out, Anyone knows how to accomplish this?


texts: How I can use 2.1.8 extension on magento 2.2

texts: I want to know that is something about structure changed in magento 2.2 that extension of magento 2.1.8 (tested) not working on it ? I have to change something to run on it ?


texts: Magento 2: How to find which config causing error “Malformed UTF-8 characters, possibly incorrectly encoded” when trying to serialize checkout config

texts:
I'm on Magneto 2.3.4. In vendor/magento/module-checkout/view/frontend/templates/onepage.phtml there's a line like this:

        window.checkoutConfig = <?= /* @noEscape */ $block->getSerializedCheckoutConfig() ?>;

Following the function, it comes down to vendor/magento/module-checkout/Block/Onepage.php::getSerializedCheckoutConfig()

And the serialize function is in vendor/magento/framework/Serialize/Serializer/JsonHexTag.php

I added json_last_error_msg() to the exception message, and basically the error message is now:

Exception #0 (InvalidArgumentException):
Unable to serialize value. Error:Malformed UTF-8 characters, possibly incorrectly encoded

How to quickly find the checkout configuration value or key that is having malformed UTF-8 characters? Or how to quickly fix this in database?


texts: I would like to know you kindly ... I have installed update 1.9.3.3 .. should I also install the SUPEE -9767 patch? Or is the latter included in the previous update? Thanks a lot CM


texts: Show regular price big IF no minimal price is provided (see image)

texts:
I'm having a little problem here. So, the minimal price is shown big and on the left on the first product, but on the second product there is no minimal price.
What i'm trying to do, is have the normal price on the left (like on the first product) IF there is no minimal price.

I've already looked around in the list.phtml, but i can't seem to find the .price-box class in there.

Any help on the matter would be much appreciated!


texts: How can i translate custom module text that i cant with inline translate in Magento 2

texts:
There are many text in my custom theme and modules that i can't translate.
I tried inline translate but there's no little book or red dots.
Also tried to create i18n folders inside and outside the modules' root folder with en_US.csv and hu_HU.csv after changing the locale but nothing.

This is what i see when i check the source code:

Purchased Date

Thank you


texts: Set custom order status for complete PayPal Website Payments Standard payment?

texts:
We are using Magento EE 1.13.0.2 with the PayPal Website Payments Standard payment method. Unfortunately it's not possible to set an order status for paid PayPal orders in the back-end.

We need to set a custom order status when the order has been paid successfully (and not partial). Tutorials to modify the PayPal order status seem to be outdated, wrong or ugly hacks.

From what I gathered:

the payment updates would be handled by PayPal IPN.
There is a method Mage_Paypal_Model_Ipn::_registerPaymentCapture() responsible for "Process completed payment (either full or partial)".
In Mage_Paypal_Model_Ipn::_registerTransaction() the request from PayPal is analysed and the payment status is compared to Mage_Paypal_Model_Info::PAYMENTSTATUS_COMPLETED.

To be honest I'm not sure what to do with this information. I may rewrite Mage_Paypal_Model_Ipn::_registerTransaction() and just add my code:

// paid
case Mage_Paypal_Model_Info::PAYMENTSTATUS_COMPLETED:
    $this->_registerPaymentCapture(true);
    // my code here
    break;

Of course an event observer (e.g. for one of the order or order state events) would be much nicer but I'm not sure if there is a 100% reliable way to catch that one-time event when the order gets paid completely via PayPal.

Any ideas?

Update

We chose to modify our order status flow and don't need to modify the status anymore. I'll leave the question open for some time in case somebody wants to answer it.


texts: How to migrate Product custom options records from magento 1.7 to magento 2.x in product edit, order, invoice,Shipment and Credit memo?

texts:
I looking for the migrate Product custom options records from magento 1.7 to magento 2.x
I have have migrated all the data from magento 1.7 to magento 2.2.6, but custom options not showing.


texts: Magento 2 - How to change Mega Menu sort order in store views alphabetical for each store view?

texts:
maybe one of you is facing the same issue and has solved it already.

We are using the Mega Menu for Magento 2. We have 5 store views (German, English, Spanish, Italian, French)

Our default language shop and store view is german.

Now I sort my categories alphabetical for german in the backend which then is reflected in the sort order in the mega menu in the front end as well.

But this sort order of the categories is then taken for all other languages as well and mixed up. I have not found a way to sort each store views categories alphatebically individually.

How would you solve this? Is a styling via CSS or such possible for the other languages than German possibly?

Maybe one of the experts out there has a hint.

Thanks a ton in advance.


texts: Assign Different Tax Class to NOT LOGGED IN Group Based on Store

texts:
Magento 1.9.2.2

I am looking for a way to apply a different tax class to the NOT LOGGED IN customer group based on the store the user is in.

I have two stores, one for a business located in Nevada and the other for a business located in California. The Nevada store needs to charge tax only to NV residents; the California store only to CA residents.

I have created a customer group for each store which has that state's tax rule applied to it. New accounts are set up with the appropriate customer group and taxation is working on that end.

However, guest checkout is enabled and I cannot get the tax calculation to work properly for the NON LOGGED IN customer group.  This group's tax class is currently set to Retail Customer and the problem I'm running into is one of three options:

1) Both NV and CA residents are charged tax on both stores if I add both states' tax rules.
2) Only NV or CA residents are charged tax on both sites if I add one of the states' tax rules.
3) Nobody is charged tax.

What I'd like to do is automatically set a state-specific tax class to the NOT LOGGED IN customer group based on the store that is being viewed. So when a user visits the CA store and are not logged in, they're automatically using the CA tax class and will be charged tax if they reside in CA; conversely, a visitor to the NV store would automatically use the NV tax class so they're charged tax only if they reside in NV.

Is this possible or is there an easier solution that I'm completely missing here?


texts: Uploading Magento Enterprise and Community Extensions

texts:
So for about 2 years we have had a single version of our extension to cater for both Enterprise and Community however we plan to launch a separate version today for Enterprise with some exclusive functionality.

So I now have 2 packages to upload to Magento connect, I've already uploaded the community version with only community versions supported selected however the Enterprise version now wont upload as the version number already exists.

All I'm looking to achieve is a user can select on Magento connect whether they want the Community or Enterprise version and the correct package to download.

My initial thought is you need to run the 2 packages on different version numbers but that seems a little silly, but could anyone confirm this is correct?


texts: How to get the Unit of measure label of product attributes like weight,Length etc in product detail page?


texts: Simple question, how to translate string "settings" on mobile menu?


texts: Magento 2.3 : In API Cart Items are clear when payment failed

texts:
Cart items  clear before payment success if the payment is failed then cart products are cleared in API. Actually I need  if payment is failed the product no need to remove from carts this case working in web but not in API !!. how can i solve this problem in Magento 2.3

Thanks


texts: magento 2 Adding one more Add to cart button

texts: How to add one more add to cart button in magento 2 product view page and working of 2 buttons are independently [not conflict one button to another button] and validations also must to add product to cart. Please help me


texts: One observer listening for two or more events

texts:
Is it possible for one custom observer to listen to more than one event?

I have a custom observer which right now is listening to only one event, I would like to add 1 or more events for that observer to listen to.

Is it possible or should I create a new observer for each event I want to listen?


texts: Product Flat Data unable to Re-index Even Trauncate catalog_product_flat_*

texts:
Product Flat Data Unable to Reindex.

I am getting in some post that truncate catalog_product_flat_*. But i dont want to truncate all table of it.

I Truncate first three but not able to reindex.

Why we need to truncate all table ? Is there any reason ?

So if any other solution.Which can able to solve my problem.


texts: Magento 1.9.1.0 Cron job / Order confirmation mail not sent

texts:
I've set up a Cron job through cPanel for my Magento install using the code:

* * * * * wget -O /dev/null -q http://www.webpage.com/shop/cron.php > /dev/null

(the cron.php file is in the public_html/shop/ folder).

The Cron settings in the Admin panel are:

I installed SMTP pro, and the Self-Test was successful.

I installed AOL Scheduler and the timeline looks like this:

But order confirmation mails are still not send to the customers.

Anyone has an idea what could be the problem?

Regards


texts: How to modify the export function to keep formula

texts:
I need to make a website that allow export to .csv with formula, so that my customer can edit that .csv file

I'm going to use PHPExcel https://github.com/PHPOffice/PHPExcel as a library to do the export. I'm familiar in using this library with plain PHP and some other PHP frameworks, but not in Magento.

What I want to know is which module that I need to override (or create new one) to implement my export function? (I know that Magento has import/export function, but it only keep the data, not the formula of .csv file).

And because Magento has some more new concepts like Block, Template, Layouts... I don't know where to start. Any suggestions?

Thank you very much!


texts: PHPUnit\Framework\Exception Undefined offset: 43

texts:
I am running magento admin login test and i am getting error : "[PHPUnit\Framework\Exception] Undefined offset: 43"
Below are the logs:

1. // Entering Action Group [loginAsAdmin] AdminLoginActionGroup

#1  C:\xampp\htdocs\magento2\vendor\magento\magento2-functional-testing-framework\src\Magento\FunctionalTestingFramework\Codeception\Subscriber\Console.php:236
#2  C:\xampp\htdocs\magento2\vendor\magento\magento2-functional-testing-framework\src\Magento\FunctionalTestingFramework\Codeception\Subscriber\Console.php:165
#3  C:\xampp\htdocs\magento2\vendor\magento\magento2-functional-testing-framework\src\Magento\FunctionalTestingFramework\Codeception\Subscriber\Console.php:130
#4  C:\xampp\htdocs\magento2\vendor\symfony\event-dispatcher\EventDispatcher.php:264
#5  C:\xampp\htdocs\magento2\vendor\symfony\event-dispatcher\EventDispatcher.php:239
#6  C:\xampp\htdocs\magento2\vendor\symfony\event-dispatcher\EventDispatcher.php:73
#7  C:\xampp\htdocs\magento2\dev\tests\acceptance\tests\functional\Magento\_generated\default\AdminLoginSuccessfulTestCest.php:35
#8  Magento\AcceptanceTest\_default\Backend\AdminLoginSuccessfulTestCest->AdminLoginSuccessfulTest

Configuration:
Generate Tests Command Run
Codeception PHP Testing Framework v4.1.5
Powered by PHPUnit 9.1.5 by Sebastian Bergmann and contributors.
Running with seed:

Any help would be highly appreciable.

Thanks


texts: display the quantity box in product view page

texts:
we saw "quantity" box in our product view page before

now Quantity box is missing in product view page after a lot of customizations in view.phtml and after installing some extensions.

before addto cart.phtml is calling from theme.

app/design/frontend/default/theme_name/template/catalog/product/addtocart.phtml

now the quantity box is calling from some extension files.

app/design/frontend/default/default/template/extension_name/catalog/product/view/addtocart.phtml

this is our addtocart.phtml = http://pastebin.com/ZNyvyzQ9

now, what I should do to display only the quantity box on the product page.


texts:
Is it possible to display on the product page how many customers purchased a certain item?

How would I achieve this?


texts: Magento 2 : Please upgrade your database while database is newer than required

texts:
I am getting this error when moving Magento 2 website to Google Cloud (Click to Deploy).

I have merged theme files and media files and it worked fine. When I
have connected to my old database it says this error.

I have tried these commands

1) php bin/magento setup:upgrade
2) php bin/magento setup:di:compile
3) php bin/magento setup:static-content:deploy
4) php bin/magento indexer:reindex
5) php bin/magento cache:clean
6) php bin/magento cache:flush

I am new here. and this is my first question.

Thanks


texts: What is use if this code $resultPage->setActiveMenu() in magento 2?

texts:
$resultPage->setActiveMenu('Panacea_Images::author')

I have created a custom module for images and this is my menu name Panacea_Images::author, but it's not working.
Can anyone explain the logic behind it and how the function work and the parameter which i pass, where the call will go from that line ?


texts:
I have changed the transaction grid so I needed to do it in local folder because they were comming from Core files. here is the folders structure

so in the controller I have done this:

   public function exportCsvAction()
{
    $fileName = 'Transaction.csv';
    $grid = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Sales_Transactions_Grid');
    $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
}

and in the Grid.php :

    class Mage_Adminhtml_Block_Sales_Transactions_Grid extends Mage_Adminhtml_Block_Widget_Grid
    {
        protected function _prepareColumns()
        {
            $helper = Mage::helper('Adminhtml');
            //some code
            $this->addExportType('*/*/exportCsv', $helper->__('CSV'));
            return parent::_prepareColumns();
        }
//some code and functions
}

it does not work I could not see anything in log files. I'm not sure why we have this path */*/exportCsv what does it mean? well it worked in all modules so I just did it but i don't understand it.

also I do not know about the $helper, what should be written I tried Mage_Adminhtml but it gave me error of something like Mage_Mage_Adminhtml_... so I guessed it should be only Adminhtml

I also did this:

 public function exportCsvAction()
    {
          $fileName   = 'Transaction.csv';
        $content    = $this->getLayout()->createBlock('adminhtml/sales_transactions_grid')
            ->getCsv();

        $this->_prepareDownloadResponse($fileName, $content);

    }

no result 404 not found

I logged a message in this function and I have realized that it does not even go to the exportCsvAction function for some reason

How can I fix it? Thank you.


texts: Magento 1.9 Admin Module Error Path menu

texts:
Error:

 ERR (admin): /index.php/admin/system_config/edit/section/mycompany_mymodule/key/

when I'm on the admin panel and I click on mycompany -> mymodule menu, appears page with error 404 and inside the logs the line above

Path all File:

app\code\local\MyCompany\MyModule\etc\config.xml
app\code\local\MyCompany\MyModule\etc\system.xml
app\code\local\MyCompany\MyModule\Helper\Data.php
app\code\local\MyCompany\MyModule\Model\Observer.php
app\etc\modules\MyCompany_MyModule.xml

Code MyCompany_MyModule.xml:

app\etc\modules\MyCompany_MyModule.xml
<?xml version="1.0"?>
<config>
<modules>
    <MyCompany_MyModule>
        <active>true</active>
        <codePool>local</codePool>
        <depends></depends>
    </MyCompany_MyModule>
</modules>
</config>

Code config.xml:

<?xml version="1.0"?>
<config>
<modules>
    <MyCompany_MyModule>
        <version>1.0.0</version>
    </MyCompany_MyModule>
</modules>
<!-- -->
<global>
    <blocks>
        <mycompany_mymodule>
            <class>MyCompany_MyModule_Block</class>
        </mycompany_mymodule>
    </blocks>
    <helpers>
        <mycompany_mymodule>
            <class>MyCompany_MyModule_Helper</class>
        </mycompany_mymodule>
    </helpers>
    <models>
        <mycompany_mymodule>
            <class>MyCompany_MyModule_Model</class>
        </mycompany_mymodule>
    </models>
</global>
<!-- -->
<adminhtml>
    <layout>
        <updates>
            <mycompany_mymodule>
                <file>mycompany/mymodule.xml</file>
            </mycompany_mymodule>
        </updates>
    </layout>
    <!-- Main Menu -->
    <menu>
        <mycompany translate="title" module="mycompany_core">
            <title>mycompany</title>
            <children>
                <mycompany_mymodule translate="title" module="mycompany_mymodule">
                    <title>mycompany new module</title>
                    <sort_order>10</sort_order>
                    <action>adminhtml/system_config/edit/section/mycompany_mymodule</action>
                </mycompany_mymodule>
            </children>
        </mycompany>
    </menu>
</adminhtml>
<!-- -->
<acl>
    <resources>
        <admin>
            <children>
                <mycompany>
                    <title>My Company</title>
                    <children>
                        <mymodule>
                            <title>Settings Example</title>
                        </mymodule>
                    </children>
                </mycompany>
            </children>
        </admin>
    </resources>
</acl>
<!-- -->
<default>
    <mycompany_mymodule >
        <mymodule_group>
            <example>10</example>
        </mymodule_group>
    </mycompany_mymodule >
</default>
</config>

does anyone see what I was wrong to write?


texts: Magento2 how to use setCustomAttribute properly

texts:
I'trying to set custom attribute to quote item by method setCustomAttribute from Magento\Quote\Model\Quote\Item. Below is my code

events.xml

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_quote_item_set_product">
        <observer name="product_point_quote" instance="Vendor\Producer\Model\Observer\Sales\Quote\Item\SetCustomAttribute"/>
    </event>
</config>

SetCustomAttribute.php

<?php
namespace Vendor\Producer\Model\Observer\Sales\Quote\Item;

use Magento\Framework\Event\ObserverInterface;

class SetCustomAttribute implements ObserverInterface
{

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $product = $observer->getProduct();
        $quoteItem = $observer->getQuoteItem();
        $quoteItem->setCustomAttribute('producer', $product->getProducer());
    }
}

But it doesn't work. Below is code of setCustomAttribute from Magento\Quote\Model\Quote\Item

public function setCustomAttribute($attributeCode, $attributeValue)
{
    $customAttributesCodes = $this->getCustomAttributesCodes();
    /* If key corresponds to custom attribute code, populate custom attributes */
    if (in_array($attributeCode, $customAttributesCodes)) {
        $attribute = $this->customAttributeFactory->create();
        $attribute->setAttributeCode($attributeCode)
            ->setValue($attributeValue);
        $this->_data[self::CUSTOM_ATTRIBUTES][$attributeCode] = $attribute;
    }
    return $this;
}

It doesn't work because the method getCustomAttributesCodes() returns an empty array. The question is how to use method setCustomAttribute() in the proper way? How to populate array with custom attributes codes from getCustomAttributesCodes()?


texts:
Using models how would I get the last inserted customer, even if that customer was inserted 6 days ago?

Would the best bet to get customers and order by date created and limit it to 1 result?


texts: Magento 2: How to apply my jQuery click events for fields in Admin panel?

texts:
I am using Magento 2.2.0. Can I apply custom js click events for any field in configuration page

  Stores -> Configuration

This is my configuration. Here I need to load Attribute Type Dropdown based on what is chosen in Document Type dropdown.


texts: Can't upgrade from 2.0.7 to 2.1.0 - Package magento could not be found in any version

texts:
I'm trying to upgrade via command line from 2.0.7 to 2.1.0 but I keep getting errors.

Here is what I did first:

composer require magento/product-community-edition 2.1 --no-update
composer update

Then I've got the error below (The requested package magento could not be found in any version), see image:

I have tried using (product-community-edition 2.1 , product-community-edition 2.1.0 , product-community-edition 2.1.0-rc3) and nothing.

I tried to change the composer repo by using:

composer config repositories.magento composer repo.magento.com

Then I run again the commands to update and now I have a different error:

[Composer\Downloader\TransportException]

Your configuration does not allow connections to http://repo.magento.com/packages.json. See https://getco

Any help is appreciated.

Update - Posting Compose File

{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"version": "2.0.2",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"repositories": {
    "0": {
        "type": "composer",
        "url": "https://repo.magento.com/"
    },
    "magento": {
        "type": "composer",
        "url": "repo.magento.com"
    }
},
"require": {
    "magento/product-community-edition": "2.1",
    "composer/composer": "@alpha",
    "magento": "2.0.1"
},
"require-dev": {
    "phpunit/phpunit": "4.1.0",
    "squizlabs/php_codesniffer": "1.5.3",
    "phpmd/phpmd": "@stable",
    "pdepend/pdepend": "2.2.2",
    "sjparkinson/static-review": "~4.1",
    "fabpot/php-cs-fixer": "~1.2",
    "lusitanian/oauth": "~0.3 <=0.7.0"
},
"config": {
    "use-include-path": true
},
"autoload": {
    "psr-4": {
        "Magento\\Framework\\": "lib/internal/Magento/Framework/",
        "Magento\\Setup\\": "setup/src/Magento/Setup/",
        "Magento\\": "app/code/Magento/"
    },
    "psr-0": {
        "": "app/code/"
    },
    "files": [
        "app/etc/NonComposerComponentRegistration.php"
    ]
},
"autoload-dev": {
    "psr-4": {
        "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
        "Magento\\Tools\\": "dev/tools/Magento/Tools/",
        "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
        "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
        "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
    }
},