texts: Create an extension in Magento for Web push Notifications

texts:
I want to create an extension with web push notification in Magento. Purpose of this extension is to send notification on customer system even web site is not open.
I wanna to create an extension to add notification functionality like this site is providing

https://www.izooto.com

I am using the Google service worker for implementation.

We want to create functionality like Facebook or any other eCommerce site that send notification on user system even site not open.
I am not aware how we can send notification on each event like customer purchased an item or notification on customer login.

Please suggest how we can initiate this extension.I have integrated  with help of this link:

https://developers.google.com/web/updates/2015/03/push-notifications-on-the-open-web?hl=en

I did lot of R&D on it and implemented basic example to send notification but how I can make notification data dynamic
Any help will be appreciated.


texts:
How can I add new stock labels to magento 2 so they appear in the product stock status select box ?

Thanks.


texts: How do i apply path APPSEC-1679 for Magento 2.3.1 via composer

texts:
Could you please provide the clear steps to apply the patch via composer for Magento 2.3.1 version.

  APPSEC-1679 - API ACL - Failed.

  API ACL Patch not detected


texts:
Mysql using 80% cpu power. It's causes server down. so we're planning to move our mysql to another server. Searched on google but did not found any good results. Can you guys please explain what should we do? or how to connect with a remote database?
Thank you in advance


texts: Where can I find the last Magento 1.9.3.x package?

texts:
If I look here I can find only a 1.9.2 version.
I'd like to upgrade on a new fresh installation, but I can't find a recent full Magento version...


texts: show error message through plugin Magento2

texts:
Hi i have use a plugin feature in my module to check the zipcode is available in the module or not .Which works fine but on validating i have set the error message like

<?php

namespace Company\Mymodule\Plugin\Checkout\Model;
use Magento\Framework\Exception\NoSuchEntityException;

class ShippingInformationManagement
{

    protected $_messageManager;
    protected $jsonResultFactory;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\Controller\Result\JsonFactory $jsonResultFactory,
        \Magento\Framework\Message\ManagerInterface $messageManager,
        \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
    ) {
        $this->_messageManager = $messageManager;
        $this->jsonResultFactory = $jsonResultFactory;
    }

    public function beforeSaveAddressInformation(
        \Magento\Checkout\Model\ShippingInformationManagement $subject,
        $cartId,
        \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation

    )
    {
    $address = $addressInformation->getShippingAddress();
    $postcode = $address->getData('postcode');
    $objectManager =   \Magento\Framework\App\ObjectManager::getInstance();
    $connection = $objectManager->get('Magento\Framework\App\ResourceConnection')->getConnection('\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION');
    $result1 = $connection->fetchAll("SELECT shipregioncodes FROM shipregioncodes_shipregioncodes WHERE shipregioncodes=$postcode");
    $count = count($result1);
    $result = $this->jsonResultFactory->create();
    if($count==0){
            $this->_messageManager->addError("hiiiiiiii");
            throw new NoSuchEntityException(
                __('Shipping is not available on provided zipcode %1', $postcode)
            );

    }
}
}

di.xml code is below

<type name="Magento\Checkout\Model\ShippingInformationManagement">
    <plugin name="get_shipping_info" type="Company\Mymodule\Plugin\Checkout\Model\ShippingInformationManagement" sortOrder="1"/>
</type>

it only shows the message in the console not on the site.Please suggest me how can i fix this.
thanks


texts: Which Versions of Magento 2 are latest till date?

texts: I was looking for latest and stable versions of Magento 2. Is there a proper guide which version is latest in different series like 2.4 or 2.7 ?


texts:
I have a very specific question about url rewrites.
Basicly I want an url to do rewriting to a product unindependent of the current store (so it has to be a unique url).
Given is following setup and requirements:

Add store code to urls: Yes (can not be changed anymore!)
URLs are unique (this is given and verified)
Rewrite request url (eg): a_shortcut
Rewrite target url (eg): catalog/product/view/id/[id]
URL has to be unique! So for example "a_shortcut" should always redirect to the english store whereas "eine_abkuerzung" should always redirect to the german store

Any ideas on how to solve this problem with switching the store and doing a rewrite at the same time?
Any thoughts on that are very welcome!


texts: Magento Shopping Cart Price rule condition not working

texts:
I have added this condition for my shopping cart price rule Diagnostic center is a custom attribute. I think the condition is not working that's why coupon code is not applied. please help me in this work.Please help me in this for getting out of my problem.

I need to solve it as soon as posible.


texts:
The default RWD theme has a file named 1column.phtml in template > page. This file contains this line:

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

I could make perfect use of this footer_before block, so I tried this in my local.xml:

<reference name="footer_before">
    <block type="core/template" name="team" as="team" template="custom/home/team.phtml" before="-">
         <block type="cms/block" name="home-team">
              <action method="setBlockId"><block_id>home-team</block_id></action>
         </block>
    </block>
</reference>

But it doesn't work. If I use the reference 'footer', and place <?php echo $this->getChildHtml('team') ?> in footer.phtml, it does work. But I want to use this footer_before section.


texts:
So am working on a widget which allows the client to choose an image from their library of images and then insert it into the widget's params. Here is the block class code I am using for the image chooser and below is the widget parameter declaration in widget.xml

<parameter name="widget_image_chooser" xsi:type="block" visible="true" sort_order="20" required="true">
    <label translate="true">Category</label>
    <block class="Company\Module\Block\Widget\Image\Chooser">
        <data>
            <item name="button" xsi:type="array">
                <item name="open" xsi:type="string">Select Image</item>
            </item>
        </data>
    </block>
</parameter>

Now the problem is when the widget is inserted to a CMS Page or Block, it is inserted as a media widget instance, breaking the code because there can't be double quotes within double quotes, see below.

{{widget type="Company\Module\Block\Widget\LityVideo" identifier="https://vimeo.com/169559548" widget_image_chooser="{{media url="wysiwyg/13876414_1349854728361522_4781756811153391947_n.jpg"}}"}}

Is there a way of solving this without having to use javascript? I haven't been able to find the Model which renders the widgets in the CMS in the backend.


texts:
I have added a collection to buff out related products with extra "most viewed" products from a products top level category.

This is a slow query and takes about 0.2 seconds so was wondering if this collection can be cached with a key based on top level category so I can query if this collection exists and add products to the current related products collection from the cached collection instead of rerunning it each time?

Something like below but this was for Magento 1:

https://stackoverflow.com/questions/3755104/how-to-cache-a-collection-in-magento

There could be anything up to 4000 products that could benefit from pulling products from this cached collection in some cases.

    if($this->_cacheType->load($categoryMain)) {
        $collection = unserialize($this->_cacheType->load($categoryMain));
    } else {
        $collection = $this->mostViewedCollection->addAttributeToSelect(
            ['name','sku','price']
        )->addViewsCount()->setStoreId(
            $storeId
        )->addStoreFilter(
            $storeId
        )->setPageSize(
            $count
        )
        ->addCategoriesFilter(array('in' => $categoryIds));
        $this->_cacheType->save(serialize($collection), $categoryMain, [\Harrigo\AutoAssociatedProducts\Model\Cache\Type::CACHE_TAG], 86400);
    }

The collections however throw an error when being sereialized which leaves me stuck. I do not want to turn it into an array as guess i'll have to rebuild items.phtml to render the collection. I have actually noticed that the main slow down seems to be elsewhere after timing the collections but I am still interested in this and what the proper way to achieve something like above would be.


texts:
I want to change the AMT that is passed to Paypal. My actual issue is that the AMT passed to Paypal API includes my flat rate shipping of 10 which needs to be removed as I have set free shipping for > 25 & 10 flatrate for < 25.

I want to check from where AMT is set in Paypal with Shipping amount so I can set condition of > 25.

Currently, cart page & all are showing perfect amount except the paypal API


texts: What does this pattern match when filtering strings for URLs

texts:
What exactly is this line for

preg_replace('#[^0-9a-z]+#i', '-', parent::filter($string))

in the following method in \vendor\magento\framework\Filter\TranslitUrl.php:

public function filter($string)
{
    $string = preg_replace('#[^0-9a-z]+#i', '-', parent::filter($string));
    $string = strtolower($string);
    $string = trim($string, '-');

    return $string;
}

The method is used to filter strings which will be used in URLs, and I know that line replaces some strings with - character. But I don't fully understand what exactly this pattern #[^0-9a-z]+#i matches.

I will appreciate any hints.


texts: Magento 1 : Custom address attribute is not appearing in order using custom module

texts:
I've installed a simple module that creates a new attribute in the customer address.
I'm able to see it both on frontend and backend, but once the order is completed it's nor present in the order informations. I've no idea how to make it appear.
Probably a simple task but i'm new to magento.

This is checkout page, the field "Codice Fiscale 2" is visible

When the order is placed the field is not visible anymore.


texts:
I am trying to install Magento but when I get to the add database to the setup wizard I only get errors like these:

  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed:
  No such host is known.

Here's my database adress on azure:

sqlsrv:server = tcp:construbee.database.windows.net,1433

I can acess the database trough a php code on another server, but on magento It is not working. Am I typing something wrong?


texts: Custom Product attribute is not displaying while adding configurable product in Create New Attribute?

texts:
I have created attribute successfully using script.
It is displayed in Stores -> Product and assigned the custom attribute to product.
Now I want to display that custom attribute in Create New Attribute in configurable product?


texts:
I want to put a Magento Redirect rule to change the Blog URL.

FROM:
http://site.com/blog/cat/pets/page/2/

TO:
http://site.com/blog/pets/page/2/

So, basically I want to remove the /cat. Also, there are hundreds of pages on our blog. so page number is different for each URL.

thanks,
/pj


texts: How to add a field or any text to onepage step from layout file

texts:
I'm trying to add a block to the shipment step without touch the shipping_method.phtml file.

On my layout file if I use content as reference I can show my file but I can't find the way to show my file inside the step.

This works:

<checkout_onepage_index>
    <reference name='content'>
        <block type="core/template" name="my_name_module_file" as="my_name_module_file" after="checkout.onepage.billing" template="module/text_shipment.phtml" />
    </reference>
</checkout_onepage_index>

I'm trying this:

