texts:
I am working to print multiple order once. I have used the following code to get order email html section.

foreach($orderIds as $orderId):

    $order = Mage::getModel('sales/order')->load($orderId);
    Mage::unregister('current_order');
    Mage::register('current_order', $order);

    echo $this->getChildHtml('sales.order.print');
endforeach;

But If I have multiple orders it repeats every time. but showing the same order. Every time same Child HTML loading, not changing dynamically. My question is how to load child block dynamically with changed value every time.


texts: products in catalogue dont match Shop by

texts:
My website is
www.micahome.com.au

Catalog pages are not displaying the products.
Shop by - products are different from displayed products.
Price structure on product page shows error of 2 x $$ (how to fix)
Footer is missing


texts: Module redirecting back to wrong site after submit button pressed

texts:
I am using Moogento's shipEasy module for order processing and after changing my base URL (admin.sconch.com) to be different to my main website's URL (www.sconch.com) there seems to be a small bug in that after pressing the submit button to carry out an action from the dropdown menu at the top of the page it tries to redirect back to www.sconch.com/admin/... rather than remaining on admin.sconch.com/admin/....

I think that I have traced the error back to this code in /app/code/local/Moogento/ShipEasy/Helper/Grid.php:

protected function _getUrl($route, $params = array())
{
return Mage::getModel('adminhtml/url')->getUrl($route, $params);
}

changing this to:

protected function _getUrl($route, $params = array())
{
return Mage::getBaseUrl();
}

returns to the frontend admin.sconch.com but does not process the requested action.

Can anyone tell me what code I should use to return to the correct admin.sconch.com/admin/... page with the changes applied?

Thanks,

Hugh


texts: aw_blog: List of latest posts in home page

texts: I am new in Magento, I installed aw_blog, with this extension we can just show latest posts in sidebar but I want to show latest posts in homepage but I don't know how can I do this.


texts:
I have it set up so when a customer puts one item for group A in the cart and then an item from group b in the cart they would get a discount on the item from group b of 50%.

It works just fine.

Problem is, if the customer puts one item from group A and 2 items from group B then they would get the discount on both items from Group B.

I had to restrict it so the coupon only works once, but I really want the coupon to work multiple times, but on and one-to-one basis.  So item 1 from group A matches with Item 1 from group B but item 1 from group A does not match with item 2 from group B.  But Item 2 from group A matches to item 2 from group B

Would I need to limit it to Sku.  Like Sku 1 only matches with sku 2, but then that wouldn't work either because they still can't do multiples.

Any ideas short of hard coding this?

Thanks


texts: Update products using csv import but dont update url_key

texts:
I have products on magento 2.4.0 now when I use product import (Add/Update & also replace) to update product data, it throws below error
Url key: 'this-is-product-url-key' was already generated for an item with the SKU: 'this-is-sku'. You need to specify the unique URL key manually in row(s):

In short I dont want to update url_key
I have tried adding field url_key with data in it(url_key which is already generated previously)
Also tried removing url_key field completely which is then throwing below error
The value specified in the URL Key field would generate a URL that already exists

& also tried adding field url_key with blank data
Can anyone please help looking into it.


texts:
I am asked to add a Facebook pixel for the

fbq('track', 'Lead');

Standard event. And I can't figure out which file is this that I need to put the code in it. Any help would be appreciated. Thank you in advance


texts: Magento 2: Set default attribute option as None

texts:
I want to have default attribute value as None but whenever I create an attribute, it's first option value is set as default. Please check attached image. How I can configure it so that it's default value will be None instead of first entered option.

Whereas in Magento 1, I was not forced to have a default option selected as depicted in the picture below.


texts: I need help on deciphering a compilation error

texts:
I'm trying to perform a test compile, and I'm receiving a few errors during compilation.

Here is a copy of the system.log file that gets generated:

    [2016-11-22 05:28:44] main.CRITICAL:
Compilation from source:
frontend/xthemes/theme_default/en_US/css/email-fonts.less
.lib-colorfont is undefined in /home/user/public_html/var/view_preprocessed/css/frontend/xthemes/theme_default/en_US/css/source/_typography.less [] []

[2016-11-22 05:28:44] main.CRITICAL: Compilation from source: /home/user/public_html/vendor/magento/theme-frontend-blank/web/css/email-fonts.less

Compilation from source:
frontend/xthemes/theme_default/en_US/css/email-fonts.less
.lib-colorfont is undefined in /home/user/public_html/var/view_preprocessed/css/frontend/xthemes/theme_default/en_US/css/source/_typography.less [] []

[2016-11-22 05:28:44] main.CRITICAL:
Compilation from source:
frontend/xthemes/theme_supermarket_store/en_US/css/email-fonts.less
.lib-colorfont is undefined in /home/user/public_html/var/view_preprocessed/css/frontend/xthemes/theme_supermarket_store/en_US/css/source/_typography.less [] []

[2016-11-22 05:28:44] main.CRITICAL: Compilation from source: /home/user/public_html/vendor/magento/theme-frontend-blank/web/css/email-fonts.less

Compilation from source:
frontend/xthemes/theme_supermarket_store/en_US/css/email-fonts.less
.lib-colorfont is undefined in /home/user/public_html/var/view_preprocessed/css/frontend/xthemes/theme_supermarket_store/en_US/css/source/_typography.less [] []

So it seems like its missing .lib-colorfont, however it exists in the _extends.less file, but the odd part is that the email-fonts.less file doesn't exist at all.  I'm stumped on how to resolve this.

Any helps is appreciated!


texts: Automatically downloadable product sample link in newsletter SubscriberController Magento

texts:
In my Magento store I have added downloadable products and if user want to download this product user need to subscribe our newsletter. for that I have added newsletter subscriber block in view.phtml file.code is below.

<?php $download = Mage::registry('current_product')->getTypeId();?>
        <?php
            if($download == 'downloadable')
            { ?>

                <input type="button" onclick="showMrnlePopup();" value="To Download This Product You Need To Subscribe Our Newsletter" name="submit"/>

        <?php }     ?>

so I have set onclick function and when user will click on this button newsletter pop-up will open.

in newsletter PHTML file I get current product's id using below code

<input type="hidden" name="pro_id" value="<?php echo Mage::registry('current_product')->getId();?>">

ok now we go to SubscriberController.php file and it's newAction(). I get current product id in newAction() using below code.

public function newAction()
{

$product_id = $this->getRequest()->getPost('pro_id');

if($product_id) {
    /** @var Mage_Catalog_Model_Product $product */
    $product = Mage::getModel('catalog/product')->load($product_id);

    if($product->getTypeId() == 'downloadable') {
        /** @var Mage_Downloadable_Model_Resource_Sample_Collection $samples */
        $samples = Mage::getModel('downloadable/sample')->getCollection()->addProductToFilter($product_id);

        if($samples->count() > 0) {
            foreach($samples as $sample) {
                /** @var Mage_Downloadable_Model_Sample $sample */
                $url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'downloadable/files/samples' . $sample->getSampleFile();
                echo 'Sample URL: ' . $url . "
";
            }
        }

        /** @var Mage_Downloadable_Model_Resource_Link_Collection $links */
        $links = Mage::getModel('downloadable/link')->getCollection()->addProductToFilter($product);

        if($links->count() > 0) {
            foreach($links as $link) {
                /** @var Mage_Downloadable_Model_Link $link */
                $url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'downloadable/files/links' . $link->getLinkFile();
                echo 'Link URL: ' . $url;
            }
        }
    }
}
}

Now what I want is below :

using newAction 's above code I am getting downloadable product's sample link in console and when I enter this link in url it's redirect to home page so this is my first problem.

when this action is called I want to download product's sample link automatically for that what I need to change or add code in SubscriberController 's code

Thanks.


texts: Magento 1.9 to Magento 2.2 code conversion

texts:
what will be in Magento 2.2 code of this?

$order = Mage::getModel('sales/order')->loadByIncrementId($orderId);


texts: Magento 2 indexer:reindex Command Not Working

texts:
when i run command

php bin/magento indexer:reindex

it don't reindex all indexers.

but when i run

php -dmemory_limit=6G bin/magento indexer:reindex

the the following error

Please advice your best ..


texts: Custom customer attribute not showing in admin customer grid table

texts:
I have created an ph:Number customer attribute for the customer registration form . But now i am facing an issue in which that attribute in not showing in the back-end customer grid

the phone number attribute in the above picture is what i created and the code is mentioned below

Method in my Install Schema

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $customField = "custom_field";
        $customFieldLabel = "Phone Number";
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

        $eavSetup->removeAttribute(Customer::ENTITY, $customField);

        $attributeSetId = $eavSetup->getDefaultAttributeSetId(Customer::ENTITY);
        $attributeGroupId = $eavSetup->getDefaultAttributeGroupId(Customer::ENTITY);

        $eavSetup->addAttribute(Customer::ENTITY, $customField, [
            // Attribute parameters
            'type' => 'varchar',
            'label' => $customFieldLabel,
            'input' => 'text',
            'required' => true,
            'visible' => true,
            'user_defined' => true,
            'sort_order' => 990,
            'position' => 990,
            'system' => 0,
        ]);

        $attribute = $this->eavConfig->getAttribute(Customer::ENTITY, $customField);
        $attribute->setData('attribute_set_id', $attributeSetId);
        $attribute->setData('attribute_group_id', $attributeGroupId);
        $attribute->setData('used_in_forms', [
            'adminhtml_customer',
            'customer_account_create',
            'customer_account_edit'
        ]);

        $this->attributeResource->save($attribute);
    }

This customer attribute is missing in the below grid


texts: Shipping calculator locks up half the time

texts: I am currently running Magento 2.3.1 and about half the time I am using the shipping calculator at checkout, it locks up the option to choose which service to ship. If I re-enter the zip code or refresh the page a few times, it will eventually start working again. Is this a common issue? Any ways to fix this?


texts: How to change welcome text in Magento 1.7?

texts: I'm trying to change the color of the welcome text, and I have found the place( Configure-design) to change the actual text, but no way to change the color. Any ideas about where to look?


texts: How to get Search Result Count in head.phtml

texts:
I am trying to get total number of results count in head.phtml page.
I have used following code to get search term. But I am not sure how to get total number of results count here.

$term = Mage::helper('catalogsearch')->getQueryText();

Any help will be appreciated.
Thanks,