<checkout_onepage_index>
    <reference name='checkout.onepage.shipping_method'>
        <block type="core/template" name="my_name_module_file" as="my_name_module_file" template="module/text_shipment.phtml" />
    </reference>
</checkout_onepage_index>


texts:
In my Magento2 store I am only getting 9 search results visible, although there are more hits ...
But there is no pagination at the underside to go to the next page ...

So something is overruling this.

What XML file should I look for?

Because when i look for shirts, i have 190 results. But only 9 are shown (standard number of items per page)


texts: Magento 2 Fotoroma Gallery last Image display in first position when image are greater than 7

texts:
I am setting product gallery image and trying to upload more than 10 image as thumbnail image but when I am uploading thumbnail images more than seven last image comes at first place.While last image should be at last place and first.

If anyone have idea how to resolve it.


texts: Magento 2.3. - Customize product image on frontend

texts:
I would like to create custom fonts, pre-defined images uploaded in admin, and then on the frontend user can choose to customize the main product (for example product is a mug) and can choose to add one of the uploaded images in admin to be shown on the mug or can upload his own or can add his own text and can set font-family from one of the uploaded in the admin. And then the product is successfully added to the cart with users added information
Is there any advice on how to achieve that? I know that it will probably be a lot of javascript work to get it working as expected but any ideas and help would be appreciated.


texts: Magento2 - Controller creates duplicate categories

texts:
I am creating a custom module to get categories and regarding products from API and uploading them to the site.
After creating a controller for Categories, in the backend, there are duplicate categories created for some categories.
I am not getting the issue as this is not happening for all other categories.
The issue is every time Cron runs it creates the same category again.
Below is the snapshot of my category page in the backend.


texts: Magento 2 : How to change in order status and order id for display purpose in custom POS

texts:
We have Custom POS system enabled on the website.

Like to append some labels in the order id and order current status for the display purpose only in the POS system not for the website(frontend) order view /admin sales order view.

For e.g. If sales table having 10000101 order id then in POS it should show POS-10000101

Likewise for the current status, if order having PROCESSING status then it should show POS-PROCESSING.

Below is the webapi.xml code

<route url="/V1/webpos/orders/search" method="GET">
    <service class="Custom\Webpos\Api\Sales\OrderSearchRepositoryInterface" method="search"/>
    <resources>
        <resource ref="Custom_Webpos::manage_pos" />
    </resources>
</route>

code for \Custom\Webpos\Api\OrderSearchRepositoryInterface.php

namespace Custom\Webpos\Api\Sales;
interface OrderSearchRepositoryInterface
{

    public function search(\Custom\Webpos\Api\SearchCriteriaInterface $searchCriteria);
}

code for model OrderSearchRepository which is implementing OrderSearchRepositoryInterface

namespace Custom\Webpos\Model\Sales;
class OrderSearchRepository extends OrderRepository
    implements \Custom\Webpos\Api\Sales\OrderSearchRepositoryInterface
{

    public function search(\Custom\Webpos\Api\SearchCriteriaInterface $searchCriteria)
    {
        $collection = $this->getOrderCollection($searchCriteria);
        $searchResult = $this->searchResultFactory->create();
        $searchResult->setSearchCriteria($searchCriteria);
        $searchResult->setItems($collection->getItems());
        $searchResult->setTotalCount($collection->getSize());
        return $searchResult;
    }

    public function getOrderCollection($searchCriteria) {
        $collection = $this->collectionFactory->create();
        /** @var \Custom\Webpos\Api\Data\Sales\OrderSearchResultInterface $searchResult */
        if($searchCriteria ->getCurrentPage()) {
            $collection->setCurPage($searchCriteria->getCurrentPage());
        }
        if($searchCriteria ->getPageSize()) {
            $collection->setPageSize($searchCriteria->getPageSize());
        }

        $isLimit = $searchCriteria->getIsLimit();
        if($searchCriteria->getIsHold()) {
            $collection->addFieldToFilter('main_table.state', \Magento\Sales\Model\Order::STATE_HOLDED);
        } else {
            $collection->addFieldToFilter('main_table.state', ['nin' => \Magento\Sales\Model\Order::STATE_HOLDED]);
        }
        if($searchCriteria->getQueryString()) {
            $queryString = '%' . $searchCriteria->getQueryString() . '%';
            $collection
                ->joinToGetSearchString($queryString);
            ;
        }
        $collection->addOrder('main_table.created_at', 'DESC');
        return $collection;
    }

    }
}

Any sort of help would be appreciated.


texts: What CSS code can I use to fix my checkout buttons?

texts:
I need CSS that I can place in my custom CSS file that will fix the "Discount Codes" and "Place Order" buttons on my checkout page.

I need to manipulate each button color separately (if possible) and change both button background color and background hover color.

At the moment the green standard color will not disappear. It should be all red with a white text and pink hover. No green background in the middle of the button.

Checkout page is using the Magento extension IWD One Page Checkout.

Go here, add product to page, and then checkout to see problem: http://www.petpresto.com.au/large-chicken-coop-with-run-metal-pull-out-tray-and-vermin-proof-wire.html


texts: SOLVED: Magento 1.9 ignores config from default scope

texts:
The Magento shop of a new customer (I didn't set up the store, I was brought into the project as a developer) was recently infected with the magentocore.net skimming malware. I removed it from the database, secured the installation and so on.

A lot of configuration in the backend was done previously in the default scope. Most of the entries in core_config_data belong to that scope. However, this configuration is now ignored by Magento.

One concrete example:
- In the default scope, the locale options where set to timezone W. Europe and Locale to German.

In the frontend, the language shown is english.
I switched the configuration scope to the website and store, but in both cases, "use default" was selected.
but normally, when "use default" is selected, the correct value from the default scope is shown
this wasn't the case. Instead there was "AUS..." (the first option) as timezone and "Afrikaans" as locale.

The options from the default scope are getting ignored, in the backend and the frontend as well.

As a short fix, I changed a few options in the website scope.

What I don't understand is, why all of these options are getting ignored. Any pointers or ideas would be really appreciated. Thank you so much!


texts: import images from a 3rd party system via api

texts:
Before I start pulling my hair out with this one as I think its going to be a complicated one I would really appreciate someones advice.

i try to import image to  magento store but i don't know how.
so i want  to create plugin to import images from a 3rd party system via web service .

0
down vote
favorite
1
How do you import product images from a CSV file using System > Import/Export > Import?

I've followed suggestions from various sources but nothing works. This is the format of the CSV file:

"sku","image","small_image","thumbnail"
90048,"test.jpg","test.jpg","test.jpg"

how can i do it?

Would really appreciate your help!


texts: Figuring out which function to call for a plugin

texts:
I'm trying to create a plugin where if the final price is 0, instead of showing a price is should say "please call for pricing".
I created a plugin like this,  But I don't see any change.
<?php

namespace <Vendor>\<name>\Plugins;

class Product
{
    public function aftergetCatalogPrice(\Magento\Catalog\Model\Product $product, $finalPrice)
    {
        $price = $product->getData('price');
        if ($price === 0) {
            $finalPrice = "Please call for pricing";
        } else {
            return $finalPrice;
        }
        return $finalPrice;
    }
}

I have a plugin that does call for pricing, but I don't see anything that could be overriding the price.
How can I figure out where the price is being set so I can override it?
Thanks


texts: Magento 2 Transactional E-mail template engine. How it works?

texts:
In the order email template I need to do a if..else statement, but I don't know how to do it.

Below a template code snippet:

Oi {{var order.getCustomerFirstname()}}!

A sua compra foi confirmada com sucesso!

                    saiba que estamos imensamente felizes por você ter adquirido um ahimsa =)

Veja aqui os detalhes do seu pedido:

The variables are accessed as below:

{{var order.getCustomerFirstname()}}

So, how to do if...else statement?

{{ if something=='test' }}
  {{var order.getCustomerFirstname()}}
{{ endif }}

I tested:

{{if payment_html=="itaushopline"}}

ou copie e cole a linha digitável no seu banco

{{var order.getPayment().getAdditionalInformation('linha_digitavel')}}

{{/if}}

But did not worked.


texts: Magento 2: Translate This is a required field

texts:
I'm already having a lot of trouble translating some Magento 2 texts, but I really can't seem figure this one out. I'm trying to translate the "This is a required field." text to Dutch. I already tried editing it in my nl_NL.csv, in which other texts are being translated as well. I deployed, cleared my cache, removed my pub/static folder, all of which do not give me a result.

How do I do this?


texts: Get store configuration variable for addLink in local.xml

texts:
I'm am using the addLink method of Mage_Page_Block_Template_Links in my local.xml, which uses links.phtml as a template.

Is there some way of passing links.phtml the store email/phone addresses which I would normally get from from Mage::getStoreConfig('general/store_information/phone')?

I.e. something like:

<reference name="top.links">
        <action method="addLink">
                <url>tel:<?php echo Mage::getStoreConfig('general/store_information/phone') ?></url>
    </action>
</reference>

Thank you!


texts: Do I need a custom payment method for a third party that handles Credit Card payment? Or is there something already provided by Magento?

texts:
I'm using a third party payment gateway that I forward the user to after checking out so that he can enter his credit card info. The gateway then later provides a callback to our server regarding the status of the payment.

What do I need to set the payment method as, in the order?
setPaymentMethod('......');

Is there a default one for such a scenario? Or do I need to make my own, custom payment method?


texts: Magento2: How can call observer function in controller file?

texts:
I have created a custom observer below:

Observer file

public function abc($order,$itemIds) {

}

Controller file

public function aaa($order,$itemIds) {
    here we want to call abc($order,$itemIds);
    }

Want to call this observer function in custom controller file.
How can do this? Anyone have an idea for that please.


texts:
While doing bit research for speed issue of magento website i got some links where people says enable "Flat Catalog" to increase performance and speed .

Issue is that why it is not enabled by default is speed is issue.

Will enable "Flat Catalog" had some adverse effect also?

My magento website had 100 products and 500 bundled products and speed is quite issue as i am loading 36 products at once.

Will enabling "Flat Catalog" address my problem?


texts:
we use the wrapper for sql queries instead of the raw ones.

I have a collection, which has two fields A and B.
I want to query when (A = red AND B = square) OR (A = blue AND  = circle)

When we try to use addAttributeToFilter, I don't see any option to handle such cases.

So, is there any way I can fetch data in a case like this?


texts: Magento 2 - display custom product details tab conditionally & as an URL

texts:
I want to create a custom product detail tab "Q&A" and only display the tab when there is an Q&A questions exist for the product, and the tab will be the hyperlink to the FAQ page ( for example: www.abc.com/kbase/search/query/[SKU])

For magento 2, I only know we can create the custom product tab using catalog_product_view.xml, i'm not sure how to implement this.

below is how it's currently done in magento 1, using view.phtml

            <?php { ?>

Overview

            <?php } ?>
            <?php if( $_product->getFeatures() || $_product->getSpecifications() ){ ?>

Specifications

            <?php } ?>

            <?php
                $query = $_helper->productAttribute($_product, $_product->getsku(), 'sku');
                $object = Mage::getModel("kbase/article")->getCollection()->addSearchFilter($query);
                if(count($object)>0) {
            ?>

<a href='/kbase/search/query/<?php echo $_helper->productAttribute($_product, $_product->getsku(), 'sku'); ?>/' target='_blank'>Q&A

            <?php } ?>

        <?php if( $_product->getQAndA() ){ ?>

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

        <?php } ?>


texts: Display Customer Name in custom module grid column

texts:
I want to display customer name based on customer id in my custom module grid column.

Currently customer id only showing in the grid column. Please check attached image.


texts: Loading icon for literally MINUTES after pressing Place Order - Magento 2.3.5

texts:
Magento 2.3.5 site that loads pretty quickly generally, checkout maybe a few seconds to load but that seems par for the course for Magento 2
However, the issue is that after pressing 'Place Order' the loading icon literally shows for 2-3 minutes before loading the success page.
This happens if using OneStepCheckout, the default one page checkout or regular checkout and using Braintree or Cash On Delivery plugin.  The only shipping method is 'Free'
What I have noticed is that we get an order confirmation email fairly quickly (15-20 seconds) and then an invoice always arrives exactly 2 minutes after the order confirmation - and it is after this that the success page loads.
We don't need the invoice to be sent automatically, and I guess this is contributing to the excessive load time - is there any way of stopping this?
Any other ideas for what could be causing this ridiculous load time?  I've checked debug.log / system.log while it's happening and literally nothing shows


texts: How can we hide/remove country & state from Estimate Shipping and Tax form in magento2?

texts:
I want functionality to calculate shipping estimation only from the zip code. I don't want to show country & state fields in shipping estimation form.

Is anyone know how can we achieve this functionality in magento2 on cart page like attached screenshot?


texts: Marketplace Release - Extension Using External Composer Packages

texts:
I'm using some composer packages (like microsoft/application-insights) in the extension I've developed and now that I'm trying to submit the extension for technical review I've got a lot of errors for the files from the vendor folder.
Is there some documentation about how to approach these cases? I've seen something about shared packages, but I don't think this is my case.

Anyone else has some experience with external packages in your extension?
Thanks


texts: Which one of the elements automatically render all it's children in layout (m2)

texts:
automatically render all it's children

<layout>
<container>
<block>
<action>

I feel like i've tried several now and they're not working for me. any of them. ugghhhh


texts: Magento 2 - 'Add Subcategory' button not showing in catalog categories

texts:
I don't understand why the Add Category button isn't showing up in my store. Does anyone have a solution for this?

Index and cache are normal. Every other button including the upload button works normally.

Screenshot


texts: Using Subtotal as condition for sales rule is not working in Magento 2.2.6

texts:
I have a sales rule that has these conditions. I have to apply a discount if the cart contains at least one product of one of these categories and if the subtotal is more than 25 euro.
The rule works fine if I don't add the subtotal part. As I add that condition, the coupon is not recognized by Magento 2.

As you can see, I've already tried to use the currency sign in order to make the rule more specific. I've read about this possible solution here (Discount coupon is not working for minimum subtotal) but it's not working. Note that I've already tried with only one of these subtotal conditions: I think that I've tried any combination of them: with different currency signes (€, Euro, EUR) or without, with the currency sign before or after the amount...
Have you ever experienced this issue? If yes, how have you solved it?
Do you know where in vendor folder Magento make the coupon validation related to subtotal? I've looked into /vendor/magento/module-sales-rule but I've found almost nothing.
Thank you for your help!


texts:
I'm facing an issue in Magento 2.2.0 and Unero Theme 1.3.2 where there are products that have an URL like:

https://example.com/catalog/product/view/id/440/s/product-url-key/57/

and the others are:

https://example.com/product-url-key.html

I'm checking the condition of SEO setting in the catalog's configuration, but I think it's already correct in the store view level setting.

And this is the SEO settings in the catalog -> product itself

I'm currently at the beginning state of developing and learn Magento Programming. Do it need code modification in core / theme? Or there are something wrong with the configuration?

Expected result are the second one where there is .html in the product's URL

Thanks.


texts: why can't we set base currency per store in magento?

texts:
This question is more on a confimation.
i have a problem on checking out via paypal because of magentos auto conversion of default currency to base currency. the solution i made is to make base currency visible in store config.

        <group id="options">
            Currency Options
            <field id="base" translate="label comment" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                Base Currency
                <frontend_model>Magento\Directory\Block\Adminhtml\Frontend\Currency\Base</frontend_model>
                <source_model>Magento\Config\Model\Config\Source\Locale\Currency</source_model>
                <backend_model>Magento\Config\Model\Config\Backend\Currency\Base</backend_model>
                <comment>
                    <![CDATA[Base currency is used for all online payment transactions. The base currency scope is defined by the catalog price scope ("Catalog" > "Price" > "Catalog Price Scope").]]>
                </comment>
            </field>
        </group>

things looks good on my side. but i feel something is wrong with this approach. i think magento made this feature avaible on global and website scope only for a reason. can someone give me some feedbacks and suggestions on how to do this properly?
much appreciated.


texts: what is user name means in upgradation of magento 2.2.4 to magento2.2.6?

texts:
what is user name means in upgradation of magento 2.2.4 to magento2.2.6 ?
I want to upgrade magento 2.2.4 to magento 2.2.6.
what is user name means in this upgradation.

Please see the below pic.


texts:
i was displaying a list of stores to get the flags.

But i want to display it in my own order so, as far as i know, i makes the loop as normal:

  <?php foreach ($_stores as $_store): ?>
        <?php
        // do not print flag for the current store
        if (Mage::app()->getStore()->getStoreId() == $_store->getId()) {
            continue;
        }

        if (!in_array($_store->getId(), array(1, 2, 9, 16, 18, 21, 22, 23))) {
            continue;
        }

There i check to don`t show the current store, and to check only the stores that i enter manually into the array.

But now i wants to get the stores in my own order.

I show it with this code:

        <a href="<?php echo $url ?>">
        <?php
        $store_id = $_store->getId();
        $logo_src = Mage::getStoreConfig('design/header/logo_src_small', $store_id)
        ?>
        <img class="mini-icon" src="<?php echo Mage::getBaseUrl('skin') ?>frontend/default/DESIGN/<?php echo $logo_src ?>" />
        <img class="mini-lang" src="<?php echo $this->getSkinUrl("images/flags/flag_$country.png") ?>" />
        <span class="span-lang" title="<?php echo $_store->getTranslatedName() ?>"><?php echo $_store->getTranslatedName() ?>

EDIT
My own order was: 1 - 2 -21 -23 -22 -16 -18

I did it on BE -> store_views -> store_order


texts: Why Magento 2 `addForeignKey` function does not have `onUpdate` and how to add it while adding foreign key

texts:
I have started with Magento 2 setup scripts and I found one small change with Magento's addForeignKey function parameters.
In Magento 1, the arguments for the function is like,

public function addForeignKey($fkName, $column, $refTable, $refColumn, $onDelete = null, $onUpdate = null)

There is an option for defining what to do on update of referenced table row,

While in Magento 2, the arguments for the same function is like,

public function addForeignKey($fkName, $column, $refTable, $refColumn, $onDelete = null)

They have remove onUpdate argument.
Does anyone have any idea about why they did that??
Also can anyone guide me what to do if I want to add onUpdate action for foreign key?


texts: What is the standard order process workflow in Magento 1?

texts:
I'm trying to understand the order process in Magento 1.7. The background is: I'm extracting the payment (and later the complete checkout) from Magento to another system, but the order processing should take place in Magento. So, I need to understand, at what places in the process I can / need to define interfaces to my other application.
I expected to find quite quickly a workflow diagram for the order process, including also the payment. But could not find anything so far, what would be more or less complete and contain payment.
What is the order process workflow (only for/with the Magento standard statuses), including the payment, in Magento 1?


texts: How to rewrite Magento 2 default contact page url

texts: How can I change Magento 2 contacts page URL from /contacts to contact-us.html?


texts: Why are some products imported from CSV missing their default Name, Descriptions, and Prices?

texts:
In Magento CE ver. 1.9.1.0 and 1.9.2.1 we have run into an issue where imported products are missing certain default fields, even though those fields are present and correct in the source CSV.  The fields that are missing are the default Name, Description, Short Description, and Price.  We're using the basic import function in Magento.

We have a multi-store setup with 7 stores and are using some custom product attributes (26 of them).

If a product has a different description for one of the stores, the field for that Store View is populated but greyed out, with the "use default values" checkbox checked.

We have increased the memory to PHP as well as processing time, we've created a new CSV from scratch and imported dummy data.

There is a pattern to the missing data, as well. It seems to start with the 15th product, and then repeats every 15 or so products afterwards.  All the products in between seem fine.

The CSV validates with no errors.  If we import or re-import the products with errors by themselves without otherwise changing the data in the CSV, they import fine with no errors, unless we import more than 15 at once.

We have tried installing the newest version of magento on our server, and have even tried testing a standalone XAMPP installation.  The same errors seem to occur on every install we try, which leads us to believe that there's either a configuration error on our part, or a fundamental issue in Magento.

Searching the internet has not revealed many people with the same issue as we're facing, so we're at a loss. As far as we can see, the stores are all set up properly, and the product attributes are just basic stuff created via the Magento backend.

What could be causing such regular errors?


texts: Magento 2 Commerce : Add to cart not working for gift card product

texts:
I am trying to add  giftcard product to cart but its not working
it shows "Please specify a delivery date." error on frontend.
Magento ver. 2.4.1 Commerce


texts: Magento 1.7.2 Problem cannot reindex product_flat_data even via ssh after dropping table please help

texts:
I have a problem when I try to reindex product flat data, the reindex of product_flat_data doesn't work. Message says "There was a problem with reindexing process." and  I have tried various solutions including:

deleting var/locks files
truncating table catalog_product_flat_1
dropping catalog_product_flat_1
using ssh to reindex ( php shell/indexer.php --reindexall )

The problem still occurs. I don't know what to do. Any help would be great.

Edit

Here is the error message in exception.log

2014-04-04T13:48:48+00:00 DEBUG (7): Exception message: SQLSTATE[HY000]: General error: 1005 Can't create table 'mywebsitehere.#sql-34_10bf' (errno: 121)
Trace: #0 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Array)
#5 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...', Array)
#6 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(340): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...')
#7 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php(2569): Varien_Db_Adapter_Pdo_Mysql->raw_query('ALTER TABLE `ca...')
#8 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(816): Varien_Db_Adapter_Pdo_Mysql->addForeignKey('FK_CAT_PRD_FLAT...', 'catalog_product...', 'entity_id', 'catalog_product...', 'entity_id', 'CASCADE', 'CASCADE')
#9 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(1390): Mage_Catalog_Model_Resource_Product_Flat_Indexer->prepareFlatTable(1)
#10 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(296): Mage_Catalog_Model_Resource_Product_Flat_Indexer->reindexAll()
#11 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(336): Mage_Catalog_Model_Product_Flat_Indexer->reindexAll()
#12 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/app/code/core/Mage/Index/Model/Process.php(209): Mage_Catalog_Model_Product_Indexer_Flat->reindexAll()
#13 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#14 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#15 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#16 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#17 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#19 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#20 /srv/data/web/vhosts/www.mywebsitehere.com/htdocs/index.php(90): Mage::run('', 'store')
#21 {main}