texts:
I have overridden the template of a few uiComponents before, but this time whatever I attempt it doesn't work. Hopefully somebody has an idea what's going on.
First off, I used the layoutProcessor to search for the component i'm trying to edit, and changed the ['config']['template'] of the component.
When I inspect the frontend with the knockout-js browser plugin I see that my new path is there and should be functioning. Magento still uses the default ui/form/field component though.
Things I checked: caches have been cleaned and static content has been deleted and generated.
The component has no template declaration in the js file.
Anybody have a clue what could be going on?
PS if I change the elementTmpl instead of the template, it works as expected.


texts: Magento2: Customise product tab in view page

texts:
I want to display all tab contents in page load.

If I click the tab, then page scroll to the corresponding content.

How to do that.

Thanks.


texts: Create custom admin login form using custom url

texts:
I want to make custom page of admin with custom admin url but not call template for admin.If I enter in 127.0.0.1/magento19/index.php/admin_test/adminhtml_login/index so it should redirect to my my custom template(test/login.phtml) but not working .It redirects or execute default admin login page.
Path: app/code/local/Testimonial/Test/Adminhtml/LoginController.php

<?php
class Testimonial_Test_Adminhtml_LoginController extends Mage_Adminhtml_Controller_Action
{

    public function indexAction()
    {
       $this->loadLayout();
        $this->renderLayout();
    }
    protected function _isAllowed()
    {
         return true;
    }

}

?>

test.xml is working

app/design/adminhtml/default/default/layout/test.xml

    <admin_test_adminhtml_login_index>
         <reference name="content">
           <action method="setTemplate">
                <template>test/login.phtml</template>
            </action>
        </reference>
    </admin_test_adminhtml_login_index>

my template file location is
app/design/adminhtml/default/default/template/test/login.phtml

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

        <form method="post" id="admin-login-form">

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

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

                                <input type="text" name="username" title="<?php echo $this->__('Username') ?>" id="username" class="input-text required-entry" />

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

                                <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />

<?php echo $this->__('* Required Fields') ?>

                <button type="submit" title="<?php echo $this->__('Login') ?>" class="button"><?php echo $this->__('Login') ?></button>

        </form>


texts:
I'm trying to install Magento in a Hosting and when I access by the browser to http://mydomain/magento/install.php but it redirects to http://mydomain/magento/index.php/install/ also appears a message like "the page 'mydomain' doesn't work and it can't process that request now".

Anybody knows how to fix this?


texts: Magento 2.3.2 Category API returns null attributes for the entire tree

texts:
When I am trying to call the REST API for generating the Category tree, it shows null values for the entire attribute except id and parent_id

URL: rest/all/V1/categories
Version: Magento Commerce 2.3.2

This is a fresh installation on local environment and there are no third party modules or theme installed.

Please see the screenshot for the out of API


texts: Converting Custom Sales Information to Quote on Manual Orders

texts:
Hello StackExchange community.

Apologise in advance for being vague on this question. However, here we go.

I have a custom sales attribute called 'notes' this is a short description of the shipping method selected by the user. I have built a small module that saves these notes to the quote and then in turn coverts them to the order once the purchase has been made. This works fine for frontend payments. When creating an admin payment, everything works as far as the custom attribute being added the sales_flat_quote table. However, it then doesn't convert it to the order.

I am using the following in my config.xml to handle it :

           <fieldsets>
            <sales_convert_quote>
                <notes><to_order>*</to_order></notes>
            </sales_convert_quote>
           </fieldsets>

As stated this works fine for frontend orders but does not convert on admin payments. Does anyone have any idea why? Is there something over than sales_convert_quote i could try ? Any point in the direction would be greatly appreciated. I'll be happy to post more of the code if it's helpful however i don't think it's necessary since this is the only party of the process that's broken.

Thanks in advance for any help.


texts: Convert getSingleton("core/resource")->getConnection($type) from Magento 1 to Magento 2

texts:
I need to convert some singleton method calls from Magento 1 to Magento 2. Specifically Mage::getSingleton('core/resource')->getConnection($type);
How can I do this in M2? I know that I should first instantiate object manager, but everything after that is to me unknown. Any advice?


texts: Adding the Order Statuses to the Magento Permission Rules

texts: How to add the order statuses to the permission rules in order to be able to assign a particular order status of a state to a user where he/she is able to change the status for an order only if the permission of that particular order status is granted to them.


texts: i am unable to install php_oauth.dll file onto my system therefore not able to see it installed using phpinfo() what i have tried so far: i have downloaded the .dll files for both 32-bit and 64-bit operating systems and updated my php.ini file to add the extension but still unable to show it inside phpinfo(),i want to work with magento REST api therefore i need it to be in working state.


texts:
In my Local Below Url works fine & Displaying

  <a class="product-item-photo" href="<?php $this->getBaseUrl() . 'trade/buyingList'; ?>" title="<?php /* @escapeNotVerified */ echo __('View All'); ?>"><?php /* @escapeNotVerified */ echo __('View All'); ?>

On Server it's only displaying <?php $this->getBaseUrl()

I can access abc.com/trade/buyingList on my Server. Camelcase won't be issue i think. Cach


texts:
I want to secure my website from script injection and other Security failures so is there patch or somthing that i have to do or upload to do so.

Also i want advice from you concerning sécurity magento 2.

And how to change the url of backend from /admin to /somthing/admin.

Thanks in advance :)


texts: SKu is not defined error when uploading product

texts:
Hi can any one help me to fix this error I am not able to upload any product I am gating this error (Line No 1 Skipping import row, required field "sku" is not defined.) I am uploading the Sku like this sku NAY101-Maroon and image like this nay101-maroon-_1__1.jpg I am fade up while uploading this file can any one help me into that. my email is info@shoppingara.com

I tried like this also "nay101-maroon"


texts: Magento 2 Unable to fetch custom options from order item on sales order view page

texts:
sales_order_view.xml
<?xml version="1.0"?>

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

        <referenceBlock name="default_order_items_renderer">
            <action method="setTemplate">
                <argument name="template" translate="true" xsi:type="string">Vendor_Module::order/view/items/renderer/default.phtml</argument>
            </action>
        </referenceBlock>

</page>

default.phtml
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<?php /** @var \Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer $block */ ?>
<?php $_item = $block->getItem() ?>
<?php $block->setPriceDataObject($_item) ?>

    <?php $i = 0;
    $columns = $block->getColumns();
    $lastItemNumber = count($columns) ?>
    <?php foreach ($columns as $columnName => $columnClass):?>
        <?php $i++; ?>
        <td class="<?= /* @noEscape */ $columnClass ?><?= /* @noEscape */ ($i === $lastItemNumber ? ' last' : '') ?>"><?= /* @escapeNotVerified */ $block->getColumnHtml($_item, $columnName) ?>
            <?php if($columnClass == "col-product"){  ?>
                <?php echo __("Type:") ?>
                <?php
                 //here I'm getting empty array
                 print_r( $_item->getOptionByCode('additional_options'));

                ?>
            <?php  } ?>

    <?php endforeach; ?>

$_item->getOptionByCode('additional_options') this lines returns empty array .Please someone guide me hoe to get the additional option value .I have seen the quote_item_option table it contains the data .
I have added custom options to quote item using below code
        $quote = $this->quoteFactory->create()->load($quoteId);
        $_product = $this->product->load($productId);
        $additionalOptions = array();
            if ($additionalOption = $_product->getOptionByCode('additional_options')) {
                $additionalOptions = $this->serializer->unserialize($additionalOption->getValue());
            }

            $additionalOptions[] = [
                'label' => 'Type',
                'value' => 'Sample'
            ];
        $quote->addProduct($_product, 1)
                    ->addOption(array(
                        'product_id' => $_product->getId(),
                        'code' => 'additional_options',
                        'value' => $this->serializer->serialize($additionalOptions)
                    ))
                    ->setCustomPrice(2)
                    ->setWeight(5)
                    ->setOriginalCustomPrice(2)
                    ->getProduct()->setIsSuperMode(true);
                $quote->collectTotals()->save();

it is adding the item and to quote.After saving the order I tried to get the additional option value but i'm unable to get it on order details page


texts: Setting Up Custom URLs For Each Option/Swatch of a Variable Product

texts:
A client wanted to setup where he sells fabric and related stuff and wanted each variation on a different URL.
So example, he sells a shirt with the colors red, blue, and black. Upon landing on the product page, the URL would be: http://example.com/base-t-shirt and upon clicking on a color, it would be http://example.com/base-t-shirt/red (where the "red" after the base-t-shirt/ is the option SKU or whatever identifier)
I believe that this is not a native feature of Magento but is there any workaround?


texts: upload error when create downloadable product

texts:
I'm new for Magento. When I upload file in Product details as 'Downloadable Product', It's uploading fully and showing 100%. But when I click, 'Save' it's giving alert as

There are files that were selected but not uploaded yet.
Please upload or remove them first.

Actually file size 70MB. If I upload small file, here No problem.


texts:
I am having issues with subscriptions and site sending emails out.

I am pretty sure they are being caused by the same thing but I can't figure out what. Whenever a user tries to subscribe they get this message:

  Something went wrong with the subscription.

Mandrill is not install.


texts: Magento multi websites contents replication

texts: We have a magento2 Live site which has only one website at the moment. Now we have a requirement to create multiple websites and We need to replicate cms, blocks and other contents in to the new websites. Is there any script OR ready to use modules available to replicate the site contents into multiple websites?


texts: ssl error invalid or self-signed certificate magento

texts:
I have installed magento on my local server (wamp). Everything is going good, but when i am uploading an image for a product . I get an error "ssl error invalid or self-signed certificate".

What should i do? I am very very frustrated with it.


texts:
I want to display timer countdown in product view page.

how to achieve this ?


texts: removed extension name still displaying in home page

texts:
we installed woopra extension for google analytics.

after that we removed this extension by removing all files of this extension.
but when we  open this link, please observe at left bottom, still you can see woopra.com at the time of loading. i really dont know from where this is coming and i want to remove this permanently.


texts: Magento new attribute for products with countries

texts: I have 10000 products in my magento store and I had to make these products available for particular countries, so I like to proceed with the task by adding available country as a new attribute for each product, how can I proceed with this?


texts: OpenMage LTS 20.01 - Freeshipping not applying