texts: Weird Search Terms Appearing on 1.9.0.1 Installation

texts:
Dozens of search terms like those below have appeared on our 1.9.0.1 installation since the very beginning and they're quite heavily used (over 800 times each). I'm just wondering if any of you has experienced the same thing? ... or is it a security attack on our website or a new Google crawl pattern? We deleted them all from Catalog > Search Terms > Select All > Delete but they all came back again today...

Never experienced such thing on any other Magento installation. Please advise and thank you all for your help ;-)

---- TOP 3 SEARCH TERMS ----

#1
gqEn AND (SELECT 5188 FROM(SELECT COUNT(*),CONCAT(0x7174636471,(SELECT (CASE WHEN (5188=5188) THEN 1 ELSE 0 END)),0x717a726171,F

#2
gqEn%'+AND+(SELECT+5188+FROM(SELECT+COUNT(,",][,('(]),CONCAT(0x7174636471,(SELECT (CASE WHEN (5188=5188) THEN 1 ELSE 0 END)),0x7

#3
gqEn%' AND 7394=CAST((CHR(113)||CHR(116)||CHR(99)||CHR(100)||CHR(113))||(SELECT (CASE WHEN (7394=7394) THEN 1 ELSE 0 END))::text


texts: How to display available quantity of each product in Magento 2

texts:
I want available stock Qty to be displayed right underneath of the home page and quick view like I have marked on,what would be the easiest approach to achieve this?
(I use an advanced warehouse module to maintain 25 different store views at particular locations[Amasty Advanced Inventory])


texts: Error in admin panel: MySQL server has gone away

texts:
Last night in my Admin panel suddenly stopped working.

The problem it shows:

  SQLSTATE[HY000]: General error: 2006 MySQL server has gone away, query was: SELECT core_flag.* FROM core_flag WHERE
  (core_flag.flag_code='synchronize')

  Trace:
  /home/zolshopc/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110):
  Zend_Db_Statement_Pdo->_execute(Array)
  /home/zolshopc/public_html/app/code/core/Zend/Db/Statement.php(291):
  Varien_Db_Statement_Pdo_Mysql->_execute(Array)
  /home/zolshopc/public_html/lib/Zend/Db/Adapter/Abstract.php(480):
  Zend_Db_Statement->execute(Array)
  /home/zolshopc/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238):
  Zend_Db_Adapter_Abstract->query('SELECT core_fl...', Array)
  /home/zolshopc/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504):
  Zend_Db_Adapter_Pdo_Abstract->query('SELECTcore_fl...', Array)
  /home/zolshopc/public_html/lib/Zend/Db/Adapter/Abstract.php(756):
  Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
  /home/zolshopc/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(380):
  Zend_Db_Adapter_Abstract->fetchRow(Object(Varien_Db_Select))
  /home/zolshopc/public_html/app/code/core/Mage/Core/Model/Abstract.php(225):
  Mage_Core_Model_Resource_Db_Abstract->load(Object(Mage_Core_Model_File_Storage_Flag), 'synchronize', 'flag_code')
  /home/zolshopc/public_html/app/code/core/Mage/Core/Model/Flag.php(119):
  Mage_Core_Model_Abstract->load('synchronize', 'flag_code')
  /home/zolshopc/public_html/app/code/core/Mage/Core/Model/File/Storage.php(84):
  Mage_Core_Model_Flag->loadSelf()
  /home/zolshopc/public_html/app/code/core/Mage/Core/Model/Observer.php(47):
  Mage_Core_Model_File_Storage->getSyncFlag()
  /home/zolshopc/public_html/app/code/core/Mage/Core/Model/App.php(1358):
  Mage_Core_Model_Observer->addSynchronizeNotification(Object(Varien_Event_Observer))
  /home/zolshopc/public_html/app/code/core/Mage/Core/Model/App.php(1337):
  Mage_Core_Model_App->_callObserverMethod(Object(Mage_Core_Model_Observer), 'addSynchronizeN...', Object(Varien_Event_Observer))
  /home/zolshopc/public_html/app/Mage.php(448):
  Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
  /home/zolshopc/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(529):
  Mage::dispatchEvent('controller_acti...', Array)
  /home/zolshopc/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(160):
  Mage_Core_Controller_Varien_Action->preDispatch()
  /home/zolshopc/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(407):
  Mage_Adminhtml_Controller_Action->preDispatch()
  /home/zolshopc/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254):
  Mage_Core_Controller_Varien_Action->dispatch('index')
  /home/zolshopc/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172):
  Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
  /home/zolshopc/public_html/app/code/core/Mage/Core/Model/App.php(365):
  Mage_Core_Controller_Varien_Front->dispatch()
  /home/zolshopc/public_html/app/Mage.php(684):
  Mage_Core_Model_App->run(Array)
  /home/zolshopc/public_html/index.php(83): Mage::run('', 'store')
  {main}

My server swn try to raise the max_allowed_packet but its not help.
What to do?

tnx


texts: How to export media files from Magento Cloud to local machine?

texts:
Is there a way export media files from Magento Cloud to local machine ?
I have setup and magento 2 cloud website but I don't get the product images and other media files.


texts: Setting different title and meta title for a page

texts:
I'm creating a simple page in my Magento 2 instance.
in the controller for that page I'm trying to set a title for the page and a meta title that should be different.
But I'm not able to do that.
My layout file for the action is almost empty:

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
    </body>

</page>

and my controller action looks like this:

namespace [Namespace]\[Module]\Controller\[Entity];

use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;

class Index extends Action
{
    protected $resultPageFactory;
    public function __construct(
        Context $context,
        PageFactory $resultPageFactory
    ) {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
    }
    public function execute()
    {
        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->set('Something');
    }
}

The result is this:

But the meta title is the same as the title (Something).
Changing the line in the controller:

$resultPage->getConfig()->getTitle()->set('Something');

to

$resultPage->getConfig()->getTitle()->set('Something else');

results in the title (H1 tag) and the meta title changing to something else.

How can I set a different meta title and a title (h1 tag) to a page


texts: Magento2 - How to add custom product attribute of type date range ie to date and from date

texts:
I would like to add an attribute with two datetime like :  "Set Product as New From" :

Because I want show products with "good deal" or "our selection" for example.

Can you help me ? thank you =)


texts: I want to add open graph image on blog page in Magento 2

texts:
I need to add an image in open graph image meta tag in head section on a blog page. Can somebody how I can achieve this.

protected function _prepareLayout()
    {
        $post = $this->getPost();
        $this->_addBreadcrumbs($post);
        $this->pageConfig->addBodyClass('blog-post-' . $post->getIdentifier());
        $this->pageConfig->getTitle()->set($post->getTitle());
        $this->pageConfig->setKeywords($post->getMetaKeywords());
        $this->pageConfig->setDescription($post->getMetaDescription());
        ?><head><meta property="og:image" content="https://turner-sports.co.uk/pub/media/blog/punch_bag_blog_featured_image_1.png" /></head><?php

        return parent::_prepareLayout();
    }


texts: Does anyone have any example code or recommended plug ins for adding the rel=prev and rel=next tags for paginationN

texts:
Does anyone have any example code they have used in magento to implement the rel=prev and rel=next tags for paginated content on a magento site?

or if you have a recommended plug in?


texts: Checkout Progress Bar disappears after first step

texts:
I'm having a problem after updating my magento to 1.9.
When I go to checkout ( one page checkout ) the Checkout Progress Bar is there... but when I click continue it goes to the next steps and the Checkout Progress Bar disappears after a few seconds.

I think it's a problem in the opcheckout.js but I'm kinda newbie in that stuff.

I would appreciate some help.


texts:
I'm making a module that to order reviews. In de mage-admin I added an extra field which gets saved into a new table review_featured

On the product page I want to sort it based on the featured_number

in template/review/product/view/list.phtml
there is the line:  $_items = $this->getReviewsCollection()->getItems();

in \Mage_Review_Block_Product_View::getReviewsCollection() I do see filters but how do I add my table to that?

How can I:

Join my table review_featured when fetching items through the reviews collection?
Sort the collection based on the review_featured.featured_number?