texts:
I have 2 installs of OpenMage 20.01.  Neither will apply the Freeshipping method.
I believe the issue is with  app/code/core/Mage/Shipping/Model/Carrier/Freeshipping.php
if (($request->getFreeShipping())
    || ($request->getBaseSubtotalInclTax() >= $this->getConfigData('free_shipping_subtotal'))

$request->getBaseSubtotalInclTax() is always returning zero.
I applied the work around at this link to "fix" the issue.
https://stackoverflow.com/questions/18489068/magento-free-shipping-not-working
Can anyone confirm if this is a bug within OpenMage and if there is a better fix?


texts: CLI to find out what version my modules are?

texts:
When I run a bin/magento list it doesn't say anything specific about finding out the schema and module versions.

Does anyone know how to figure this out using command line?


texts: Manage Attributes - New Options not saving - 1.9.4.1

texts:
In Magento Admin going to catalog/attributes/
Choose a specific attribute, such as "Artist"
Go to Manage Label/Options
Add Option (in this case an artist's name)
Click Save Attribute or Save and Continue Edit
Either way, it does not save the new label/option and takes me back to the Manage Products Page, not back to the Attributes page.
Is not happening to every Attribute. For example, "Writer" works correctly.
The only changes recently made to the site were doing the latest Magento updates. I was a little behind on updating so I believe it covered the most recent couple of small ones. I think 1.9.3.3 was the one I had done previously. However, it has been a couple of weeks since doing the most recent updates and just discovered this issue, so the cause may be unrelated.

Have tried reindexing everything and cleaning cache and VAR folder. Tried repairing and optimizing the databases in phpmyadmin. Tried updating the Mage.php file to correct logging issue per information I could find on updating issues.

Any and all help would be appreciated!!


texts: I need relevant.xml file for <checkout_onepage_index> in Magento 1 to Magento 2?


texts: Magento 2 : How to avoid 302 status code, actually Referrer URL returns 302 status code?

texts:
If anyone have idea please guide me, below is my code:

<?php
    use Magento\Framework\App\Action\Action;
    use Magento\Framework\App\Action\Context;
    use Magento\Framework\Controller\ResultFactory;
    class Xyz extends \Magento\Framework\App\Action\Action
    {
        public function __construct(
        \Magento\Framework\App\Action\Context $context
        ) {

        parent::__construct($context);
        }

        public function execute()
        {

                $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
                $resultRedirect->setUrl($this->_redirect->getRefererUrl());
                return $resultRedirect;
                // $this->_redirect->getRefererUrl() -> return with 302 status code
        }
      }
?>


texts: Magento cron jobs are not scheduling in the cron_schedule table

texts:
I have cron task in my custom module for sync data. Below is the code in my module config.xml

<config>
-------
<crontab>
        <jobs>
            <tal_intermediate_cron_product>
                <schedule><cron_expr>0 8 * * *</cron_expr></schedule>
                <run><model>intermediate/observer::manageMagentoProducts</model></run>
            </tal_intermediate_cron_product>
            <tal_intermediate_cron>
                <schedule><cron_expr>0 9 * * *</cron_expr></schedule>
                <run><model>intermediate/observer::manageSyncProducts</model></run>
            </tal_intermediate_cron>
            <tal_intermediate_cron_insert>
                <schedule><cron_expr>0 10 * * *</cron_expr></schedule>
                <run><model>intermediate/observer::insertProducts</model></run>
            </tal_intermediate_cron_insert>
            <tal_intermediate_cron_manageorders>
                <schedule><cron_expr>0 11 * * *</cron_expr></schedule>
                <run><model>intermediate/observer::manageOrderDetails</model></run>
            </tal_intermediate_cron_manageorders>
        </jobs>
</crontab>
</config>

But the issue is these cron jobs are not scheduling in the cron_schedule table. But when i set to 50mins these got scheduled. Can anyone tell me if there is any issue in my code. Or is there any other reason for that.

I am facing a huge problem because of this. Anyone can help me please. Thank You.


texts: Magento2 : How To Get Parameters from URL In Controller

texts:
http://mystagesite.com/magento232/custom/module/check/?params=<%3Fxml+version%3D"1.0"+encoding%3D"UTF-8"+standalone%3D"yes"%3F>6<%2FRESPONSECODE>Invalid+Session+Token%3A+Session+has+Timed+Out<%2FRESPONSEDESCRIPTION><%2FRESULT>

In above url , api returns some parameters in xml format

I have to get value of params in check contoller but i have got only empty array

using this code $this->getRequest()->getParams()

I already tried above code but it shows empty array

if i remove first three character from parameter %3F than i got result but that parameter returns from api so can't change that one

so if anyone have idea about this than please let me know


texts: Adding custom CSS / JavaScript to Certain CMS Pages With Custom JS Path

texts:
I tried the both ways,

Method 1:

<reference name="head">
   <action method="addItem">
       <type>skin_js</type><name>js/myJs.js</name>
   </action>
</reference>

  The above gives default skin directory.

Method 2:

<reference name="head">
   <action method="addJs"><script>myJs.js</script></action>
</reference>

  The above gives js directory.

But I Need the file located like the below to add via block and reference head.

src Path: http://www.example.com/wp/folder1/folder2/script.js

Here the http://www.example.com is store url.

How to implement this?


texts:
I am getting deadlocks on this table catalogsearch_query. The table has approx 500k rows.

The site is averaging about 2000 concurrent users.

Edit: To clarify concurrent users I mean the following:

Go to Google Analytics. Click on Real Time, Click on Overview view number in "Right Now"

Magento 1.13.1

The table is 129mb. (catalogsearch_query 129.34)

New Relic is giving me a really slow response time on this query

SQL: INSERT INTO `catalogsearch_result` SELECT ? AS `query_id`, `s`.`product_id`, MATCH (s.data_index) AGAINST (:query IN BOOLEAN MODE) AS `relevance` FROM `catalogsearch_fulltext` AS `s`
 INNER JOIN `catalog_product_entity` AS `e` ON e.entity_id = s.product_id WHERE (s.store_id = ?) AND (MATCH (s.data_index) AGAINST (:query IN BOOLEAN MODE) OR (`s`.`data_index` LIKE ? OR `s`.`data_index` LIKE ? OR `s`.`data_index` LIKE ?)) ON DUPLICATE KEY UPDATE `relevance` = VALUES(`relevance`)

They are averaging 3500 orders per day with a peak of 8000 orders (42000 items) on Friday Nov 28th. I am not sure if that is busy or not but they are expecting a bigger day on Mon Dec 1.

First Question: It looks like the deadlocks are happening on the inserts. What are the ramifications if I reduce the size of this table or simply truncate it?

Second Question: If I can't truncate or remove data what are my other options?


texts: How to override newAccount function Of EMailNotification Model in magento2

texts:
I want to apply a condition for new customer registration email based on user type, for that I applied some condition In new account function and its working fine in my core model but how can I Override that function in my custom module?

here is my code:

etc/frontend/di.xml:

 <preference for="Magento\Customer\Model\EmailNotification" type="Namespace\Mymodule\Model\EmailNotification" />

EmailNotification.php :

public function newAccount(
    CustomerInterface $customer,
    $type = self::NEW_ACCOUNT_EMAIL_REGISTERED,
    $backUrl = '',
    $storeId = 0,
    $sendemailStoreId = null
    ) {
        $types = self::TEMPLATE_TYPES;

        if (!isset($types[$type])) {
            throw new LocalizedException(
            __('The transactional account email type is incorrect. Verify and try again.')
            );
        }

        if (!$storeId) {
            $storeId = $this->getWebsiteStoreId($customer, $sendemailStoreId);
        }

        $store = $this->storeManager->getStore($customer->getStoreId());

        $customerEmailData = $this->getFullCustomerObject($customer);

      //add my custom condition here:
        $userType = $customer->getCustomAttribute('user_type')->getValue();
        if($userType == 2){
            $this->sendEmailTemplate(
            $customer,
            $types[$type],
            self::XML_PATH_REGISTER_EMAIL_IDENTITY,
            ['customer' => $customerEmailData, 'back_url' => $backUrl, 'store' => $store],
            $storeId
            );
        }

    }


texts: CAPTCHA is not visible at frontend login/register form for RWD theme

texts:
I’ve installed magento community edition version 1.9.0.0 and have found that when I set the new captcha feature under System>Configuration>Customer>Customer Configuration>CAPTCHA

I set the captcha to be used on create user and forgot password forms. Tested Create New Account form on frontend and found that the captcha box does not appear at all but when you fill in the form and submit and error message comes back saying that "incorrect captcha".

Its looking for the captcha but not allowing it to be visible for me to fill box in?

Where do I go to make captcha visible in frontend?

I did delete cache and cleared sessions and logged out and logged back in, just not there.


texts: Not triggering sales_order_place_after observer

texts:
I am trying to create a observer which should trigger after sales order complete.
Unfortunately,its not firing.
my Sales_registration.xml file :

            true
            local

 Config.xml file

Observer.phml


texts: Issue with responsive view on product page

texts:
I am not sure if i am asking the question in the right place, but from many days i have been facing an issue with my Magento theme and tried fixing it by editing the layout. but i am not able to get it right for my product page on the responsive side.

The product page hides the Add to cart option behind the header when browsed from mobile or Tablets.

On web it looks like it is working absolutely fine.
Is there anyone who can guide me on where to look into for fixing the issue.

www.omegakart.com is the website that i am trying to fix.


texts: Magento add custom value in product object for checkout cart

texts:
I want to add two variable in specific product using observer event controller_action_predispatch_checkout_cart_add.
These two variable are use in checkout/cart page for display prupose.

Following config.xml.

<events>
    <controller_action_predispatch_checkout_cart_add>
        <observers>
         <test_deliverydate_cart_add>
          <class>Test_Deliverydate_Model_Observer</class>
           <method>logCartAdd</method>
         </test_deliverydate_cart_add>
        </observers>
    </controller_action_predispatch_checkout_cart_add>
</events>

Following Observer.php

public function logCartAdd($event)
{

    Mage::getModel('core/session')->setProductToShoppingCart(
        new Varien_Object(array(
            'productId' => Mage::app()->getRequest()->getPost('product'),
            'rentalDays' => Mage::app()->getRequest()->getPost('rentalDays'),
            'deliveryDate' => Mage::app()->getRequest()->getPost('delivery_date'),
        ))
    );
}

Following test-deliverydate.xml

<checkout_cart_index>
    <reference name="content">
        <block type="core/template" template="test/deliverydate/bookingdate.phtml" />
    </reference>
</checkout_cart_index>

Following bookingdate.phtml

<?php
    $bookedProductDetail = Mage::getModel('core/session')->getProductToShoppingCart() ;
    $productSku = Mage::getModel('catalog/product')->load($bookedProductDetail->getData('productId'))->getSku();
    $rendDays = $bookedProductDetail->getData('rentalDays');

    $bookedDate = $bookedProductDetail->getData('deliveryDate');
    $bookedDate = strtotime($bookedDate);
    $bookedDate = date('Y-m-d', $bookedDate);

    <p> <?php echo $productSku; ?> </p>
    <p> <?php echo $rendDays; ?> </p>
    <p> <?php echo $bookedDate; ?> </p>
?>

When I add multiple products at that time last product's detail like : $rendDays, $bookedDate showing same for all added products.
Please help me how can i solve this problem.


texts: Magento percentage discount amount/value being applied tax rule

texts:
I have strange behaviour which has always existed in my magento 1.7.0.2 as far as I am aware.

I have a tax rule of 20% for all products so prices are input without tax.

When creating a Percentage discount in Promotions > shopping cart price rules>

Under Actions tab I am choosing 'percentage of product price" option.

I am setting value to 7%.

When I use the coupon the discounted amount seems work out 20% more. E.g 7x1.2 = 8.2%

So for a real example I have a product with price 519. I apply 7% coupon and the final price  is 475.40.

519 to 475.40 is in fact a difference of 8.38%

This happens to all products with regular price and special prices.

I also have this issue with fixed price discounts.

If I want to have a discount of £5 I have to make the value in the shopping cart price rule 4.166. Is this normal behaviour for magento?

I could not find anyone posting about this exact issue anywhere. Maybe I am wording it wrong in my searches.

Now onto my tax settings in system>configuration>sales>tax

Please see image below.

Any help would be much appreciated.


texts:
I got a menu option in adminhtml that must be visible if one or both of the children are enabled.

I tried something like that in the adminhtml.xml file:

<social_menu>
    ...
    <children>
        <facebook>
            ...
            <depends>
                <config>option A in config</config>
            </depends>
        </facebook>
        <twitter>
            ...
            <depends>
                <config>option B in config</config>
            </depends>
        </twitter>
    </children>
    <depends>
        <config>option A in config</config>
        <config>option B in config</config>
    </depends>
</social_menu>

The thing is that this works as an AND clause and I want to make it work as an OR.
Is that possible?

Thanks in advance.


texts: How to create a separate log file to print the admin details who deletes a customer profile?

texts: I want to create a new log file which will print the admin details who deletes a customer profile from admin panel in magento 2. How can I do that?


texts:
I have a client that requires their website to have regional pricing, but within the same country.

They service their web orders from their network of physical stores (some franchise and some not) and, as each store can have a different price for an item, these prices need to be reflected on their website.

Ideally, when a customer first arrives they are shown the pricing for the physical store closest to them.

From my understanding though, the only way I can show different prices like this is by creating different websites under the Magento Website > Store > Store View hierarchy, which will not work as I would like to have only the one product catalog.

Is there any other way to accomplish this or is this a lost cause and I should just create the different websites?


texts: Convert existing magento website compatible to mobile

texts: Please suggest some tutorials for converting existing magento website to mobile website.


texts:
For past couple of year my website work fine. From today morning display fatal error "Zend_Uri_Http" not found. I don't know what's issues.

I tried to updated patch files also. I think that issue came from security patch. Because two days before i receive some error mail from website(Security patch issue like that).

Please give some suggestion how to recover my website. Website and admin panel also blocked. I forgot the magento version also.


texts: Upgrade magento from 1.8.1 to 1.9.38. Error: Failed to open File

texts:
I tried to update last magento 1 version but after installation some packages are  giving below error:

CONNECT ERROR:

Failed to open file:
 C:/wamp/www/mysite\downloader.cache\community\Interface_Adminhtml_Default-1.9.3.8\app/design/adminhtml/default/default/template/downloadable/sales/order/invoice/create/items/renderer
    Failed to open file C:/wamp/www/mysite\downloader.cache\community\Interface_Frontend_Rwd_Default-1.9.3.8\app/design/frontend/rwd/default/template/configurableswatches/catalog/product/view/type/options/conf

Please help me to solve this. I am new in Magento CMS.


texts: add a path to a phtml file -- customise url

texts:
Anyone know how i can customise the path for a module so i can have a few paths elements?

I have a module. in the modules xml i have something like

<frontend>
    <routers>
        <mycustomerrouter>
            <use>standard</use>
            <args>
                <module>my_module_name</module>
                <frontName>mymodule</frontName>
            </args>
        </mycustomerrouter>
    </routers>
</frontend>

I can navigate fine to www.myurl.com/mymodule
but how can i make it so i can customise my url in the format of
http://www.myurl.com/some/path/here/mymodule.

Changing the frontname doesnt seem to work eg <frontName>some/path/here/mymodule</frontName> does not work.


texts:
I have a router like this

<routers>
    <mymodule>
        <use>standard</use>
        <args>
            <module>NSP_MyModule</module>
            <frontName>mymodule</frontName>
        </args>
    </mymodule>
</routers>

which (in my environment) will be accessable with this URL /magento/mymodule
but I want the URL key mymodule to be custamizable through backend. How can I achieve that?


texts: How to fix error while running setup:upgrade command Magento 2

texts:
When I run setup:upgrade then I got this error after Schema creation/updates. If you know any solution then let me know. I have 'wishlist_item' this table on 461. Thanks

  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an
  error in your SQL syntax; check the manual that corresponds to your
  MySQL server version for the right syntax to use near 'TABLE 461 WHERE
  Non_unique = 1' at line 1, query was: SHOW INDEXES FROM TABLE 461
  WHERE Non_unique = 1


texts: how to install custom extension in Magento2?

texts:
How to install custom extension in Magento2?
I have Tier Price extension for last beta version of Magento. It was working well but for testing in stable version, not sure how to install it as there is no app/code folder now in the root of the magento.


texts:
Hello I'd like to Assign Sort Order of Product in Category with Catalog Flat Enabled, is there a workaround to let this custom method I've created work without calling the admin store?
Right now trows exception. I've already solved calling

Mage::app('admin');
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

but I would like to avoid that because is messing up the router after I save redirecting me to the admin area.

I've also tried to add at the beginning:

Mage::register("isSecureArea",1);

and at the end of the method:

 Mage::unregister("isSecureArea");

but without success.
This is the method:

 public function assignCategories($category_ids, $productId){
    $position = 120;
    try {
        $api = Mage::getSingleton('catalog/category_api');
        foreach ($category_ids as $category_id) {
            $api->assignProduct($category_id, $productId, $position);
        }
    } catch (Exception $ex) {
        Mage::log($ex, null,"Error.log");

    }
}

many thanks.


texts: Magento 1.9 - How to get price format in javascript or jquery?

texts:
I am trying to get magento price format in php file using jquery / javascript function but facing problem.

What I have tried ....

<script>
var price = 10;
var priceFormat = '<?php echo Mage::helper('core')->currency("<script>document.write(price)</script>", true, false); ?>';
console.log(priceFormat); // output 0.00
</script>

However it should be 10.00

Is this right approach to get price format? If not then how can we achieve this?


texts: Is it possible to create a configurable product with bundle product types?

texts:
I want to create configurable product with bundle. requirement is for recurring bundle product creation.

For Example:

in simple way if i want to create recurring for simple product, what i do is create 3 product with different frequency attribute values (1 week, 1 months, 2 months)

and using this 3 simple product and i can create one configurable which have 3 recurring options.

So, now i want to create same scenario for bundle product.
but bundle product are not showing in associate products list of configurable product. Any help or guideline is very helpful.


texts: How to remove side bar of best seller in my account page of Magento 2

texts: I want to remove sidebar of best seller in My account page of magento 2


texts:
I have found multiple threads related to calling helper function in .phtml.

But I have a case where I need to call phtml file in helper and return HTML.

I have used this code:

//Where $this->_resultPageFactory is the object of \Magento\Framework\View\Result\PageFactory
$resultPage = $this->_resultPageFactory->create();
$html = $resultPage->getLayout()
            ->createBlock("Vendor\Module\Block\Index")
            ->setTemplate("Vendor_Module::index.phtml")
            ->toHtml();
return $html;

It is working fine, but the problem is, it is effecting other stuff like Product title, Media gallery etc (it is changed after using above code)

So, how can I call .pthml from helper?


texts:
I am using Magento 1.9 and I want to have a custom admin template for each stores I have.

Website 1 (Global Admin template)
---- Store 1 (Custom Admin1 template)
---- Store 2 (Custom Admin2 template)
Website 2 (Global Admin template)
---- Store 1 (Custom Admin11 template)
---- Store 2 (Custom Admin11 template)

I am really talking about a new template, not only a role. Is this possible?


texts:
Is there any way how i can create a list of ALL cookies (incl. 3rd party cookies) which my Magento website is using?

I've searched throughout Magento, searched on Google, searched the forums, but i can't find anything how i can realize this.


texts: Magento 2: How to display custom attribute in catalog?

texts:
I’ve created a new textfield attribute, with the following settings set to yes:

Visible on Catalog Pages on Storefront
Used in Product Listing

The attribute is assigned to an attribute set and it shows up in the product view as intended.

However it’s not visible in the catalog view, I’m using the default Luma theme and I’ve cleared cache and re-indexed. If I view the template file:

magento-catalog/view/frontend/templates/product/list.phtml

I can’t find any code getting custom attributes, so the Luma theme doesn’t seem to support this by default.

How can I get a products custom attribute label and value in list.phtml?


texts: Magento2 Add custom html before totals on cart page

texts:
How we can add custom HTML before order total in cart page with Knockout JS same as the screenshot below.

Screenshot:


texts: I want to show customer custom filed value in Sales -> Order -> view page in magento 1.9

texts:
I used magento extension to add custom field in register page. After creation I am trying to show this value in Sales -> Order -> view page Under "ACCOUNT INFORMATION" section by making changes in app/design/adminhtml/default/default/template/sales/order/view/info.phtml files.

I try with same code as currently present in there, like to show name and email :-

<?php echo $this->escapeHtml($_order->getCustomerName()) ?>

<?php echo $_order->getCustomerEmail() ?>

Similarly I use the below code for my custom field (dp_account_no)

<?php echo $_order->getCustomerDpAccountNo() ?>

I also checked other default fields the will work fine like

<?php echo $this->escapeHtml($_order->getCustomerLastname()) ?>

to show last name.

Please suggest me what wrong I am doing ?


texts: Magento 2: How to add Company column in Sales Order grid adminpanel

texts:
How to add Customer billing company Column inside Sales order grid in admin panel.

I want to add extra column inside sales order grid, how to do this in order grids.

Thanks.


texts:
I installed this blog module:

http://www.magentocommerce.com/magento-connect/blog-community-edition-by-aheadworks.html

I tried several options on module configuration, but the left and right menu doesn't appears. Please see the images:

I move the files from design/frontend/default to design/frontend/my_theme and tried to change the xml file. The original xml file: http://pastebin.com/FGuFfjrY

I tried to change in different ways the line 17 to 24.

Thank you for listening


texts: Magento 2: How to add customer grid in custom module tab?

texts:
I want to add customer grid in custom module's tab in Magento 2.1
How can I achieve this?


texts: Magento 2.4 : Sort Product by attribute value

texts:
i have configurable and simple product in my website with Attribute  color: (Values - Red, Green, Blue)
I want to sort product on the listing page with specific attribute value, for example, all product having red as color should show first then rest of products.
I could not get any way to get this done


texts:
I'm trying to add the class "first" and "last" to my categories on the frontpage, but it only adds the "first" class - AND to all of the list items. Can someone please help me with this?

My .phtml looks like this:

<?php $_categories=$this->getStoreCategories();?>

Her kan du købe

        <?php $_columnCount = $this->getColumnCount(); ?>
        <?php $i=0; foreach ($_categories as $_category): ?>
        <?php if($_category->getIsActive()): ?>
        <?php $cur_category=Mage::getModel('catalog/category')->load($_category->getId()); ?>
        <?php $layer = Mage::getSingleton('catalog/layer'); ?>
        <?php $layer->setCurrentCategory($cur_category); ?>
        <?php if($_imageUrl=$this->getCurrentCategory()->getImageUrl()):?>
        <?php if ($i++%$_columnCount==0): ?>
        <li class="list-item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
            <a href="<?php echo $this->getCategoryUrl($_category)?>" title="<?php echo $this->htmlEscape($_category->getName()); ?>">
                <img src="<?php echo $_imageUrl ?>" alt="<?php echo $_category->getName()?>" />
                <?php echo $_category->getName()?>

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


texts: Why API is not in every folder of default Magento folders? When Api is needed?

texts:
I already know the basic of API and its use, but in magento its confusing.(I am new in magento)
if I am creating my module, I can get data from model/repository, that's means API is not required every time.

apart from that I check that only few folders have API folder in default magento, for example its in the magento-catalog, but not in magento-backend.

so what's the best example when we need Api in magento?


texts: how to get value of selected option using jquery

texts:
I need to get selected value from select field using jquery in magento

<field name="slider_location">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="component" xsi:type="string">Vendor_Modulename/js/form/element/containers</item>
                    <item name="dataType" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Display On</item>
                    <item name="formElement" xsi:type="string">select</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="dataScope" xsi:type="string">slider_location</item>
                </item>
            </argument>
        </field>


texts: in my men's category, other category product is showing i only assign 6 products but i don't knw why 40 product is showing

texts:
In my men category, other category product is showing i only assign 6 products but i don't knew why 40 product is showing here please help me.
i only assign 6 product to this category i checked from menu and product function but i didn't find any solution for this.

Let's assume I have a category, Clothing and this category have a sub-category, T-shirts.

Now I add a product to the T-shirts category (by checking the box in the add product screen), but I don't check the Clothing category. So, I assumed this meant that the product would only appear in the T-shirts category on the front end, and not in the Clothing parent category.

However, the product appears in the Clothing and T-shirt categories.

This is a problem because the T-shirt category is an "Include in navigation menu" > No category, i.e. It is supposed to be hidden. All the products in the category have visibility of catalog, so they don't appear in search results.

I've investigated this quite deeply so far and have found that the problem is with the Magento catalog indexing. Running the Category Products indexer from System > Index Management rebuilds the index, running Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Indexer_Product::reindexAll().

This function SELECTs various data from several category-related tables and pipes it into the catalog_category_product_index table, which is the table used to generate the products collection for the category pages.

Does anyone have any suggestions as to how to hide/prevent products from sub-categories appearing in their parent categories?


texts: Magento 2.2.5 Override sales order item block not working

texts:
We are working on Magento 2.2.5, override the \Magento\Sales\Block\Order\Items class method _prepareLayout but it is not working showing error.

File : etc\module.xml

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Kh_Test" setup_version="1.0.0">
        <sequence>
            <module name="Magento_Sales"/>
        </sequence>
    </module>
</config>

File : etc\di.xml

<preference for="Magento\Sales\Block\Order\Items" type="Kh\Test\Block\Order\Items" />

File : Kh\Test\Block\Order;

<?php

namespace Kh\Test\Block\Order;

class Items extends \Magento\Sales\Block\Order\Items
{

    protected function _prepareLayout()
    {
        $this->itemsPerPage = $this->_scopeConfig->getValue('sales/orders/items_per_page');

        $this->itemCollection = $this->itemCollectionFactory->create();
        $this->itemCollection->setOrderFilter($this->getOrder());
        $this->itemCollection->filterByParent(null);

        /** @var \Magento\Theme\Block\Html\Pager $pagerBlock */
        $pagerBlock = $this->getChildBlock('sales_order_item_pager');
        if ($pagerBlock) {
            $pagerBlock->setLimit($this->itemsPerPage);
            //here pager updates collection parameters
            $pagerBlock->setCollection($this->itemCollection);
            $pagerBlock->setAvailableLimit([$this->itemsPerPage]);
            $pagerBlock->setShowAmounts($this->isPagerDisplayed());
        }

        return parent::_prepareLayout();
    }

}

Error:

  1 exception(s): Exception #0 (Exception): Notice: Undefined property:
  Qfix\Gst\Block\Order\Items::$itemCollectionFactory in
  .../app/code/Kh/Test/Block/Order/Items.php on line 12


texts: Mails and messages are not being sent after successful order placement

texts:
Few days before I had minified all the JS files in my Magento store and after that, both the mails and the messages that we had configured to fire on successful order placement is not working.

Is this happening because of the minification of any particular JS file?

Is any JS file is linked to email and message sending?

Kindly let me know.


texts:
I'm hoping someone out there can help me :)

I'm running Magento 1.9 - everything seems to be working pretty much out of the box, but I am having issues with the Meta Descrioptions not appearing correctly in Google results.

If I view the homepage source it has this:

<meta name="description" content="Up to date ladies fashion at affordable prices. " />

However the Google results look like:

Sitti Boutique
www.sittiboutique.co.uk/
Sitti Boutique. Sitti Boutique. Menu Search Account. Cart 0. Recently added item(s) ×. You have no items in your shopping cart. Dresses · Tops · Shorts ...

It is doing this to the homepage, category pages, and product pages.

Can anyone suggest anything please.  I've had a look on the web, but can't seem to find anyone else thats had this issue.

I haven't changed the description for over a month, so Google should have picked this up.

If anyone has any thoughts, I'd appreciate it.


texts: update only related products programatically - magento 2

texts:
I follow this answer for update related products, It works but it will delete cross sell and upsell products of parent. is this default behavior or did I something wrong?

//For testing load one product

$target=$this->productRepository->getById(501);

//Here I collect related skus list programatically

.........................................
..........................................

$skuLinks = explode(",",$related);
$obj = \Magento\Framework\App\ObjectManager::getInstance();
foreach($skuLinks as $skuLink) {

    $productLink = $obj->create('Magento\Catalog\Api\Data\ProductLinkInterface')
    ->setSku($target->getSku())
    ->setLinkedProductSku($skuLink)
    ->setPosition(1)
    ->setLinkType('related');
    $linkData[] = $productLink;

}

//Set Product Link
$target->setProductLinks($linkData);
$this->productRepository->save($target);

//checking, it only display the related skus, previously it shows related,upsell,crossell
$links=$target->getProductLinks();
foreach($links as $link)
{
    echo $link->getLinkType().' - '.$link->getLinkedProductSku().'<br>';
}


texts: How do I use Magento Core Modules French Language Pack for a view

texts:
I have installed Magento Core Modules French Language Pack in my Magento setup.

But I am not sure how it works. I haven't seen any documentation.

My Magento setup is divided in different views for the different languages.

How can I apply this module for a view so that part of the website is french?


texts:
when i install magento 1.9.2 get error

Error in file: "C:\localhost\magento-192\app\code\core\Mage\CatalogRule\sql\catalogrule_setup\upgrade-1.6.0.1-1.6.0.2.php" - SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'website_ids'; check that column/key exists

.  I tried several times without success.
i think MySQL server run import slow.
so i want file database-simple.sql.


texts:
I have created a shopping site in magento now I would like to set up its mobile app using REST API. To set up, In the backend, I created an admin REST Role named “programmer” with all api resource access. Next, I set my REST Attributes for admin to give it all resource access. Finally I created a REST Consumer named “programmer”.
I am using the code from the net
$callbackUrl = "http://localhost/magento/oauth_customer.php";
$temporaryCredentialsRequestUrl = "http://localhost/magento/oauth/initiate?oauth_callback=" . urlencode($callbackUrl);
$adminAuthorizationUrl = 'http://localhost/magento/oauth/authorize';
        $accessTokenRequestUrl = "http://localhost/magento/oauth/token";
$apiUrl = "http://localhost/magento/api/rest";
$consumerKey = '5cba48f94ed1037c815c24d10659bab6';
$consumerSecret = '1f27ba3a51f9779e5ed0d366c4d7dfff';
session_start();
if (!isset($_GET['oauth_token']) && isset($_SESSION['state']) && $_SESSION['state'] == 1) {
    $_SESSION['state'] = 0;
}
try {
    $authType = ($_SESSION['state'] == 2) ? OAUTH_AUTH_TYPE_AUTHORIZATION : OAUTH_AUTH_TYPE_URI;
    $oauthClient = new OAuth($consumerKey, $consumerSecret, OAUTH_SIG_METHOD_HMACSHA1, $authType);
    $oauthClient->enableDebug();

    if (!isset($_GET['oauth_token']) && !$_SESSION['state']) {
        $requestToken = $oauthClient->getRequestToken($temporaryCredentialsRequestUrl);
        $_SESSION['secret'] = $requestToken['oauth_token_secret'];
        $_SESSION['state'] = 1;
        header('Location: ' . $adminAuthorizationUrl . '?oauth_token=' . $requestToken['oauth_token']);
        exit;
    } else if ($_SESSION['state'] == 1) {
        $oauthClient->setToken($_GET['oauth_token'], $_SESSION['secret']);
        $accessToken = $oauthClient->getAccessToken($accessTokenRequestUrl);
        $_SESSION['state'] = 2;
        $_SESSION['token'] = $accessToken['oauth_token'];
        $_SESSION['secret'] = $accessToken['oauth_token_secret'];
        header('Location: ' . $callbackUrl);
        exit;
    } else {
        $oauthClient->setToken($_SESSION['token'], $_SESSION['secret']);
        $resourceUrl = "$apiUrl/products";
        $oauthClient->fetch($resourceUrl);
        $productsList = json_decode($oauthClient->getLastResponse());
        print_r($productsList);
    }
} catch (OAuthException $e) {
    print_r($e);
}

he code returns following errors:

Notice: Undefined index: state in  /Applications/XAMPP/xamppfiles/htdocs/magento/oauth_customer.php on line 16
Notice: Use of undefined constant OAUTH_AUTH_TYPE_URI - assumed 'OAUTH_AUTH_TYPE_URI' in /Applications/XAMPP/xamppfiles/htdocs/magento/oauth_customer.php on line 16
Fatal error: Uncaught Error: Class 'OAuth' not found in /Applications/XAMPP/xamppfiles/htdocs/magento/oauth_customer.php:17 Stack trace: #0 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/magento/oauth_customer.php on line 17


texts: Uncaught TypeError: Cannot read property 'sectionLoadUrl' of undefined

texts:
I am newbie in Web Development. I am working on a Magento ver. 2.1.6. I am getting this error on my every page after loading the page.

.

How can I solve this error. any help will be appreciated.

Thanks

NOTE: This question may be duplicate to this question. But this does not helped me to solve this problem.


texts: Configurable products and Configurable Swatches

texts:
I'm creating some attributes and attributes sets to create configurable products to use the new Configurable Swatches available in the Magento 1.9.1, but some times the configurable swatches works correctly: working and some times it does't work: not working. I tried to find some diference between the configurable products, and attributes that I created but I could find anything. Where should I look to find what is happening? Somebody has a clue?

Thanks!


texts: Magento attribute doesnt show in view.phtml

texts:
I am facing a problem. i want to show a attribute with shipping times on my product page. Now i want to show them under my pricing and above my short discription. I want to make sure that it will stand there as following:

I have placed the code in the addto.phtml section but it needs to show in the view.phtml section. If i edit anything in view.phtml then i does not show up. Even a simple test doesnt show up.

I think it is getting overruled by another page or file. How can i find out? Using following code in addto.phtml

I think that code needs to go here in the view.phtml file:

It does not show up if i use it there. What am i doing wrong?


texts: How we can create an order programmatically using "**paypal_express**" method in Magento 2.1.x

texts:
I'm trying to create an order programmatically using "paypal_express" method in Magento 2.1.x. The entire checkout process is done via custom module and paypal payment via API. All the transactions and process has been done but unable to create order.

  Getting the below Error:

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): PayPal gateway has rejected request. Invalid token (#10410: Invalid token).

Exception #0 (Magento\Framework\Exception\LocalizedException): PayPal gateway has rejected request. Invalid token (#10410: Invalid token).
#0 /var/www/html/shop/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(89): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)

The order can successfully created with 'checkmo' method.

Code Sample:

$shippingAddress->setCollectShippingRates(true)
        ->collectShippingRates()
        ->setShippingMethod('freeshipping_freeshipping'); //shipping method
    $cart->getShippingAddress()->addShippingRate($this->shippingRate);
    $cart->setPaymentMethod('paypal_express'); //checkmo
    //@todo insert a variable to affect the invetory
    $cart->setInventoryProcessed(false);
    // Set sales order payment
    $cart->getPayment()->importData(['method' => 'paypal_express']); //checkmo

Anyone please help me to resolve this issue.


texts: How to add datepicker in magento 2 frontend form

texts: I want to add a datepicker in magento 2 payment method form . Anybody have an idea how to add date picker through knockout js and data-bind in html page please help me on this ?


texts: Magento 2.2 soap api catalogInventoryStockRegistryV1UpdateStockItemBySku

texts:
I'm trying to use Magento soap catalogInventoryStockRegistryV1UpdateStockItemBySku, but I cannot understand how parameters should be passed. I know there is REST documentation but if I apply the REST array of parameters to the soap call, it doesn't work.

So my question is: How can the catalogInventoryStockRegistryV1UpdateStockItemBySku api be used with soap? Alternatively, how can I update stock via soap?


texts: Magento 2 Newsletter template path in cpanel

texts:
I want to permanently change all the email templates from backend cPanel,
but I'm enable to find the path :(

Does anyone knows where are the default email templates file located in cPanel magento 2.2?


texts: What would the URL be for a second website/store?

texts:
I need to setup a second, separate website/store which does not share the same shopping cart. How do I do that, and how would the new website/store be accessed?
Single domain/server.

i.e. the shopping carts need to be separate because the origin locations for shipping are different.


texts:
Does anyone know how to have all of Magento's JS script tags e.g. <script type="text/javascript" src="http://sitename.com/js/prototype/prototype.js"></script> render out before the closing </body>?

I've tried this once before, but I was given an error which I think was along the lines of the addJS method not being available where I used it, possibly in reference footer.


texts: Tools and extension helpful in magento 2 development

texts:
I am curious to know about extension and tools which can be helpful in Magento development i.e commerce bug, PHPstorm etc.

Nice reading here from Stackoverflow and from magento.stackexchange.com

If this post will be off-topic, i will delete it.

I accept that its opinion based and also feel that @Magento StackExchange is great for this.


texts:
I'd like to retrive the categories tree excluding some categories of level 2.
Here is my code where I exclude them

$categories = Mage::getModel('catalog/category')->getCollection()
    ->addAttributeToSelect('id')
    ->addAttributeToSelect('name')
    ->addAttributeToSelect('is_active')
    ->addAttributeToFilter('level', array('eq'=>2))
    ->addAttributeToFilter('entity_id',array('nin'=>array($parent_id_to_exclude)))
    ->load()
;

Then I imagine to create a foreach loop to retrieve the subcategories, but I have no idea which is the attribute to select the parents.
thanks


texts: Magento 2.4: How to create Observer for "after save" event in custom module

texts:
I am using the custom module, in the backend, there are two fields, Field 1 manually entered Field 2 get the values based on Field 1. Here I want to get the Field 1 value in Observer after click save, after getting that Field 1 then I need to pass that value to
https://mybusiness.googleapis.com/v4/accounts/123456789/locations?filter=storeCode=SAN)   // SAN is my Field 1 value
The API returns the Location Id which I want to be saved to Field 2


texts:
I have a website and I want to have my custom theme based on a previously installed theme which is a third party theme.

Previously installed theme is ABC.( set under Theme -> Default)

Now I have created my custom theme based on
http://devdocs.magento.com/guides/m1x/ce19-ee114/RWD_dev-guide.html
http://alanstorm.com/magento_parent_child_themes
But the theme is not falling back to ABC and trying to find files in my custom theme and if it is not able to find the file in custom theme it is giving 404 error for that file.

app/design/frontend/rwd/custom/etc/theme.xml

<?xml version="1.0"?>
<theme>
    <parent>rwd/ABC</parent>
</theme>

Directory path for parent theme :
app/design/frontend/rwd/ABC

skin/frontend/rwd/ABC

My custom theme skin directory :

skin/frontend/rwd/custom

Please help me to fix this issue.


texts:
I have the following function for auto uploading images and setting the default one:

function importImages($sku, $image_url, $is_default){
    $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);

    $image_type = substr(strrchr($image_url,"."),1); //find the image extension
    $filename   = md5($image_url . $sku).'.'.$image_type; //give a new name, you can modify as per your requirement
    $filepath   = Mage::getBaseDir('media') . DS . 'import'. DS . $filename; //path for temp storage folder: ./media/import/
    file_put_contents($filepath, file_get_contents(trim($image_url))); //store the image from external url to the temp storage folder
    if($is_default==true){
        //$product->setMediaGallery(array('images'=>array (), 'values'=>array ()));
        $mediaAttribute = array (   'image',
                                    'small_image',
                                    'thumbnail'
                                );
    }else{
        $mediaAttribute = null;
    }
    $product->addImageToMediaGallery($filepath, $mediaAttribute, true, false);

    $product->save();
}

The problem is that the default images isn't setted up as expected.


texts:
How to display all product attribute in my custom grid i am using the below code but its returning results in array format can you please correct me where i am doing wrong

 $this->addColumn('action',
            array(
                'header'    =>  Mage::helper('kems')->__('Magento Attribute'),
                'width'     => '100',
                'align'     => 'center',
                'type'      => 'select',
                'getter'    => 'getId',
                'renderer'  => 'Kensium_Kems_Block_Adminhtml_Renderer_Attribute',
                'filter'    => false,
                'sortable'  => false,
                'index'     => 'magento_attribute',
                'is_system' => true,
            ));

===================================================

public function render(Varien_Object $row)
    {

    $url ='';
    $html =array();

    $attributes = Mage::getResourceModel('catalog/product_attribute_collection')
                                        ->getItems();

    foreach ($attributes as $attribute){

     $html[] = $attribute->getFrontendLabel();

    }

   //echo '<pre>';
   print_r($html);
    //die;
    return array_keys($html);
}


texts:
I just had to add a 301 redirect to a old dev site and it did not go as smoothly as I'd have assumed. I added the redirect to my htaccess file, backed up the old one and nothing worked.

Turned out that Magento somehow overwrites the htaccess file (at least the redirect parts of it) and caused me some headaches.

The other Devs and me decided we were going to start adding password protection via htaccess on all out development sites and I am trying to find out how I can do this given Magento keeps ignoring what I add into my htaccess files.

To clarify the only way i got the 301 redirect to work was by deleting local.xml off my server, cutting off Magentos database access. Do I have to worry about Magento changing any password settings i add to my htaccess files as well?


texts: Magento 2.3.5 - freshly installed admin page is disabled and showing a spinner forever

texts: After a fresh Magento 2.3.5 install, my admin dashboard is partially loaded. There is a spinning element that appears over it while the entire page is disabled. I have attached a picture. Please can someone tell me how I can solve this problem? Thanks.


texts: Category page Grid - Manual/Custom Product Sequence on Page Load (Store View level)

texts:
Is it possible to manually set the sequence of product items that appear for a specific category on page load for different Store Views

However, when filters are applied by Visitor, then sequence changes accordingly.

community-edition magento2


texts: Magneto 2: How to get page title from URL key

texts:
I need to get page title by URL key.
I have Breadcrumbs URLs with also product URL.
Need to show title as per URLS in breadcrumbs.
Eg:
http://localhost/magento2.4/
http://localhost/magento2.4/Default/
http://localhost/magento2.4/Default/argus-all-weather-tank.html

There are three urls. On the basis of URL key, wants to get page title.
Anyone have any idea?


texts:
In a Magento2 system 2.2.0-dev I try to set the Backend language. In the account setting for the user I selected the language (interface locale) and saved it. Emptied cache etc, but its not applied?
What am I missing here?
Or can this only be done through the command-line? And if so how?


texts: set acl permission for tabs in sales order view

texts:
I need to set ACL permission for the tabs under sales order view

How can I do that?


texts:
I want to move a block on my page.
its now located in the header and i want to move it to the panel header.

In the xml file of the extension, i see this:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="Interactivated_Customerreview::css/kiyohrating.css"/>
    </head>
    <body>
        <referenceContainer name="header-wrapper">
            <block class="Interactivated\Customerreview\Block\Customerreview" name="top.kiyohmicrodata" as="top.kiyohmicrodata" template="Interactivated_Customerreview::microdata.phtml" />
        </referenceContainer>
    </body>
</page>

What do i need to change to move this?


texts: How to add custom text fields in Magento 2 admin module page

texts: I have created a new admin module page in magento 2 using this link http://devdocs.magento.com/guides/v2.0/ext-best-practices/extension-coding/example-module-adminpage.html. Now I want to add two text boxes and a submit button in the same page. How can I do that?


texts: Coupon block not displaying inside mini cart

texts:
I am trying to add coupon block in mini cart of magento.

But the coupon code block is displaying in the content section (also css changed!)

\Magento\Checkout\view\frontend\layout\default.xml

UPDATED: To display the coupon block in the minicart

 <referenceContainer name="minicart.addons">
        <block class="Magento\Checkout\Block\Cart\Coupon" name="checkout.cart.coupon">
            <arguments>
                <argument name="template" xsi:type="string">Magento_Checkout::cart/coupon.phtml</argument>
            </arguments>
        </block>
    </referenceContainer>
      ...


texts: I want to export all the customers who buy between two dates

texts: I know how to export my customers, but is it also possible to export my customers who buy between two dates?


texts: Magento2 : How to include MSP RECAPTCHA in aheadworks popup?

texts:
In home page I have a aheadworks popup which has a custom form.

I need to have MSP recpatcha in the form. The form elements are coming from a static block from a aheadworks extension.

How to include the MSP recatcha in aheadworks popup?


texts: Magento 2 Layered Navigation SEO Friendly Urls

texts:
Context:

When selecting a filter on a category page, that displays multiple products, a url is built.

For example. Selecting color => red will result in the following url:
www.shopurl.com/[category]/[subcategory]...?color=152.

The number being the id. I wish to keep all functionality but display the label. e.g. url..?color=red

I'm not expecting a full "tutorial" on how to this. But I would need some pointers and maybe some answers?

I suspect that at some point the argument from the url is read and the product collection is filtered. Where does this happen?
When a filter is clicked the page refreshes with the new url that contains the filter. Where does this happen?

Many thanks.


texts: Check "Use Default Value" for super attribute

texts:
In the BO, when I go on a configurable product > associated products, I have this following block :

I want to check the checkbox "use default" for my configurable products.

When I load the product, I can't access to this super attribute :

$product = Mage::getModel('catalog/product')->load($product_id)->setStoreId($store_id);

I can access this variable with this code :

$productAttributeOptions = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product);

But now, I can't make any modification (I though make something like that : $product->setData($attr, false)->save();)

Someone have any idea ?


texts: When you change Magento Theme, do old products get lost?

texts:
I've had this question for a long time now and I couldn't risk changing the theme and losing every product I have right now.
So, do the products and the old data get lost when you change the theme ?

If not, do they automatically start showing up using the new theme?


texts:
Is there a way of setting up an order on a customers profile that will automatically send after a certain time period. For example a order that will automatically dispatch every 2 weeks, like a standing order.

Or even an extension which knows how to do this?

Thank you


texts: Magento 2 : How to add pages to custom tabs in admin panel

texts:
i have created custom tabs in magento 2 and i want to add pages to custom tabs and get values from database from custom tables, this is what i have done..

but dont know what to do next. how to add more options and get data from custom table.


texts:
We have upgraded to magento 1.9.3.4 and we have custom theme , in the custom theme we have uploaded patch files and in the payment.phtml file we have kept formkey under fieldset.

But issue is after payment method selected it is not continued to place order.


texts: Should the createPaypalExpressToken mutation redirect to the frontend store?

texts:
I'm trying to integrate Paypal Express with PWA. Using Magento's documentation, and more specifically, the createPaypalExpressToken mutation which begins the authorization process, I'm having trouble with its input return and cancel URLs. Having these relative URLs, using a call from PWA, Magento constructs the full URLs using the frontend store URL.
Now obviously the customer should never reach the frontend store while browsing the PWA app, so I'm curious how to avoid a redirect to the frontend store in the first place (or any other solution), while still managing to create the Paypal Express token.