The module is set up using multiple sources mainly and official.


texts:
I have installed the Magento which is provided in script section in cpanel. I want to uninstall it and want to transfer my localhost website to the live server.

Please help me to solve:-

How to remove the existing installed Magento.
Reinstall magento manually (transfering localhost site to live server step by step).

Thank you in advance.


texts: Custom attribute on billing address not added

texts:
I would like to add a custom attribute on billing address module.

Below are my Code:

app/etc/modules/Ucs_BillAddress.xml

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

Below is the app/code/local/Ucs/BillAddress/etc/config.xml

<config>
    <modules>
        <Ucs_BillAddress>
            <version>0.0.1</version>
        </Ucs_BillAddress>
    </modules>
    <resource>
        <address_setup>
            <setup>
                <module>Ucs_BillAddress</module>
                <class>Mage_Customer_Model_Entity_Setup</class> <!-- This is the important thing-->
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </address_setup>
    </resource>
</config>

Below is my sql code: app\code\local\Ucs\BillAddress\sql\ucs_setup\mysql4-install-0.0.1.php

<?php
    $installer = $this;

    $installer->startSetup();

    $this->addAttribute('customer_address', 'site_id', array(
        'type' => 'varchar',
        'input' => 'text',
        'label' => 'Site ID',
        'global' => 1,
        'visible' => 1,
        'required' => 1,
        'user_defined' => 1,
        'visible_on_front' => 0
    ));
    Mage::getSingleton('eav/config')
        ->getAttribute('customer_address', 'site_id')
        ->setData('used_in_forms', array('adminhtml_customer_address'))
        ->save();
    $installer->endSetup();
?>

But after clearing cache, in System->Configuration->Advanced I can see my module added but the customer field site_id not added. I dont know whats my mistake on above code.


texts: Compiler Enabled on admin, Disabled on cli

texts:
My Magento's 1.9.2.1 Admin panel shows:

Compiler Status: Enabled
Compilation State: Compiled
Collected Files Count: 7947
Compiled Scopes Count: 4

If I click on Disable, it says that it's now Disabled but on Compiler Status I still get Enabled.

Now, when I go to CLI and enter:

[root@hostname httpdocs]# php -f shell/compiler.php -- state

I get:

Compiler Status:          Disabled
Compilation State:        Compiled
Collected Files Count:    7947
Compiled Scopes Count:    4

If I disable Compilation with compiler.php --disable my Admin panel still says "Enabled".

If I click on Run Compilation process on Admin I get Error 500 and I fix it through compiler.php

Is the above normal or what? Is my compiler Enabled or Disabled?

FYI, I use Zend OPCache on Centos 7 for what it matters.


texts: Rewrite Mage_Checkout_Model_Type_Multishipping getQuoteShippingAddressesItems method to separate items by custom attribute value

texts:
I'm trying to override the Multishipping class to separate the orders (but keep payment a one step process), except I don't want the orders to be separated by item but by the custom attribute "vendor." "Vendor" is an attribute that we added to the system that is applicable for all simple products. So say in the cart there is a pink shirt with "vendor" value "1", a pencil with "vendor" value "1", and a blue shirt with "vendor" value "2". All items with "vendor" value "1" need to be one order, while the item with "vendor" value "2" need to be a different order.

I've been looking at the methods in the Mage_Checkout_Model_Type_Multishipping class and it seems like the items are separated out in the getQuoteShippingAddressesItems method below. Am I right? How could I implement separating them by an attribute value instead of by each item?

/**
 * Get quote items assigned to different quote addresses populated per item qty.
 * Based on result array we can display each item separately
 *
 * @return array
 */
public function getQuoteShippingAddressesItems()
{
    if ($this->_quoteShippingAddressesItems !== null) {
        return $this->_quoteShippingAddressesItems;
        //Mage::log('In getQuoteShippingAddressesItems the "this->_quoteShippingAddressesItems" array is');
        //Mage::log(print_r($this->_quoteShippingAddressesItems, true));
    }
    $items = array();
    $addresses = $this->getQuote()->getAllAddresses();

    foreach ($addresses as $address) {
        //Mage::log($address->debug()); //each customer address
        foreach ($address->getAllItems() as $item) {
            //Mage::log($item->debug()); //each quotable item
            if ($item->getParentItemId()) {
                continue;
            }
            if ($item->getProduct()->getIsVirtual()) {
                $items[] = $item;
                continue;
            }
            if ($item->getQty() > 1) {
                for ($i = 0, $n = $item->getQty(); $i < $n; $i++) {
                    if ($i == 0) {
                        $addressItem = $item;
                    } else {
                        $addressItem = clone $item;
                    }
                    $addressItem->setQty(1)
                        ->setCustomerAddressId($address->getCustomerAddressId())
                        ->save();
                    $items[] = $addressItem;
                }
            } else {
                $item->setCustomerAddressId($address->getCustomerAddressId());
                $items[] = $item;
            }
            //Mage::log($items->debug()); //wont show
        }
    }
    $this->_quoteShippingAddressesItems = $items;

    return $items;
}


texts: How can I change the dropdown option into different form on product page?

texts:
I am a newbie in Magento and i got something very tricky on product page. I have to hide the drop-down option from here and show all the attributes values in a single line like

[Size : Small Medium Large]

[Color : Red Green Pink]

but the color will only show after selecting the size like in default Magento drop-down. I am able to get all the attribute according to the product id but how can i get the color attribute according to the size attribute for a particular product, and then pass that values to the cart page after clicking on the add to cart button.

I have really stuck in this task can someone help me please..


texts: Magento 2 How make title required in xml file

texts:
Its the part admin grid Add button form. I want to make the title field Required.

 <block class="Magento\Backend\Block\Widget\Grid\Column" as="title">
    <arguments>
        <argument name="header" xsi:type="string" translate="true">
            Title
        </argument>
        <argument name="index" xsi:type="string">title</argument>
    </arguments>
</block>


texts: Send http post-request when order invoiced

texts:
I want magento 1.9 to send an http post to a webhook for every invoice created.

Is there any model or easy modification to do this ?


texts:
I'm writing a module containing some js that is only relevant if the user is logged in. As it is in use only on catalog_product_view & catalog_list_view I use their equivalent layout handles for now. But how can I combine these two conditions?

I know that there are the customer_logged_in/customer_logged_out handles as well as a "condition"-tag for the head-addItem method but I only found "condition=IE7" or similar


texts: "Shipping and Billing address are the same " / Need to copy current shipping address to billing address - Magento 2

texts: Which function checks shipping address and billing address are the same ? and where it copies the billing address to the shipping address ? Need to replace the default method. Instead need to copy current billing address to shipping address


texts: How can i receive a payment method nonce from client In Magento 2

texts:
How can i receive a payment method nonce from client in Magento ver. 2.

If transaction is processed using braintree payment method. Please can anyone

Help me in solving Question.


texts: Getting category ID - Doesn't work on pages without breadcrumbs!

texts:
Hi my issue is if I go to a product with the full url as in:

mysite.com/mycategory/myproduct

My code pulls back its top level category.

However, if I go to:
mysite.com/myproduct

The product displays but with no breadcrumbs and my code to grab the category ID fails.

My code is:

<?php
    $category = Mage::registry('current_category');
    while ($category->getLevel() != 2) {
    $category = Mage::getModel('catalog/category')->load($category->getParentId());
}
    $catid = $category->getId();
?>

I am unsure what to do do I need the change my code to work universally or? Ver 1.9.2.2


texts: Magento 1.9.3 : Show recently viewed product at homepage through block in rwd theme

texts:
The problem in showing the recently viewed product.

How can I show it in homepage using the block? Like , I show new products through this code

{{block type="catalog/product_new" products_count="2" template="catalog/product/new.phtml"}}

Is there any way to show the recently viewed product ?


texts: Magento 2.3.3 - Multi Source Inventory For Multi Website Product Not Visible On Frontend

texts:
We have a Magento 2 multi-website setup and using Multi Source Inventory for stock management
Have created a separate inventory source and stock sources for each of the below website

US
Canada

Below is the inventory sheet uploaded

But the issue is that the product is not showing on frontend.
So my question, Is it necessary to assign inventory to both website source and default source both for each SKU OR am I missing something else?
The below points already checked:
reindexing, cache, visibility, product website


texts: adding free products with a simple product?

texts:
I want to add some freebies with a product? Is there an option to do that?

I referred many tutorials and not finding answer,


texts: Magento 2.0.15 js strings not translated (Adding... and Added)

texts:
On a product-detail page when you click on "Add to cart" it is not correctly translated. In english it says: "Adding..." and "Added". I found that the string is correctly translated in the correct language in "js-translation.json". But on front-end it is not showing the translation ..?

I have removed all var/ and all pub/static folders and then ran:
bin/magento setup:static-content:deploy nl_NL

After clearing cache, nothing has been changed ...? Any solutions?


texts: Can anyone help me to get frontend translations only? Magento2

texts: My site having two different languages, English and French. I have used MagePlaza's French language pack for the French translations. The translation CSV file contains more than 14k rows! So, it is really hard for me to check if the translation is correct or not. I want only frontend translations and reduce these rows as low as possible. Any help?


texts: Magento2- How to get the price (product price+ static price) without catalog price rule applied

texts:
Magento2- How to get the product price without catalog price rule applied.

I want to add an additional price percentage to all the product before the catalog rule applied.

Basically what I want is :

Product price(without catalog rule applied)+10% of product price and after that catalog price rule should be applied.


texts: Change footer template in specific CMS page 1.9

texts:
As the title says I need to change the template path of the footer block for a specific CMS page.
This is what I have in my page.xml:

<layout version="0.1.0">

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

...

            <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
                <block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
                    Page Footer
                    <action method="setElementClass"><value>bottom-container</value></action>
                </block>
                <block type="newsletter/subscribe" name="newsletter" as="newsletter" template="newsletter/subscribe.phtml" />
            </block>

and this is what I put in the update layout XML box on the specific CMS page on the admin side:

<default>
    <reference name="root">
        <reference name="footer">
            <action method="setTemplate"><template>page/html/footer-shop.phtml</template></action>
        </reference>
   </reference>