texts: How to get controller path for $postUrl for reading CSV in Magento 2?

texts:
I have created custom button in Admin Menu for import CSV and created a controller with below path
app/code/Tym17/AdminSample/Controller/Adminhtml/SampleTwo/Index.php

Used this in my phtml file with function name
<?php $postUrl = 'AdminSample/sampleTwo/index/import'; ?>

Is that correct path to use in phtml file.
But in my case it's just refresh the page not die that.
My Controller File
<?php
namespace Tym17\AdminSample\Controller\Adminhtml\SampleTwo;

use Magento\Backend\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;
use Magento\Framework\App\Config\ScopeConfigInterface; // Needed to retrieve config values

class Index extends \Magento\Backend\App\Action
{
/**
 * @var PageFactory
 */
 protected $resultPageFactory;
 protected $csvProcessor;
/**
 * @var scopeConfig
 * Needed to retrieve config values
 */
protected $scopeConfig;

/**
 * @param Context $context
 * @param PageFactory $resultPageFactory
 */
public function __construct(
    Context $context,
    PageFactory $resultPageFactory,
    \Magento\Framework\File\Csv $csvProcessor,
    ScopeConfigInterface $scopeConfig // Needed to retrieve config values
) {
    parent::__construct($context);
    $this->resultPageFactory = $resultPageFactory;
    $this->csvProcessor = $csvProcessor;
    $this->scopeConfig = $scopeConfig; // Needed to retrieve config values
}

/**
* Index Action*
* @return void
*/
public function execute()
{

    if (!isset($file['tmp_name'])) {

         throw new \Magento\Framework\Exception\LocalizedException(__('Invalid file upload attempt.'));

     }

     $importProductRawData = $this->csvProcessor->getData($file['tmp_name']);

     foreach($importProductRawData as $rowIndex => $dataRow) {

         \Zend_Debug::dump($dataRow);

     }

     die();
}
}

Use that link to refer these https://firebearstudio.com/blog/how-to-read-a-csv-file-convert-it-into-an-array-in-magento-2.html


texts:
Where can I edit the Postage / Shipping Label for Magento?

Is it in the back end? Or through the FTP?

Just need to edit the layout of the invoice that gets sent to the customer.


texts: Issue with Magento 2.4 and WebAPI integrationAdminTokenServiceV1 - Requested service is not available

texts:
We have some trouble accessing the WebAPI
Our integration software (Tradebox) is connecting to our Magento 2 instance, but the error logs show the following
[2020-10-15 10:30:49] main.CRITICAL: Report ID: webapi-5f8824d91c8fa; Message: Requested service is not available: "integrationAdminTokenServiceV1" {"exception":"[object] (Exception(code: 0): Report ID: webapi-5f8824d91c8fa; Message: Requested service is not available: \"integrationAdminTokenServiceV1\" at /mnt/data/home/host/vbfrxmvdmv/public_html/vendor/magento/framework/Webapi/ErrorProcessor.php:208, RuntimeException(code: 0): Requested service is not available: \"integrationAdminTokenServiceV1\" at /mnt/data/home/host/vbfrxmvdmv/public_html/vendor/magento/module-webapi/Model/ServiceMetadata.php:191)"} []