</default>

Footer keeps on showing footer.phtml template instead of footer-shop.phtml.

What is the correct way to change the footer template?


texts: Magento 2 : How to update qty and stock status using API for multiple products?

texts:
How to update qty and stock status using API for multiple product in Magento 2 ?

We are doing ERP integration with magento 2 and we need to update qty and stock status.

in magento 1 we had catalogInventoryStockItemUpdate  Soap API for update.

I have search in magento 2 API and found below:

catalogInventoryStockRegistryV1
PUT /V1/products/{productSku}/stockItems/{itemId}

catalogProductRepositoryV1
PUT /V1/products/{sku}

But they only work for single SKU.

What is the equivalent of catalogInventoryStockItemUpdate in magento 2 API, Where we can pass array of SKU for update qty and stock

Thanks in advance!


texts: I create a new module and I would add actions in my module but how ?


texts: cat_index_position defaults to 10001. Magento 2.1.9

texts:
Magento 2.1.9 right now. We have a fec categories and set the position according to our liking. However this isnt reflected in the frontend for every product. Some work, some dont.

Screenshot of the configuration. Everything else is pretty standard.Display Setting for sorting is Position in both cases.

Now, when looking at the frontend however, things are not the way they should be. Notice the small little numbers above the products, these are takin from the getcatIndexPosition() function:

A quick look into the databse gives us something like this: Filtered for the first Product with Id 1850. This happens in more categories for either all, or just some products.

Already did all the obvious stuff, reindex everything, cache clear.

On thing to add might be that the Category ID 70 which apparentely gets used for this, even though it should be using 56 is the root categorie. But no product is specified in it at all.

Reindexing runs fine without any errors. We are using the m2theme evolution, but it also persists in the default theme.

Is there anything i can do to fix this? Any help is appreciated.


texts: Magento 2 : Set dependency between two dropdown in ui form

texts:
I want to set dependency in UI form.

For ex : When I select first drop-down value then only display second drop-down.

How to do this ?


texts: How to LEFT-JOIN 'catalog/category' fields to 'sales/order_item' collection?

texts:
I'm trying to left-join some of the 'catalog/category' attributes to a 'sales/order_item' collection. For example: a satisfying result will let me add the category-name to the order-item data.

*I know I can use the categories flat table, but I need to know if it's possible to join the EAV-collection and how.

**It must be done with one mysql query (Not by looping through the order items or something like that...)

***I know that it might lead to duplicated rows if the product has more than 1 category, that's exactly what I need.


texts: Magento 2: After upgrading Checkout page Shows Blank & Minicart to 0

texts:
After upgrading from Magento 2.1.2 to 2.1.3.

I already Added Product, but once i click on Checkout is shows Mini Cart to 0

On Checkout Page It shows Cart Product Count 0 in Mini Cart & Apart from Header & Footer is shows blank area.

Not able to find anything in Log.


texts: How can I add bulk attribute to attribute sets in Magento 2 programmatically

texts:
Everyone,
How can I set attributes to attribute set in Magento 2 programmatically


texts:
We have upgraded Magento version 1.7 to 1.9.1.1 but when I click on "place order" button, this error shows "There was an error processing your order. Please contact us or try again later", while choosing cash on delivery payment option.

We have enabled log file and this shows this error:

  'Mage_Core_Exception' with message 'Invalid block type: Mage_PaypalUk_Block_Link_Shortcut' in /data/flavorwest_magikcommerce/app/Mage.php

We do not use the default theme, but we have tested it on the RWD default theme but same error shows


texts: Does Magento 1.x have a webhook capability?

texts:
I would like to know if Magento 1.x has any kind of webhook capability, or if there is an extension available (preferably that someone here has experience with) that does the job.

I'm trying to make an integration with an accounting system. I need to get order and customer information out.

Unfortunately the only way I can do this (that I've found) is through polling the API endpoints every so often. I need more accuracy - I need Magento to tell my external integration there is something new, rather than my integration asking Magento every 15 minutes if there's something new.


texts: How to show the currency symbol at end of the product price in magento2

texts:
In product details page, The currency symbol shows at starting of the product price (₹125.00).

I need to show the currency symbol at end of the product price(125.00 ₹) in product details page.

i.e ., Change ₹125.00 to 125.00 ₹.


texts: Magento compiler broken. Compiler doesnt work even via SSH

texts:
I deleted the includes/src folder to disable the compiler mode.

Then the site broke and all we can see is the following.

  Warning: include_once(Varien/Autoload.php): failed to open stream: No
  such file or directory in /home2/hotelhome/public_html/app/Mage.php on
  line 51

  Warning: include_once(): Failed opening 'Varien/Autoload.php' for
  inclusion
  (include_path='/home2/hotelhome/public_html/app/code/local:/home2/hotelhome/public_html/app/code/community:/home2/hotelhome/public_html/app/code/core:/home2/hotelhome/public_html/lib:.:/usr/lib/php:/usr/local/lib/php')
  in /home2/hotelhome/public_html/app/Mage.php on line 51

  Warning: include(Varien/Autoload.php): failed to open stream: No such
  file or directory in
  /home2/hotelhome/public_html/app/code/core/Mage/Core/functions.php on
  line 68

  Warning: include(Varien/Autoload.php): failed to open stream: No such
  file or directory in
  /home2/hotelhome/public_html/app/code/core/Mage/Core/functions.php on
  line 68

  Warning: include(): Failed opening 'Varien/Autoload.php' for inclusion
  (include_path='/home2/hotelhome/public_html/app/code/local:/home2/hotelhome/public_html/app/code/community:/home2/hotelhome/public_html/app/code/core:/home2/hotelhome/public_html/lib:.:/usr/lib/php:/usr/local/lib/php')
  in /home2/hotelhome/public_html/app/code/core/Mage/Core/functions.php
  on line 68

  Fatal error: Class 'Varien_Autoload' not found in
  /home2/hotelhome/public_html/app/Mage.php on line 54

When we tried to run the compiler from the shell, the same errors. Uncommenting the include path in the config.php file does not work either.

Can not log into admin. Same errors.


texts:
I'm working on an ajax module and I have to create a product alert button block.
I'm using this code to create the block:

$stockAlertBlock = $this->getLayout()->createBlock(
            'productalert/product_view',
            'alert_stock',
            array('template' => 'productalert/product/view.phtml')
        );

        $stockAlertBlock->setHtmlClass('alert-stock link-stock-alert');
        $stockAlertBlock->setSignupLabel('Register to receive stock alert');

The block will be created but the link is not working because I'm not able to set correctly the product.

I've tried

$stockAlertBlock->setSignupUrl('productalert/add/stock/product_id/' . $simpleProduct->getId().'/uenc/'.Mage::helper('core/url')->getEncodedUrl().'/');

but it's not working.

Do you have any suggestion?
thanks


texts: Magento 2.4 Installation Issue on localhost Xampp

texts:
I am trying to install M2.4 on my local machine, But getting error list, I have install elastic search and when i run below command in CMD then getting error list. Please check attached screenshot.
Command Running in CMD:
php bin/magento setup:install --base-url="http://localhost/faksouq24" --db-host="localhost" --db-name="faksouq24" --db-user="root" --admin-firstname="admin" --admin-lastname="admin" --admin-email="testing@gmail.ae" --admin-user="admin" --admin-password="admin123" --language="en_US" --currency="USD" --timezone="America/Chicago" --use-rewrites="1" --backend-frontname="admin"
Error:
Fatal error: Uncaught Error: Class 'Locale' not found in C:\xampp72\htdocs\faksouq24\vendor\magento\framework
Locale\Bundle\DataBundle.php:64
Please help me regarding about this issue, why i am getting this error ?
Thanks & Regards


texts: Check out page redirects to shopping cart again and again

texts:
After adding items to cart when customer going to checkout, at first step of billing info, when we click continue, customer is redirected back to shopping cart and not on next step.
Please help to resolve this issue..


texts: How to include a non-Magento 2 PHP file in an Observer?

texts:
How do we include_once an external (outside of Magento 2 code but on the same web server) PHP file?

I added the events.xml and adminuserlogin.php files below, into an already activated and fucntioning admin module, but my attempts to have the Observer call/include the PHP file does nothing.  Do you see anything wrong with the code?

The module folder structures and the code are as follows:

/home/abc/public_html/app/code/abcCo/Backend/etc/adminhtml/events.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
        <event name="backend_auth_user_login_success">
            <observer name="backend_activity" instance="abcCo\Backend\Observer\adminuserlogin" />
        </event>
    </config>

/home/abc/public_html/app/code/abcCo/Backend/Observer/adminuserlogin.php:

<?php

namespace abcCo\Backend\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Event\Observer;

class adminuserlogin implements ObserverInterface
{
   public function __construct()
{
    //Observer initialization code...
    //You can use dependency injection to get any class this observer may need.
    }

public function execute(\Magento\Framework\Event\Observer $observer)
    {
       // execute an external php script when I log in.

include_once '/home/abc/public_html/app/code/abcCo/testModule/Controller/Index/login_test.php';

    }
}

?>

Thank you.


texts: 2.2 static-content deploy generates extra themes

texts:
Since version 2.2, static-content:deploy for a theme will generate themes not specified using the --theme flag.
So before in 2.1.x I would generate a theme for 3 languages and get exactly 3 themes. Now I get 12.

Is there a setting I am missing or is it a new "feature"?

The command I am running it with is:

magento setup:static-content:deploy --theme My/theme de_DE en_US fr_FR -f


texts: Error in Admin Category Page for Some Categories

texts:
For some categories, instead of load category information, error is shown. This appears randomly for some categories.
Have tried reindex, updating file permission for pub/ directory.
Any help would be appreciated.

V2.3.3


texts: How do I understand the connection of module components (e.g., code/design/frontend/template/block, etc.) in Magento 1.9?

texts: I'm very new to Magento and am familiar with MVC and OOP and a lot of the design patterns that Magento uses. However, I find it difficult to understand the relationship between all the components of a module, specially because I am working on a codebase that has many custom modules. The documentation like this are not very clear for me. I'm sure those who are more experienced have found simpler ways to understand the architecture of customer modules


texts: I installed the Wirecard extension for our payments. Per default everything is in English but I would like to have it in German. Is there a language file that can be edited ? Preferably not inside the vendor it won't get overwritten in the next update.


texts: Strange .htaccess and base URL redirect happening

texts:
I have an odd scenario that I cannot figure out. When Auto-redirect to Base URL is set to 301 or 302, the homepage of my website redirects correctly to what I have defined as my base URL (I am using non-www as my base). However, when this is on and I try to visit one of my subpages using the www. version, it sends me back to my homepage.
IE:
www.example.com redirects correctly to example.com
www.example.com/subpage, also sends me to example.com - not the correct subpage.

I thought that I may be able to circumvent this by disabling the base URL redirect and then manually modifying my .htaccess file. I used the following code:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

In this case it is a similar situation... when visiting www.example.com I am correctly redirected to example.com. However, when I visit www.example.com/subpageI am incorrectly redirected to example.com/index.php

I found a few variations of the redirect code and all had the same results.

I then tried to manually redirect individual pages, also to no avail.

I also tried setting a manual redirect through the Magento URL Rewrites in the dashboard.

Nothing seems to work and I am out of ideas. Any help or guidance is appreciated.


texts: How to migrate Mage1 configurable products to Mage2?

texts: I have huge problems migrating configurable products from Mage1 to Mage2. Whats the best way to copy ALL products (including configureable and bundle products) to Mage2? The basic Export and Import seem to be underpowered...


texts:
I have this web site:

My costumer says the logo is low resolution in retina.

I am using porto theme.

How I can to create a low in high resolution ?


texts: Refunding partial order, but refund confirmation email shows all ordered items

texts:
I use magento 1.9.2.4.

My customer wants to cancel part of her order before shipping.

So I created credit memo from the invoice, made partial refund. Afterwards, I sent the shipment email.

The shipment email shows only the item which was shipped.

However, the refund confirmation email shows all items which were ordered.

How this can show only the actually refunded item?


texts: Add "active" class to Top Menu Category Item if Child is Current

texts:
Within topmenu.phtml I am removing the default  so that I can easier create a custom menu with my own classes (for implementation into Foundation CSS Framework using Top Bar).

How would I add a custom "active" class to the parent
 if a child / descendent category of the selected is currently active?

I'm using the following code to generate the menu:

  <?php
       $obj = new Mage_Catalog_Block_Navigation();
       $storeCategories = $obj->getStoreCategories();
       Mage::registry('current_category') ? $currentCategoryId = Mage::registry('current_category')->getId() : $currentCategoryId='';
       foreach ($storeCategories as $_category):
   ?>

               <?php echo $_category->getName(); ?>
               <?php $categoryChildren = $_category->getChildren(); ?>
               <?php if($categoryChildren->count()) : ?>

                       <?php foreach($categoryChildren as $_categoryChild) : ?>
                           <?php $_categoryChildModel = Mage::getModel('catalog/category')->load($_categoryChild->getId());?>
                           <?php $categoryGrandchildren=$_categoryChild->getChildren(); ?>

                               <?php
                                   $currentCategoryId===$_categoryChild->getId() ? $bold="style=\"font-weight:bold\"" : $bold='';
                                   echo '&emsp;' . 'getUrl() . '"' . $bold . '>' .  $_categoryChild->getName() . '';
                               ?>

                           <?php if($categoryGrandchildren->count()) : ?>
                               <?php foreach($categoryGrandchildren as $_categoryGrandchild) : ?>
                                   <?php $_categoryGrandchildModel = Mage::getModel('catalog/category')->load($_categoryGrandchild->getId());?>

                                       <?php
                                           $currentCategoryId===$_categoryChild->getId() ? $bold="style=\"font-weight:bold\"" : $bold='';
                                           echo '&emsp;&emsp;' . 'getUrl() . '"' . $bold . '>' .  $_categoryGrandchild->getName() . '(' . $_categoryGrandchildModel->getProductCount() . ')';
                                       ?>

                               <?php endforeach; ?>
                           <?php endif; ?>
                       <?php endforeach; ?>

               <?php endif; ?>

       <?php endforeach ?>


texts: Adding widget instance into my theme via xml

texts:
So I have a few custom widgets instances that I'd like to include into some theme .xml files. However I'd like these to be added via XML rather than as Layout Updates under
New Widget Instance.

I know I can add a widget via XML by also setting all the widget options within the XML, however i'd like to give the client some ability to configure these in the backend themselves.

At the moment the only way I can think of to add a static block and then have a widget added withint the content of that, but this seems a rather unelagant solution compared with just adding a widget instace directly.

Looking for something like below but for a widget rather than a static block

<block type="cms/block" name="cms_footer_links" before="footer_links">
                <action method="setBlockId"><block_id>footer_links</block_id</action>
</block>


texts: How to get subcategories from different store/storeviews by a specific main category

texts:
I like to do a cms page with all brands (subcategories) on it. We have a multistore wise set up. But at the moment, it shows me only subcategories and categories from one storeview.

I have this just copied and change the

->load(195);
->setStoreId(2)

But it seems that I need to do something else, as it shows me only from one store the list. See here:

https://www.outdoorequipped.com/allbrands/

Here is the code I use:

<?php
$parentCategory = Mage::getModel('catalog/category')->load(195);
$subcategoryCollection = Mage::getModel('catalog/category')
        ->getCollection()
        ->setStoreId(2)
        ->addFieldToFilter('level', ['lteq' => $parentCategory->getLevel() + 2])
        /*->addFieldToFilter('level', $parentCategory->getLevel() + 1)*/
        ->addFieldToFilter('path', ['like' => $parentCategory->getData('path') . '%'])
        ->addAttributeToFilter('entity_id', array('neq' => '195'))
        ->addAttributeToFilter('entity_id', array('neq' => '136'))
        ->addAttributeToSelect(['name'])
        ->setOrder('name', Varien_Data_Collection_Db::SORT_ORDER_ASC);
?>
<?php $previous = null;?>
<?php foreach ($subcategoryCollection as $category): ?>

    <?php $name = $category->getName();
          $firstLetter = substr($name, 0, 1);
          if($previous == null){
             echo '
'."\n";
             echo '
'.$firstLetter.'
'."\n";
             $previous = $firstLetter;
          }
          elseif ($previous !== $firstLetter){
                echo '
'."\n";
                echo '
'."\n";
                echo '
'.$firstLetter.'
'."\n";
                $previous = $firstLetter;
          }
          echo 'getUrl().'" style="margin:10px">'.$category->getName().''."\n";

    ?>

<?php endforeach; ?>

It not gives what I like to have. Here is the link from this page:

[link]https://www.outdoorequipped.com/allbrands/

I like to show on this CMS page from all storeviews (4 of them) all categories under a specific given category id.

so should be something similar to this:

ACTIVE / OUTDOOR / WORK

Cat 1 / Cat 11 / Cat 21
Cat 2 / Cat 12 / Cat 22
Cat 3 / Cat 13 / Cat 23

As Active, Outdoor and Work are the storeviews.


texts: Creating Users Programmatically for multiple sites

texts:
I am looking to assign imported customers programmatically to another site and store within a multisite. However, each time I attempt to manually set the website id it errors out claiming that it cannot "Call to a member function getId() on a non-object on Customer.php Line 808". First I loop through my websites, if I find a match based on the name I assign a variable the ID. Then I loop through the Stores within those sites getting the ids for them. See the code below...

foreach (Mage::app()->getWebsites() as $website) {
  if ($website->getName() == 'Name'){
   $websiteId = $website->getID();
  }
    foreach ($website->getGroups() as $group) {
        $stores = $group->getStores();
        foreach ($stores as $store) {
          if ($store->getName() == 'Name'){
            $storeId = $store->getID();
          }
        }
    }
}

Then I attempt to assign the customer to the website and store which causes the error.

$customer = Mage::getModel("customer/customer");
$customer   ->setWebsiteId($websiteId)
            ->setStore($storeId)
            ->setGroup(8)
            ->setCustomerID()

Any help would be appreciated. Thanks!


texts: Can't get passed step 4 check out (Shipping method)

texts: The problem i'm facing is that my webshop, which has 5 store views, gives problems with the check out procedure at step 4 (shipping methods) on the french and german store views. I checked all settings but everything is the same as the 3 other store views (Dutch, English and Italian). I get this message at step 4 (french and german store views): Entschuldigung, für diese Bestellungen stehen keine Auswahloptionen zur Verfügung. Bitte nehmen Sie direkt mit uns Kontakt auf! Which translates something like: We are sorry, for these orders there are no shipping options available.


texts: Get active filters in Category/View Block in Magento 2

texts:
I want to return all active filters in a custom View Block in module catalog. While the categories are returned in the layered navigation view, this always returns an empty result:

class CategoryView extends \Magento\Catalog\Block\Category\View
{

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

        // Doesn't work, filters are always empty
        $state = $this->_catalogLayer->getState();
        print_r($state->getFilters());

        return $this;
    }

}

Do I have to call some function first to trigger loading the filters?


texts: How to change the title for this attribute filter on my site

texts:
I am not too sound with Magento files..and i am sure i accidentally change the text of this filter title. It is meant to be "Size" and not "46EU" Which file do i go to make changes

Check the image above


texts:
<?php $_product = $block->getProduct();  ?>
<?= __("<br />Czas wysyłki zwykle w ") ?>           <?php $_productNameStripped = $block->stripTags($_product->getLeadtimeToShip(), null, true);?>
            <?php /* @escapeNotVerified */
            echo $_helper->productAttribute($_product, $_product->getLeadtimeToShip(), 'leadtime_to_ship'); ?>

From above code when attribute is "text" then I without any issue get and display in frontend.
Issue is when  attribute is dropdown option. Then instand of attribute magento get https://prnt.sc/12d61rw 7373
Does anyone have any idea how to get the attribute dropdown option ?


texts: getting serialized data of a product object in magento

texts:
I am trying to ensure that at checkout all the data about the customer order is sent to our server using the POST rest API, However the product object is very complicated and using json_encode() on it, strips it down to only a couple of details. I would like to have all the details of a product object, in a nice json format during checkout, but so far the only way i have found is by using print_r($product,true) which basically sends the whole object to the api?