I have created an admin user, and an integration also. I am unsure as to why the 'integrationAdminTokenServiceV1' is unavailable to my integration - I have input the integration token into swagger and can verify that this is not available.
My inclination is that this has something to do with 2FA, but how is an integration supposed to work with 2FA?
Could anyone shed any light on this?


texts: Magento 2 : Check before Cart Price Rules Applies

texts:
I have been looking for event || Plugin || Whatsoever !!

I have a rule that will apply to the customer only one time, without using coupon code.

I am willing to add some conditional statements before that discount(Cart Price Rule) applied to customer cart.

How to do that? what's possible way?

UPDATE

I am trying to find a way to give the discount to users who subscribe to our newsletter.

If they subscribed to the newsletter than they will get $5 fixed price discount on their first purchase without using any coupon code.


texts: Unlink simple product variant from configurable product programmatically in magento 2

texts:
I want to unlink some (not all) simple products from configurable product.
I don't want to delete simple products, I just want to unlink from the main configurable product programmatically.


texts: How can I change a text in Magento 2 Checkout page?

texts:
How can I change text in checkout page in Magento 2?
I already googled but most suggested to change a translation file (.csv) - This is not a ideal solution I think.

Especially, I want to change a text 'Apply Discount Code'.

When I search the text in all file, I found a file is using the text.
(File path: \vendor\magento\module-checkout\view\frontend\templates\cart\coupon.phtml)

<div class="fieldset coupon<?= strlen($block->getCouponCode()) ? ' applied' : '' ?>">
    <input type="hidden" name="remove" id="remove-coupon" value="0" />

        <?= /* @escapeNotVerified */ __('Enter discount code') ?>

            <input type="text" class="input-text" id="coupon_code" name="coupon_code" value="<?= $block->escapeHtml($block->getCouponCode()) ?>" placeholder="<?= $block->escapeHtml(__('Enter discount code')) ?>" />

        <?php if (!strlen($block->getCouponCode())): ?>

            <button class="action apply primary" type="button" value="<?= /* @escapeNotVerified */ __('Apply Discount') ?>">
                <?= /* @escapeNotVerified */ __('Apply Discount') ?>
            </button>

        <?php else: ?>

                <button  type="button" class="action cancel primary" value="<?= /* @escapeNotVerified */ __('Cancel Coupon') ?>"><?= /* @escapeNotVerified */ __('Cancel Coupon') ?></button>

        <?php endif; ?>

Help! Thank you in advance...


texts: Programmatically Change Total Weight in Cart

texts:
I need to override the total weight of a customers order programmatically based on various conditions.

I am wanting to change the weight of the whole cart from the real value of 5000 to 957565:

// first echo (to check if the weight is actually saved)
echo $quote->getShippingAddress()->getWeight().'<br />';

if ($x == 'y' && $a < $b)
{
    $quote = Mage::getSingleton('checkout/session')->getQuote();
    $quote->getShippingAddress()->setWeight(957565);
    $quote->save();

    // second echo
    echo $quote->getShippingAddress()->getWeight();
}

Which outputs each time I visit the cart page/another page:

5000
957565

So the weight does seem to be saved correctly when outputting the second echo but when I reload the page or go to the checkout the weight always reverts back to 5000


texts: Color swatches as filters in layered navigation in Magento 1.9.3.7

texts:
I am reading the documentation for Magento's configurable swatches and I cant figure out if I can use that feature for the following scenario:

I have several different Simple Products at different colors.
I have a color attribute
I am setting the relevant color in each product.

Right now, in layered navigation I get the text for each color. I have tried to use Configurable swatches for this attribute, but when I activate the option I still see the header Color in layered navigation, but is empty. I dont see neither the color images I have uploaded in media/wysiwyg/swatches, or the text.

So, is there a way I can use images instead of text in layered navigation for this scenario?


texts: Magento admin product discounts disappear for a store in a different timezone

texts:
We are running Magento community version 1.8.1.0.

In the default config, the timezone is set to China Standard Time(Asia/Shanghai). In one of our stores (call it Store A), the timezone is set to Pacific Standard Time (America/Los_Angeles).

For some reason, on March 12 2018 (China Standard Time), the discounts in Magento admin for Store A (Pacific Standard Time) have disappeared. We believe this has something to do with the daylight savings time changes on March 11 2018 (Pacific Standard Time).

Is there any way to force the discounts to appear in Magento admin for Store A?


texts: How to pass an observer from the observer?

texts:
public function someObserver($observer) {

    Mage::dispatchEvent('some_event', ?);

}

What do we need to have instead of a ?? $observer? But it expects array. I want the observer that catches some_event to have the same values as someObserver does.


texts:
I've recently turned on Paypal Express Checkout on my Magento site, during testing I noticed that once the transaction is completed in Paypal the customer is redirected back to a final order confirmation page on my website.

Research told me that this was due to the "pass shipping options to Paypal" option as well as my cart/basket page not being HTTPS.

After having enabled SSL on the cart, Paypal is still redirecting customers back to my website to complete the transaction.

Can this be avoided? Is there a way for the customer to complete their entire transaction on Paypal and simply to return to my website for the "Order Complete" page?


texts: Magento 2 - Change order status when Credit memo created

texts:
Below code to create credit memo programmatically

public __construct(
    \Magento\Sales\Model\Order $order,
    \Magento\Sales\Model\Order\CreditmemoFactory $creditmemoFactory,
    \Magento\Sales\Model\Order\Invoice $invoice,
    \Magento\Sales\Model\Service\CreditmemoService $creditmemoService,
    array $data = []
) {
    parent::__construct($data);
    $this->order = $order;
    $this->creditmemoFactory = $creditmemoFactory;
    $this->creditmemoService = $creditmemoService;
    $this->invoice = $invoice;
}

public function refundCode()
{
    $order = $this->order;
    $order->load(10);

    $invoices = $order->getInvoiceCollection();
    foreach ($invoices as $invoice) {
        $invoiceincrementid = $invoice->getIncrementId();
    }

    $invoiceobj = $this->invoice->loadByIncrementId($invoiceincrementid);
    $creditmemo = $this->creditmemoFactory->createByOrder($order);

    // Don't set invoice if you want to do offline refund
    $creditmemo->setInvoice($invoiceobj);

    $this->creditmemoService->refund($creditmemo);
}

Here the function refund located at path vendor\magento\module-sales\Model\Service\CreditmemoService.php does the work, but I could not figure out how it sets the Order Status to Closed?

When a credit memo is created, it changes order status to Closed. How do I change it to Canceled?


texts:
I would like to getting started with Magento 1.9 as a developer. I supposed that Magento had a GitHub repository that I can download the source base, but I could find it.

Where can I find a documentation explaning how to build Magento and setup it on a developer enviroment?


texts: setting migration magento 1.9.1.0 to magento 2.3.1

texts:
I am migrating settings from Magento 1 to Magento 2, I ran the migration setting commands and I've got a successful message.
The problem is that when I navigate to the website I get this error:

Magento\Framework\Exception\NoSuchEntityException: The store that was requested wasn't found. Verify the store and try again. in /var/www/vhosts/myhost/httpdocs/vendor/magento/module-store/Model/StoreRepository.php:112 Stack trace: #0....

command:

php -f bin/magento migrate:settings -r vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.1.0/config.xml


texts: How to disable the cache for header.phtml in magento 2?

texts: I want to use rand() php function in header.phml but if Magento cache is enabled then rand() function display old random value, but if the cache is disabled then it is working fine. so please give me the suggestion.


texts: Make the invoice search results default to 200

texts:
On Sales>Invoices... The invoices default to 20 per view. We have a large store and require and would prefer if the invoices defaulted to 200 per view.

Is there anyway I can do this?

Thanks


texts: assign products to categories theough excel sheet?

texts:
we are uploading products through .csv format

System >import /export > Dataflow profile > import products

we already have lot of categorries in backend

how to assign those new products to the categories we wanted in the excel sheet ?


texts:
I added a column in customer_grid_flat table using UpgradeSchema.php . But each time I run the command php bin/magento indexer:reindex this column gets deleted.
I cannot figure out why this happen.Please help in this regard.
I attached below the customer_eav_attribute and eav_attribute.


texts: Add static block into "home" category from backend

texts:
I saw that in possible add a static block from the category management into Magento backend as you can see in picture

I tried to add the static block and to display it but it doesn't work.

I want to display a different static block for each categories that I have (e.g. for the category 1 I want display a gallery with only pictures that are about the specific category also a little banner that have a specific content for the specific category, and so for every category)

How can I fix it? I prefer to manage it from the backend

EDIT:

at left is the screenshot from my magento's backend

at right  is my webiste category after saving the configuration.


texts: Getting New Session Id before session expires,checkout/session car is empty even cart has item

texts:
I have a local module, which adds product to cart.To add to cart i have some conditional check before adding to cart,and i am using getSingleton('checkout/session')->getQuote() object for getting number of items in cart.

My code, initially checks number of items in cart in that session,by below code.

if(Mage::getSingleton('checkout/session')->getQuote()->hasItems())
{
}

adding Product to cart code,

$cart = Mage::getModel('checkout/cart');
$product = $this->_initProduct();
$related = $this->getRequest()->getParam('related_product');
$cart->addProduct($product, $params);
$cart->save();
$this->_getSession()->setCartWasUpdated(true);

My Question is , sometimes hasItems() returns false even my cart has products.

EDIT

I tried logging session_id(), an i found that this session_id changed unexpectedly. That means new session is created , so my cart is empty in this new session.

My Question?

I dont create any session in my code, then why new session is created before the session timeout?


texts:
the worst case scenario happened: Google indexed a staging installation that was temporarily online and a customer ordered in this staging area.

How complicated is it to copy the order from one installation to another, as long as the id is still open in the target system? What do I have to export/import to transfer the order?

I know, it's a "you should never do that" situation, but I need to transfer that order somehow.

Thanks for your help

Arne


texts: Magento 2 - How to move the product price block before addtocart button?

texts:
I am using custom theme and trying to move the "product.info.price" block before the addtocart button.

I have tried, direct into addtocart.phtml file but not working.

<?php echo $this->getPriceHtml($_product) ?>

  app\design\frontend\my_package\my_theme\Magento_Catalog\templates\product\view\addtocart.phtml

If I used :

<move element="product.info.price" destination="product.info.addtocart" />

Then it moves the price but it only appears on simple products without custom options.

If I used :

<move element="product.info.price" destination="product.info.addtocart.additional" />

Then it moves the price but it only appears on simple products with custom options.

So, How I can show the price block for both simple product and simple product with custom options.


texts:
I noticed that the nginx processes have two different users: root is the user which runs the master process, and nobody is the default one for workers.

To which user must I place the cron job ? I believe it's the one who runs the workers.

Thank you.


texts: How can I extend/override admin controller for login?

texts:
I would like to set the admin to be a different locale to the locale of the base shop. For this I need to add a 'setLocale' line into the admin index controller loginAction. This works great if I edit the core file or copy that over to local. However I would prefer to do this the proper Magento way.

I have a small module:

app/code/local/Woolfie/AdminExtras/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Woolfie_AdminExtras>
            <version>0.1.0</version>
        </Woolfie_AdminExtras>
    </modules>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <Woolfie_AdminExtras before="Mage_Adminhtml">Woolfie_AdminExtras</Woolfie_AdminExtras>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>
</config>

With a file:

app/code/local/Woolfie/AdminExtras/controllers/Adminhtml/IndexController.php

This simply contains:

<?php
require_once "Mage/Adminhtml/controllers/IndexController.php";
class Woolfie_AdminExtras_Adminhtml_IndexController extends Mage_Adminhtml_IndexController{

  public function loginAction()
  {
    if (Mage::getSingleton('admin/session')->isLoggedIn()) {
        $this->_redirect('*');
        return;
    }
    Mage::getSingleton('adminhtml/session')->setLocale('en_GB');
    $loginData = $this->getRequest()->getParam('login');
    $username = (is_array($loginData) && array_key_exists('username', $loginData)) ? $loginData['username'] : null;

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

}

I have no idea why this won't run, however, it should change the admin login screen to always be English (en_GB).
Any ideas or alternatives to this problem (other than changing my admin store locale which I cannot do).


texts: Anybody konw how magento1.7 behave with mod_pagespeed apache module to increase performance of website?


texts: Magento 2: How to show admin system configuration options conditionally?

texts: I have a dropdown in Magento 2 config setting. Now I want the setting to get displayed only when there are any options available for the dropdown, else it should be not shown. I also want to display a message in this case that "NO options are available currently". How can I implement that without breaking magento2 standards.