Is there any way i can send a nicely encoded json format, which has all the necessary product details? ( as mentioned, using json_encode on the product object strips away a lot of its useful details to only a couple of fields)


texts:
On my startpage is a bold headline: Home page
How can I remove it?

(source: snag.gy)


texts: Custom session variable when customer log in

texts:
I am trying to add an extra field in customer login page and save it as session variable when customer logins successfully.

I add the line in the loginPostAction function however I can't get the values in the frontend.

The variable called passcode

public function loginPostAction()
{
    if (!$this->_validateFormKey()) {
        $this->_redirect('*/*/');
        return;
    }

    if ($this->_getSession()->isLoggedIn()) {
        $this->_redirect('*/*/');
        return;
    }
    $session = $this->_getSession();

    if ($this->getRequest()->isPost()) {
        $login = $this->getRequest()->getPost('login');
        if (!empty($login['username']) && !empty($login['password']) && !empty($login['passcode'])) {
            try {
                $session->login($login['username'], $login['password'], $login['passcode']);
                if ($session->getCustomer()->getIsJustConfirmed()) {
                    $this->_welcomeCustomer($session->getCustomer(), true);
                }
            } catch (Mage_Core_Exception $e) {
                switch ($e->getCode()) {
                    case Mage_Customer_Model_Customer::EXCEPTION_EMAIL_NOT_CONFIRMED:
                        $value = $this->_getHelper('customer')->getEmailConfirmationUrl($login['username']);
                        $message = $this->_getHelper('customer')->__('This account is not confirmed. Click here to resend confirmation email.', $value);
                        break;
                    case Mage_Customer_Model_Customer::EXCEPTION_INVALID_EMAIL_OR_PASSWORD:
                        $message = $e->getMessage();
                        break;
                    default:
                        $message = $e->getMessage();
                }
                $session->addError($message);
                $session->setUsername($login['username']);
            } catch (Exception $e) {
                // Mage::logException($e); // PA DSS violation: this exception log can disclose customer password
            }
        } else {
            $session->addError($this->__('Login and password are required.'));
        }
    }

    $this->_loginPostRedirect();
}


texts: How to solve SQL Column not found error in magento2

texts:
My magento2 home page is not display it gives above errors

Any one have idea?


texts: Hide payment method if customer has more than one processing order

texts:
I'm trying to hide a payment method if a customer has more than one processing order, so I created a module call KgPayMethod and in this module, I added this line on events.xml

<event name="payment_method_is_active">
<observer name="custom_payment" instance="Ab\KgPayMethod\Observer\PaymentMethodAvailable" />
</event>

and my class like this :

<?php

namespace Ab\KgPayMethod\Observer;

use Magento\Framework\Event\ObserverInterface;

class PaymentMethodAvailable implements ObserverInterface
{
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        if( $observer->getEvent()->getMethodInstance()->getCode() == "banktransfer" )
        {
            $checkResult = $observer->getEvent()->getResult();
            $checkResult->setData('is_available', false);
        }
    }
}

Now, I don't know how to get all customers orders and if he had one processing order, that hides the payment method only in this case.

Maybe use $observer->getEvent()->getQuote() ?

Thanks for the help!


texts:
I need to find a way to access attributes in a cart, I am able to do it in a product view with this code

public function getProductInfo() {
        $product = $this->getCurrentProduct();
        $attributes = $product->getAttributes();

        $productSet = array(
            'id' => $product->getId(),
            'sku' => $product->getSku(),
            'name' => $product->getName(),
            'price' => $product->getPrice(),
            );

        foreach ($attributes as $attribute) {
            if ($attribute->getIsVisibleOnFront()) {
                $attributeCode = $attribute->getAttributeCode();
                $label = $attribute->getFrontend()->getLabel($product);
                $value = $attribute->getFrontend()->getValue($product);
                $productSet[$label] = $value;
            }
        }
        return $productSet;
    }

It works perfect and pulls all attributes, however when I try to do it in cart with this code

public function getCartInfo() {
        $cart = Mage::getModel('checkout/cart');
        $quote = $cart->getQuote();
        $counter = 1;
        $outArray = array();

        if ($quote && $quote->getId()) {
            $outArray = array(
                'items_count' => $cart->getItemsCount(),
                'items_qty' => $cart->getItemsQty(),
                'customer_id' => ($quote->getCustomerId()) ? $quote->getCustomerId() : 0,
                'grand_total' => $quote->getGrandTotal(),
                'base_grand_total' => $quote->getBaseGrandTotal(),
                'subtotal' => $quote->getSubtotal(),
                'base_subtotal' => $quote->getBaseSubtotal(),
                'store_id' => $quote->getStoreId(),
                'currency_code' => Mage::app()->getStore()->getCurrentCurrencyCode(),
                );

            foreach ($cart->getItems() as $product) {
                $productId = $product->getProduct()->getId();
                $productPrice = $product->getProduct()->getPrice();
                $attributes = $product->getProduct()->getAttributes();
                $outArray['qty' . $counter] = $product->getQty();
                $outArray['id' . $counter] = $productId;
                $outArray['Price' . $counter] = $productPrice;
                foreach ($attributes as $attribute) {
                    if ($attribute->getIsVisibleOnFront()) {
                        $attributeCode = $attribute->getAttributeCode();
                        $label = $attribute->getFrontend()->getLabel($product);
                        $value = Mage::getModel('catalog/product')->load($productId)->getAttributeText($attributeCode);
                        $outArray[$label . $counter] = $value;
                    }
                }
                $counter++;
            }
        }
        return $outArray;

    }

it only pulls in some, the weird part is if I use

$value = $attribute->getFrontend()->getValue($product->getProduct());

it pulls in 3-4 attributes, and all others are No, then if I use

$value = Mage::getModel('catalog/product')->load($productId)->getAttributeText($attributeCode);

it pulls in 3-4 other attributes, but ones previously available through getValue are now false

So I need to somehow figure out how to pull in all attributes visible in frontend

Any ideas?

Thanks!!


texts:
I'm new in Magento 2.

I create several Patchs in Project/Module/Setup/Patch :

Patch 1
Patch 2
Patch 3

I set all my patchs, one by one, with :

  php bin/magento setup:upgrade

In DB, all it's OK : a new line is created in 'patch_list'.

But how can I specified the order, for example, if I want Patch 2 in first, then Patch 3, then Patch 1 ?
Where I need to add this specification ?

Any idea ?


texts: How to break up product list by first X amount then from X amount to y then y to z, etc

texts:
I am creating a CMS page that lists products from a specific category but I need to break up the list into four. I want to show the first 25 in one list then the next 25 in another, then 40 in a third list and finally any remaining products in the category.

So far I have tried this:

$categoryid = 153;

$category = new Mage_Catalog_Model_Category();
$category->load($categoryid);
$collection = $category->getProductCollection();
$collection->addAttributeToSelect('*');
$collection->setPageSize(24);

It works but the list starts from the first 24 products each time, how can I start the subsequent list from where the previous list ends?


texts: Display an option to upload image before click on Product images

texts:
We are Providing an option for customer to upload product image from frontend.

once we visit product page , we need to click on small image present below Product base image.

Than we need to click on Product image.

than only it will display an option to upload an image below Product Name.

Instead of this what we need is by default it should display an option to upload an image if value of Input Type under "custom options" is Custom Product Preview

initPreview: function()
    {
        var scale = this.option.calcScale(),
            elementId = this.config.previewContainer,
            container = $(elementId),
            c      = this.config,
            area   = c.area,
            thumb  = c.productImage.thumb;
        this.previewScale = scale;

        var areaParams = {
            width : Math.round(area.sizeX   * scale),
            height: Math.round(area.sizeY   * scale),
            left  : Math.round(area.offsetX * scale),
            top   : Math.round(area.offsetY * scale)
        };

        var html =
                '

' +
                ''+
                '

' +
                '

';
        container.update(html);

        this._showPreviewBlock( container );

        container.observe('click', this.onPreviewClick.bind(this));

        var title         = c.editorEnabled ? c.text.thumbTooltipEdit : c.text.thumbTooltipPreview,
            viewIconClass = c.editorEnabled ? '' : 'view-icon';
        container.select('.aitcg-overlay')[0]
            .observe('mouseover', function(){Aitcg.tooltip().update(title).show()})
            .observe('mouseout', function(){Aitcg.tooltip().hide()})
            .addClassName(viewIconClass);

        var styleParams = Aitcg.addPxToValue(areaParams);
        $$('#' + elementId + ' .aitraph').each( function(element) {
            element.setStyle(styleParams);
        });

        Aitoc_Common_Events.dispatch('aitcg_option_preview_create_after_' + this.id, {element: container});

        this.preview = new Aitcg_Editor(this.option);
        this.preview.init(container, Aitcg_Editor.MODE_PREVIEW, true, this.previewScale);
        this.preview.load( $('options_' + this.id).getValue() );

    },


texts: How to find header_template for email template in magento2

texts: i think header_template is xml file in which it call header.html i find header.html file it is in vendor/magento/module-email/view/frontend/email/header.html but i unable to find where is header_template file in magento 2


texts: $_item->getProduct()->getShortDescription() & getShortDescription() Not displaying in frontend email

texts:
$_item->getProduct()->getShortDescription() returns blank when used in a frontend email.

If I use send email in Sales > Orders in admin it displays. I tried setting the Attribute to global. Any ideas


texts:
I need to be able to apply 20% off just the non exclusion items in the cart. Can someone please share their knowledge on how to set this up.

My Coupon Description:
20% OFF PURCHASE with Coupon Code.
Offer valid from Date through Date.
One-time code use per customer account.
Not valid on sale items, gift cards, (Specific Brand Here).
Cannot be used with other offers, discounts or promo codes.


texts:
I've generated a new Magento Connect key per the developer documentation instructions.  How am I supposed to use this key?  i.e., if I try getting info, I see the following.

$ composer info magento/sample-data
    Authentication required (repo.magento.com):
      Username:

If I try following the new installation instructions, I get the same thing.

$ composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2
    Authentication required (repo.magento.com):
      Username:

Is the key my password?  If so, what's the username?  If the key's a true key (i.e. no usename/password needed) where do I configure the key?