texts: Magento simple products not visible individually still show up

texts: I have a Magento website in which all of the configurable products are set to Catalog, Search and the child products are set to Not visible Individually. However, if I search the website I seem to be able to find the child products and even buy them. What am I missing here? I


texts:
I installed an extension for a customer of ours and I'm just learning about SQL and SQL injection, and this extension uses all kind of AJAX calls. However, I checked the code and some of the AJAX parameters are used directly in queries. I wonder, is this code for example SQL injection safe?

    $collection = Mage::getModel('blogn/user')->getCollection();
    $collection->getSelect()->joinLeft($table, 'main_table.user_id = ' . $userId. ','profile_id');

So, the $table variable is hardset just above the code. However, the $userId directly comes from an AJAX POST.

This is just an example, but a little down further there is also a getSelect()->where part, where also the $userId is direclty inserted.

Is this safe? To me it seems not. Should the query be changed to bind variables? Does Magento support this? For example, can I make the query something like this:

$collection->getSelect()->joinLeft($table, 'main_table.user_id = ?,'profile_id',array($userId));

Assuming that binding this variable would be safer because it can be prepared statement then?


texts:
answer TTFB I expect 10 to 20 seconds of time
I can’t understand why.
Tell me how to improve it.

here is a screenshot top command


texts: opcheckout.js - setMethod undefined onClick

texts:
I re-styled the Code in my login.phtml (onepage checkout) and now the "continue"-button does not work. Console outputs "Uncaught TypeError: Cannot read property 'setMethod' of undefined"

opcheckout.js doesnt seem to need defined classnames and I used basically the markup of the original login.phtml. What did I do wrong?

<?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?><?php echo $this->__('Checkout as a Guest or Register') ?><?php else: ?><?php echo $this->__('Register to Create an Account') ?><?php endif; ?>

<?php echo $this->__('Register with us for future convenience:') ?>

        <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
        <input type="radio" name="checkout_method" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_GUEST): ?> checked="checked"<?php endif; ?> class="radio" />
        <?php echo $this->__('Checkout as Guest') ?>

        <?php endif; ?>

        <input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" /><?php echo $this->__('Register') ?>

        <input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" />

            <button type="button" class="button" onclick="checkout.setMethod();"><?php echo ($this->getQuote()->isAllowedGuestCheckout() ? $this->__('Continue') : $this->__('Register')) ?></button>


texts: Custom field not showing on order details (admin)

texts:
I created three new fields in the register address, I need to show them in the order details. I tried adding them going:

System > Customers > Settings > Templates Address

And added the fields with the same name that is in the database. Here's an example of how I tried:

{{number_address}}
{{depend number_address}}{{var number_address}}{{/depend}}
{{if number_address}}{{var number_address}},  {{/if}}


texts: Magento - SQL Query - How to pull order numbers for orders that use coupon code?

texts:
Reason for this need: We have retail sales agents that use $0 coupon codes to track their sales (this just applies the coupon as a tag to the order with no actual discount) submitted threw our site in cases that the store is out of stock and they still get their commission for the sale when submitting the order through our magento store.

Here is the query I found and am using to pull orders that use a coupon:

SELECT coupon_rule_name                         AS 'Promotion Used'
     , coupon_code                              AS 'Code Used'
     , COUNT(coupon_code)                       AS 'Times Used / Number of Orders'
     , SUM(subtotal)                            AS 'Cumulative Price'

     , SUM(total_paid)                          AS 'Cumulative Paid with Coupon'
     , AVG(total_paid)                          AS 'Average Order Total (W/  Coupon)'
     , AVG(subtotal)                            AS 'Average Order Total (W/O Coupon)'

 , ABS(SUM(discount_amount))                AS 'Cumulative Savings'

 , (
    SUM(discount_amount) - SUM(total_paid)
   )                                        AS 'Cumulative Loss'

 , CONCAT(ROUND((
    COUNT(coupon_code) / (SELECT COUNT(*) FROM sales_flat_order s)
   ) * 100, 1), '%')                        AS 'Percentage'

FROM     sales_flat_order
WHERE    coupon_code        IS NOT NULL
GROUP BY coupon_code
ORDER BY COUNT(coupon_code) DESC

Pulls different totals and averages but I also need the Order Numbers associated with each order.

Appreciate any help!


texts: Magento 2: Install module from multiple repositories

texts:
Today I've stumbled into a fairly intriguing issue.
At the moment I'm building a module for a client and possibly I'll use it for future clients.
Now, I would like to keep the core code in a repository and the data that will change based on clients in a different one (e.g. client specific repository).

So, to summarise:

- module-one <- All the core data for the module will be stored here
  - etc/
  - Model/
  - Setup/
  - composer.json
  - registration.php
 - module-one-to-inject <- Just the folder that has to be appended within module-one
  - folder-to-inject/

RESULT:

- module-one
  - etc/
  - Model/
  - Setup/
  - folder-to-inject/
  - composer.json
  - registration.php

We use satis to manage all the repositories, so the idea would be to call the core files from the generic repository and then it would require automatically the other one client-specific that will populate the "clientspecific" folder.

Trying my best to explain this, but i don't know if is actually clear..
Do any of you have experience with this? Never tried and my head is starting to hurt a bit!

Thanks for any help that'll come my way!


texts: Magento2: create pdf file option in product details page

texts:
I need an option to select the chose upload file (pdf) from admin site and that file will visible and have a download option for users On the product details page on frontend.  below is sample images.

I followed the several tutorials but did not get exactly  what I need.
please guide.


texts:
I am trying to change the Magento 2.1.0 theme folder name to my companyname. But I cannot find any help online.

Please help.


texts: Download depended package after installing module

texts:
I am developing QrCode Extension in Magento2 which is depended [bacon-qr-code] library so I need to download [bacon-qr-code] library using composer.In Magento2 in root composer.json if I add the

  "require": {
    "magento/module-offline-shipping-sample-data": "100.1.*",
    "bacon/bacon-qr-code": "1.0.1.*"
},

Then it download in vendor folder and I am able to use but what if I provide my Extension to anyone, will he add this line to its main root
composer.json file ?? Or download the package manually I am little confuse
please suggest me.I followed this link but did not get clear suggestion.
1:- Magento2: How to include third pary module through composer.json in custom module

:-My Module composer.json file

    {
    "name": "Ktpl/Relatedprod",
    "description": "N/A",
    "require": {
        "php": "~5.6.0|7.0.2|~7.0.6",
        "magento/magento-composer-installer": "*",
         "bacon/bacon-qr-code": "1.0.1.*"
    },
    "type": "magento2-module",
    "version": "2.0.0",
    "license": ["GPL-3.0"],
    "autoload": {
        "files": ["registration.php"],
        "psr-4": {
            "Ktpl\\Relatedprod\\": ""
        }
    }
}


texts: Magento 2 : How to Process Order Returns to Store Credit Manually?

texts:
How to process order returns to Store Credit
using ?

order_number
product_sku
return_qty

Any thoughts how this can be achieved ?
Any thoughts appreciated.


texts: How can I include the checkout progress on the Paypal express review page?

texts:
Okay I've broken this down into steps and you can see where I am stuck:

Step 1 - change column number

The PayPal express review page (our page that PayPal sends the buyer back to in order to review and finally submit their order) is a one column page. Of course we can change the number of columns by overriding the layout in a custom module xml file:

<paypal_express_review>
   <!-- maybe other references here -->
   <reference name="root">
      <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
   </reference>
   <!-- maybe other references here -->
</paypal_express_review>

Step 2 - remove code restricting right-hand column content

Now the right hand column will be present but will be blank - this is because of the following line in app/design/frontend/base/default/layout/paypal.xml - which we remove:

<remove name="right"/>

Step 3 - add content in xml file

Clearing the cache and refreshing the page will show the default right-hand column content. So if from there we add the following lines (borrowed from app/design/frontend/base/default/layout/checkout.xml) into the custom module xml file we once again come up with a blank.

<reference name="right">
    <action method="unsetChildren"></action>
    <block type="page/html_wrapper" name="checkout.progress.wrapper" translate="label">
        <label>Checkout Progress Wrapper</label>
        <action method="setElementId"><value>checkout-progress-wrapper</value></action>
        <block type="checkout/onepage_progress" name="checkout.progress" before="-" template="checkout/onepage/progress.phtml"/>
    </block>
</reference>

I know that this is the right method to get the content in that column as I can do it with a custom template, e.g.

<reference name="right">
    <action method="unsetChildren"></action>
    <block type="page/html" name="custom" template="custom_module/custom.phtml" />
</reference>

Little unsure about the block type there. Also I am aware that there is the following block in app/design/frontend/base/default/layout/checkout.xml that isn't being used:

<block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress.phtml">
    <block type="checkout/onepage_payment_info" name="payment_info">
        <action method="setInfoTemplate"><method></method><template></template></action>
    </block>
</block>

As you can see my knowledge on this is pretty restricted - due more to a lack of documentation than desire (this site was interesting though).

I must stress that this is by no means unachievable so if anyone has suggestions or alas the sought after solution or any insight at all your post is worthy and most welcome. Many thanks


texts: magento bot blocked my mailware due to guruincsite infection

texts:
my magento website got blocked by major browser and antivirus saying infected with mailware "guruincsite infection",

1: i deleted cached
2: deleted unwanted user
3: searched database by using keywaord of mailware code and removed it

still in footer i see some malicous code,
how can i remove it

will i have to search in whole code

1: is there any tool in window to fix this issues as i am using shared hosting
2: measure to fix issue not occurs in future


texts:
i am making a helper file. But i get a Fatal Error at the beginning:

PHP Fatal error:  Call to a member function getId() on a non-object in /pathtohelper/Helper/Data.php on line 2

My code:

    public  function getAvailableAttributesHelper($_product) {
$_product   = Mage::getModel('catalog/product')->load($product_id);

    if ($_product->getTypeId()=='configurable')
    {

    //Get Attributes
    $attributes = $_product->getTypeInstance(true)->getConfigurableAttributes($_product);
    if (count($attributes))
    {
        $html .= '
';
        foreach($attributes as $att)
        { $pAtt=$_product->getProductAttribute();
         //get the child products
             $allProducts = $_product->getTypeInstance(true)->getUsedProducts(null, $_product);
                $frontValues =array();
    $html .= '
';
   $pAtt->getFrontendLabel();
$html .= '
';
    foreach($allProducts as $p){
    //check stock, status, ...
    //do not show unsaleable options
    if(!$p->isSaleable()) continue;
    $out=$p->getAttributeText($pAtt->getName());
    $frontValues[$out]=$out;
    }
    $html .= '
';
     implode('

', $frontValues);
     $html .= '

';}
        }
        $html .= '
';
      }
}

I have Magento 1.8.1 CE.

I also tried to replace line 2 en 3 with:

$_product=Mage::getModel('catalog/product')->load($_product->getId());

But with the same result.

The helper is from a custom theme.
Which is being used in

  app\design\frontend\customtheme\default\template\catalog\product\list.phtml

What am i doing wrong?


texts: Company name in Billing and Shipping Columns On Sales Order Grid

texts:
I need to know how to insert company name for Billing and Shipping Columns on sales order Grid in Magento admin, also Company name need to display on both billing/shipping columns under Sales shipment Grid.

Please see the attached image below.


texts: Redirect to CMS page url If anything after the url

texts:
I have a URL of CMS page like https://example.com/test-page. Now I want to redirect every request to the same URL If anything written after that URL. For Example:
If https://example.com/test-page/list/2 then redirect to https://example.com/test-page
If https://example.com/test-page/produyuct/47/main to https://example.com/test-page
So basically anything after https://example.com/test-page should redirect to https://example.com/test-page itself.


texts: How to hide custom product attribute from admin product detail page

texts:
I created a custom product attribute which been used for a long time. Now the business need is, not to use it. I don't want to remove/delete it because I believe it will create a data integrity issue. So I created UpgradeData.php in My/Catalog/Setup directory.

I tried.

$eavSetup->updateAttribute(Product::ENTITY, $attrCode, 'visible', '0');
$eavSetup->updateAttribute(Product::ENTITY, $attrCode, 'is_visible_on_front', '0');

etc... And I didn't have any luck.

Any advice will be highly appreciated.

Thanks!


texts:
I have been working on a Magento 2 site build and have the sample data-installed, which has been useful for layout and theme updates that I needed to make.

I would like to know if there is clean-up script/method available for removing Magento 2 sample data now that it has served its purpose.

Any help/guidance would be greatly appreciated!


texts: How to raise donations in magento 2.3.3 and control amount from admin

texts:
Here I want to implement a functionality to raise donations for particular time period.

I want this functionality on a CMS page whenever the user clicks on a particular amount it should get for checkout and should be donated.
If the user entered a custom amount that amount should also go for checkout.
Admin should have provision to change these 3 amounts and also have provision to enable disable amount and custom value.
Anyone have any idea how to achieve this
Small help will be greatly appreciated.
Thanks in Advance.


texts: Cron Jobs are scheduled but not running; new order Emails not executing, all data export is stucking

texts:
I am new to magento. I have little knowledge in unix also.

New order emails are not going, notify via email is not working but rest are for shipping, cancellation order are working.

Exporting all products data profile is not working; it was stuck on screen displaying "do not close the window"..

I have checked backpanel settings for cron jobs, it was:

Generate Schedules Every - 15
Schedule Ahead for - 45
Missed if Not Run Within - 45
History Cleanup Every - 10
Success History Lifetime - 60
Failure History Lifetime - 600

also I have checked Cpanel for cron jobs it was:

*/15    *   *   *   *   wget -O /dev/null -q http://www.doorstepmarket.com/cron.php > /dev/null8,17,36,54 * * * * php /home/doorsg6t/public_html/doorstep/cron.php > /dev/null

I have no idea where is the issue, need help.


texts: Is it possible to only show the layered navigation on specific category pages?

texts: I would like to the layered navigation to only show up on specific category pages. Is this possible without a custom extension?


texts: How to get Magento 2 product image on custom phtml by product id Without loading product collection

texts:
I need product image on custom phtml in magento 2.

Product is collection is a array not object.

I just want to product product_base_image , without loading product collection.

I tried

<?php

namespace Dev\Core\Helper;

use Magento\Catalog\Helper\Image;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Framework\App\Helper\Context;

class Cart extends \Magento\Framework\Url\Helper\Data {

    public function __construct(
    Context $context, StoreManagerInterface $storeManger, ProductRepositoryInterface $productRepository, FormKey $formKey, Image $imageHelper
    ) {

        $this->imageHelper = $imageHelper;
        $this->productRepository = $productRepository;

        parent::__construct($context);
    }

    public function getItemImage($productId) {
        try {
            $_product = $this->productRepository->getById($productId);
        } catch (NoSuchEntityException $e) {
            return 'product not found';
        }
        $image_url = $this->imageHelper->init($_product, 'product_base_image')->getUrl();
        return $image_url;
    }

}

I m getting image with no issue.
But i want to load image by product id without loading collection.


texts:
I tried to install Magento 2.2.6 in my local server everything is fine actually i reach last stage(Step 6: Install) of installation but there i am facing issue like failed to open stream: Permission denied.

Any help would be appreciated.

Thanks!


texts: Missing mapping in di.xml after upgrading 2.4.0 to 2.4.1

texts:
The app breaks completely after upgrading a working 2.4.0 to 2.4.1 using instructions from https://devdocs.magento.com/guides/v2.4/comp-mgr/cli/cli-upgrade.html.
Steps:
composer require magento/product-community-edition 2.4.1 --no-update
composer update
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf generated/code/*
bin/magento setup:upgrade

setup:upgrade errors out with the following message, and the entire M2 instance (web and CLI) is broken.

Fatal error: Uncaught Error: Cannot instantiate interface Magento\MediaContentSynchronizationApi\Model\GetEntitiesInterface in /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50

Upon inspecting app/etc/di.xml, I see no mapping for Magento\MediaContentSynchronizationApi\Model\GetEntitiesInterface.
It seems to me the composer require and update does not update di.xml correctly, but I'm not sure. Any idea how to upgrade to 2.4.1?


texts: Magento2: Issues after switch to production mode

texts:
We have issues after switch to production mode:
no work any style css: Gerris.pl


texts: How can I truncate the tax class tables and not break my install?

texts:
I'm having trouble editing and adding the Tax Classes in our current installation.

When I looked the classes up in the database I saw that a new entry gets a primary key of '0' and this is causing issues. I'm not sure what the issue is aside from not updating with the correct values after an edit or displaying 'An error occurred while saving this tax class.' when trying to add a new Tax Class as the logs aren't showing anything. But from previous experience I'm almost certain its because of an Integrity constraint violation.

Previously when migrating our database I fixed the Integrity constraint violation issue for other tables by truncating them but I know that these tax tables have foreign key relations with some of the product tables so I want to proceed carefully.

How can I safely truncate these tables? I am working on a development environment so I have room to experiment. Also all the current products only use 1 tax class so I can re-add it later.


texts: Magento Testing SOAP API's using EcomDev_PHPUnit

texts:
We just started working on a Magento project where there is a need for some complicated changes to the Magento SOAP API.

Since we never properly worked with unit tests, this looked like a good case to use unit testing for once. Since these API calls need to be really good tested and very stable.

Now, I heard a lot of great things about the EcomDev_PHPUnit extension so after reading a lots of material about it, I installed it and tried to get it working.

But now we run into trouble when performing a SOAP call during those tests. It looks like when you perform a SOAP call using the test base_url, defined in the local.xml.phpunit file, Magento redirects us to the normal base_url. So I'm guessing when the SOAP call comes in, it is probably using the normal database and not the test database. Which makes sense, since this is a new process which bootstraps Magento again through the webserver, so Magento isn't aware it should be running in a test context.

Has anyone got experience with testing SOAP calls using the EcomDev_PHPUnit extension? Or does anyone have an idea how to make this work?
It would be very handy for us, since we can use all the great features of this extension, especially the fixtures and the test database.

Thanks!


texts: How to change the constructor parameter in magento2?

texts:
public function __construct(
        \Magento\Framework\Data\Collection\EntityFactoryInterface $entity,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
        \Magento\Framework\Event\ManagerInterface $event,
        \Magento\Store\Model\StoreManagerInterface $store,
        \Magento\Customer\Model\Session $customerSession,
        $mainTable,
        $eventPrefix,
        $eventObject,
        $resourceModel,
        $model = \Magento\Framework\View\Element\UiComponent\DataProvider\Document::class,
        $connection = null,
        \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
    ) {
        parent::__construct($entity, $logger, $fetchStrategy, $event, $store, $connection, $resource);
        $this->_eventPrefix = $eventPrefix;
        $this->_eventObject = $eventObject;
        $this->_init($model, $resourceModel);
        $this->setMainTable($mainTable);
        $this->_customerSession = $customerSession;
    }

I want to change the parameter of the constructor. This module is installed by the composer and while compiling the code I am getting the issue
Incompatible argument type: Required type: \Magento\Framework\DB\Adapter\AdapterInterface. Actual type: \Magento\Framework\Model\ResourceModel\Db\AbstractDb; File:
So I am adding another module in the app/code/ directory and passing these argument to solve the issue
public function __construct(
        \Magento\Framework\Data\Collection\EntityFactoryInterface $entity,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
        \Magento\Framework\Event\ManagerInterface $event,
        \Magento\Store\Model\StoreManagerInterface $store,
        \Magento\Customer\Model\Session $customerSession,
        $mainTable,
        $eventPrefix,
        $eventObject,
        $resourceModel,
        $model = \Magento\Framework\View\Element\UiComponent\DataProvider\Document::class,
        \Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
        \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
    ) {
        parent::__construct($entity, $logger, $fetchStrategy, $event, $store, $connection, $resource);
        $this->_eventPrefix = $eventPrefix;
        $this->_eventObject = $eventObject;
        $this->_init($model, $resourceModel);
        $this->setMainTable($mainTable);
        $this->_customerSession = $customerSession;
    }

I am using preference to override the same file. Actually When I am passing the dependency in the core module then it is working fine but I don't want to make any changes in this module.
then How can I replace these arguments using a custom module.


texts:
I created a custom API REST :

  https://domain/rest/V1/action

This is a POST request, with JSON in the body.

Example :

{
  "my_test_here": [
    {
      "first_field": "value1",
      "second_field": "value2",
      "and_so_on": "value3"
    }
  ]
}

In my code, I try to get the JSON information but all my attempts are empty :

  $this->request1->getParams(); // with @var \Magento\Framework\App\Request\Http $request1
   $this->request2->getParams(); // with @var \Magento\Framework\Webapi\Rest\Request $request2

I try with getPost() also, but still empty...

Do you have any idea how to do ?


texts:
i am using the following code

<?php echo $sku = Mage::getModel('catalog/product')->load($products->getId())->getSku();?>

to display the sku ,

in the same way i want to display the quantity also.

as quantity is not an attribute , i can not able to get how to display the quantity.

please help me to find solution


texts: how to restrict an EAV attribute for some roles

texts:
i have make and EAV attribute and this custom attribute was displayed for all the users, but i want it to be displayed just for some roles like 'admin' and 'role1' not for all

can anyone tell me how to do it please, here is my code :

public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();

        $config = [
            'label' => 'Zendesk User Id',
            'type' => 'varchar',
            'input' => 'text',
            'visible' => true,
            'required' => false,
            'position' => 150,
            'sort_order' => 150,
            'system' => false
        ];

        /** CUSTOMER ATTRIBUTE */
        $this->eavSetup->addAttribute(
            CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER,
            self::ZD_USER_ID,
            $config
        );
        $customerAttribute = $this->eavConfig->getAttribute(
            CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER,
            self::ZD_USER_ID
        );
        $customerAttribute->setData(
            'used_in_forms',
            ['adminhtml_customer']
        )->save();

        $setup->endSetup();
    }


texts: Configurable product how do I use different barcode with each variation?

texts:
I am a bit confused about the use of a barcode within our Magento implements. Hopefully someone can kindly point me to the right direction.

Currently, in our shop we are using unique barcode for each product even for each variation. Not sure if this is a wrong way to manage stock, feel free to advise.
We are using the SKU field for the unique barcode field. Or shall we use a custom field for that?
Now, we were told in Magento we can use configurable product to have variations. So, we went ahead and created that with some associated products. But for each associated product there might be more than one quantity for each variation. For example, for x product of red colour and small size we have 3 copies. Magento only allows for one SKU/barcode to be assigned for 1 such copy. But you can't add 3 different SKU/barcode for those 3 copies.  How would you then assign unique barcode to those copies?

See screenshot:

(see there is only one field for SKU, but we have 3 quantities for the same variation. Are we meant to use the same SKU/barcode for those 3 copies?


texts: Layout gets loaded but template is not rendered

texts:
I'm trying to add a custom block for my module into the head block. I would like this block to be added on every page. Now, my problem is that the block is not rendered at all except if I add the following into one of the files under the design/frontend/<theme>/default/layout/ folder:

<block type="page/html_head" name="head" as="head">
  <block type="core/template" name="my_custom_block" template="my_custom_block/custom_block.phtml"></block>
</block>

The layout file for my custom module is located under design/frontend/base/default/layout/my_custom_block.xml and looks like this:

<?xml version="1.0"?>
  <layout version="0.1.0">
    <default>
      <reference name="head">
        <block type="core/template" name="my_custom_block" template="my_custom_block/custom_block.phtml"></block>
     </reference>
    </default>
  </layout>

I can verify that this file gets loaded by adding a <remove name="root" /> to the layout definition, which in turn will trigger an error when trying to load the page.

Of course I could simply add the block directly into one of the themes templates, but it would be much cleaner if the block is visible just by installing and enabling the module.

Note that I have added the following dependency in app/etc/modules/My_Custom_Block.xml file:

<?xml version="1.0"?>
<config>
  <modules>
    <My_Custom_Block>
        <active>true</active>
        <codePool>community</codePool>
        <depends>
            <Mage_Page/>
        </depends>
    </My_Custom_Block>
  </modules>
</config>


texts: Periodically getting locked out of back-end (admin panel)

texts:
Recently I've been having recurring issues login into the admin panel. It seems that if I do not login for 24 hours, the next time I go to login my credentials are not accepted.

I know that I am typing in my username and password correctly.

In order for me to successfully login it is necessary for me to clear the following:

*/var/session/*, */var/cache/* and */var/locks/*

What are the possible reasons for this to occur?

How can this be prevented and rectified without having to clear everything?

UPDATE
I changed the Cookie Lifetime value from 24 hours to 12 hours with the same result.
Multiple web-browsers will not work from multiple computers in different locations. In order to login I need to clear the session directory.

Notes: Magento 1.8.0


texts: Error "Cannot read property 'indexedOptions' " when removing Company field (Remove checkout field)

texts:
I need to remove Company field from checkout page. I am trying to follow this tutorials "Remove a component". But I am getting next Error:

Uncaught TypeError: Cannot read property 'indexedOptions' of undefined(…) region.js:59

My Plugins file is:

public function aroundProcess(\Magento\Checkout\Block\Checkout\LayoutProcessor $subject, \Closure $proceed, $jsLayout) {
    unset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
            ['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['company']);
    return $jsLayout;
}

Can anyone explain me please what i am doing wrong?


texts:
I'm starting to see more and more people declaring helpers classes in order to be able to use the following in the template files:

$this->helper('Path/To/Helper/Class')->customMethod();

This kind of code lets people avoid the do not use the object manager directly restriction but I tend to see code that should be block code in those helpers.

So here are my questions:

what should one write in the helper classes ?
in which cases is it relevant to use helper methods in the templates?


texts:
I am trying to work with produce prices using 4 decimal places e.g. 0.0475

I have already got the prices to save and display in catalog admin by editing the following file...

vendor/magento/zendframework1/library/Zend/Currency.php (line 74) - I understand not to edit core files as a rule of thumb

Which file(s) do I edit to get prices on front end and cart to use these prices?

So my issue for example is if I order a quantity of 500 for 0.0475 the total should be 23.75, however it is displaying as 25.00

My price on the actual line of the basket does read 23.75, however the ajax cart thing on the right where it calculates Tax/Vat, reads 25.00

I have read I might need to edit these two files but I am not sure which bits...

vendor/magento/module-catalog/view/base/web/js/price-utils.js

vendor/magento/framework/Pricing/PriceCurrencyInterface.php

Thanks


texts: I am using an external PHP file to make a page, how do I load a Magento 2 theme to my external PHP code so that my PHP has the same theme layout as my normal Magento 2 layout page, what I am trying to add is the header and footer to my PHP file.


texts: Magento 2 : How to show only collection filterd data based on any condition?

texts:
Created grid in Magento 2 admin using UI component and want to filter the grid records before grid load based on any condition.
How can i achieve this?


texts: Magento 2 Cart Breaking When Copying minicart.phtml into Template

texts: I want to make some style changes to the mini cart in Magento 2. Mainly move it up with my search bar and change the background color. I have tried using the exact code from the minicart.phtml in the blank template in my template. When I modify the minicart.phtml I am able to style and move it, but my cart no long shows when items have been added and displays blank text when it is clicked. Is there another way I should go about moving / styling my mini cart?


texts: JQuery gets loaded after script sometimes

texts:
I implemented owlcarousel like this

<script>
    require([
        "jquery",
        "Vendor_Module/js/owl.carousel.min"
    ],function($){
        $('#slider').ready(function() {

            var owl = $('#slider');

            owl.owlCarousel({
                dots: true,
                nav: true>,
                //further config ...
            });

        });
    });
</script>

But half the time everything works properly and the other half it seem that my owlslider gets loaded after my jQuery and I get:

  TypeError: $ is undefined

How is that possible?


texts: Is it possible to use superscript in a category title?

texts:
I have a couple of items that I want to refer to as trademarked in category titles. I attempted to use:

For Double Jtm and Jlitetm Headlight Brackets

But the  and  show up and do not work as html like I hoped they would.

The question: Is there a way to format superscript in category titles so that they show up as superscript when viewed in the product navigation on the public site?


texts: Magento 2: How to install modules that are not on the marketplace without breaking the setup interface?

texts:
I have this issue when I go to the "Web Setup Wizard" & try to install extensions that I just bought from the marketplace & it gets stuck because there are some modules that have been installed using composer require....

The only way for me to pass this (for now) is to remove them from the composer.json, run composer update, Install the extensions using the "Web Setup Wizard" & then add back the modules I removed.

Is there any "right"/"better" way to do that?


texts: $block->getChildBlock("")->setData('') not working in loop

texts:
I have used

$block->getChildBlock("")->setData("");
echo $block->getChildHtml('productlist', false);

in my phtml file in a for each loop but it only initializa once in a loop and remaining same in whole loop execution. how to setData differently with each loop call?
Thank you.


texts: $product->save() taking 4 seconds to save one simple product in magento 2.1.3

texts:
I have below code with Image Upload which is working fine...but it takes 4 seconds to save one simple product....my store have more than 25000 products. It takes more than 4/5 hrs to create/update the products...
please help...

use Magento\Framework\App\Bootstrap;
include('app/bootstrap.php');
$bootstrap = Bootstrap::create(BP, $_SERVER);

$objectManager = $bootstrap->getObjectManager();

$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

$_product = $objectManager->create('Magento\Catalog\Model\Product');
$_product->setName('Test Product');
$_product->setTypeId('simple');
$_product->setAttributeSetId(4);
$_product->setSku('test-SKU');
$_product->setWebsiteIds(array(1));
$_product->setVisibility(4);
$_product->setPrice(array(1));
$_product->setImage('/testimg/test.jpg');
$_product->setSmallImage('/testimg/test.jpg');
$_product->setThumbnail('/testimg/test.jpg');
$_product->setStockData(array(
        'use_config_manage_stock' => 0, //'Use config settings' checkbox
        'manage_stock' => 1, //manage stock
        'min_sale_qty' => 1, //Minimum Qty Allowed in Shopping Cart
        'max_sale_qty' => 2, //Maximum Qty Allowed in Shopping Cart
        'is_in_stock' => 1, //Stock Availability
        'qty' => 100 //qty
        )
    );

$_product->save();


texts: How to set product min quantity against website?

texts:
There are three websites available as wholesale, retail, staff. I want to set min quantity and quantity increments only for wholesale website. But when I do it through admin panel it applies to all the websites. Since because those attributes are GLOBAL.

I checked in eav_attribute table whether there is these attributes. But no luck. Where does these attributes are defined in Magento?

Is it possible to set min qty and min qty increments only for one particular website(e.g. only for wholesale) ?

Any suggestions will be appreciated.

Thanks in advance


texts: Display custom attribute in the product catalog grid

texts:
I created, with InstallData.php, a custom product attribute, with the right options so I can see it in the columns in the catalog product list.

However, is there a way to make it displayed in the grid without to have to select it in the columns list?

 $eavSetup->addAttribute(
                \Magento\Catalog\Model\Product::ENTITY,
                'special_percentage',
                [
                    'type' => 'decimal',
                    'label' => 'Discount percentage',
                    'input' => 'text',
                    'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
                    'visible' => true,
                    'required' => false,
                    'user_defined' => true,
                    'default' => 0,
                    'searchable' => false,
                    'filterable' => false,
                    'comparable' => false,
                    'visible_on_front' => false,
                    'used_in_product_listing' => true,
                    'is_used_in_grid' => true,
                    'is_filterable_in_grid' => true,
                    'unique' => false,
                    'apply_to' => '',
                    'group' => 'General',
                    'system' => true,
                    'show_in_grid' => true
                ]
            );


texts: How to pass query string in customer.xml?

texts:
I want to add Query string on customer/account/login/ page from the customer.xml
Below are the code:

<action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>

I want my URL like:

customer/account/login?tab=register

Is there possibility to update URL from the customer.xml?


texts: Importing products in CSV - URL Key already in use

texts:
this seems to be a common problem and a flaw in vthe magento 2 CSV system, i want to export my catalogue update the pricing across all products and then re-upload it - however it requires a URL key change? is there any way to get around this?

thank you,

Chris


texts:
I'm getting this error in two areas - one on the frontend here...

http://82.147.12.196/~securato/besafe-izi-up-x3-fix

Click the 'first to review this product' link on the above page and you will see of them.

The other occurs in the admin when accessing Review>Manage Ratings.  This error reads...

  Fatal error: Call to a member function getIdByCode() on boolean in /home/securato/public_html/app/code/core/Mage/Adminhtml/controllers/RatingController.php on line 154

Any help will be much appreciated.


texts: Image not showing on Product Page. Fotorama issue on Magento 2.3x

texts:
The theme dev on this, Land of Coder, has gone ghost again on support of this after they said they were in there fixing it, so I'm hoping someone here can help.
Straightforward issue. Visit http://m2.vulcansrest.com/socknado-naked-orchid.html and you'll see the arrows in the place of the product image. The image in present for this product and marked base, thumb, and swatch. There is an error in inspector of:
Uncaught TypeError: settings.$elementF.fotorama is not a function
at UiClass.initGallery (gallery.js:297)
at UiClass.initialize (gallery.js:139)
at UiClass.initialize (wrapper.js:109)
at UiClass (class.js:49)
at main.js:31
at Object.execCb (require.js:1650)
at Object.context.execCb (resolver.js:145)
at Module.check (require.js:866)
at Module. (require.js:1113)
at require.js:132
They asked me first to replace jquery.zoom.min.js  with a new version then run:
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
I did this on both the theme and the child theme, which I am running.
They then asked me to replace gallery.phtml with a new version they provided, then clear cache. I did this on both theme and child. Still same issue.
I then tried:

I removed the code at line 297 referencing fotorama in lib/web/mage/gallery/gallery.js This is    the file I am 99% sure is the functioning gallery.js.
The other gallery.js that had the same fotorama code at line 297 was located at   vendor/magento/magento2-base/lib/web/mage/gallery/gallery.js.
When I made the changes in this file and ran the appropriate commands, it changed nothing, and that's why I am fairly certain the lib/web/mage/gallery/gallery.js
is the file in control here.

2  When made the change at 297, it then gave me this error in Console at line 490:
gallery.js:460 Uncaught TypeError: Cannot read property 'setOptions' of null
at Object.updateOptions (gallery.js:460)     at Object.exit (gallery.js:355)
at mqChange (matchMedia.js:133)     at window.mediaCheck (matchMedia.js:143)
at gallery.js:322     at Function.m.each.m.forEach (underscore.js:153)
at UiClass.setupBreakpoints (gallery.js:321)
at UiClass.initialize (gallery.js:141)
at UiClass.initialize (wrapper.js:109)
at UiClass (class.js:49)
I went down this rabbit hole and it kept throwing critical errors associated with fotorama, and I'm stuck. I tried removing the next lines it stated were the issues, but it just led to more issues.
Can you please give me the real fix for this problem?
Any clue on how to fix this?
Thanks in advance!


texts: Magento 2.2.2 bootstrap.min.js:7 Uncaught TypeError: f[b] is not a function

texts:
I am Using Magento 2.2.2.
I have inserted this code in the Block i.e Content>Block
when wei click on the Ask an Expert image , The Modal popup should appear. But currently its not showing popup, the error is show.

Mon-Sat (10 AM to 6 PM)

Get Free Consultation From Our Certified Expert

0120-4673988


texts: Magento 2.3 : EE - Segments for visitor only return empty

texts:
In Magento 2.3 EE, we have few segments which is applicable for both visitors and registered customers also but it is not returning segment id for guest user i.e., visitors

  NOTE : It was working well and fine in M2.1x

See the below code to get more info about it

Magento\CustomerSegment\Model\Customer $customerSegment,

in execute()

$this->customerSegment->getCurrentCustomerSegmentIds();

Any help would be appreciated.

Thanks


texts: Translate "custom option" for multistore

texts:
I have a website and for a product like "shirts" there is a way to get a discount. (This is implemented by a custom option). I'm importing all the products and the options programmatically. But now in the other languages it has to be changed. Because it is the same sentence it would be nice if it could be translated whitin a .csv file. But how do I change te code?
In the picture the custom option "Discount brest logo". But In German I want there the text "Rabatt.."

I saw in the browser there is a reference to class="label admin__field-label.

I found out that in "magento/module-catalog/Block/Product/View/Options/Type/Select.php" this piece of code is creating the text of the custom option:
$this->pricingHelper->currencyByStore($_value->getPrice(true), $store, false) .
                '" />' .
                'getId() .
                '_' .
                $count .
                '">' .
                $_value->getTitle() .
                ' ' .
                $priceStr .
                '';

So two questions:

Is this the right place for translate ""Discount brest logo"??
But how do I translate "$_value->getTitle() ." correctly so I can use te .csv file?


texts: Magneto 2: Need to remove decimal from price on product detail page

texts: I want to remove the decimal in price on product details page. Although it removes in listing page, but still showing decimal in discount and final price on product details page.


texts: How to upload the magento extension manualy without magento connect

texts: I have a magento extension .zip file. I need to install the extension manually without magento connect.


texts: create custom product image attribute in magento 2

texts:
I have to add the custom image attribute in product attribute.
I referred this link: create product image attribute in magento2. but image saved in my temp directory after saving the image how can we show it in edit page and also the delete option. Any help would be appreciated.


texts:
I created an customer account using /V1/customers but it does not send the new account  email.

Is there any API to do so?


texts:
<event name="sales_order_invoice_save_commit_after">
    <observer name="abc_syncInvoice"
       instance="abc\def\Observer\Invoice\Create"/>
 </event>

I have created this event,

For this event when I place an order with the existing customer but not work without login guest customer why this happened any idea.

public function execute(Observer $observer)
{
    if ($this->isConnected() && $this->isConnected() == 1) {
        try {
            /** @var \Magento\Sales\Model\Order\Invoice $invoice */
            $invoice = $observer->getEvent()->getInvoice();
            $note = $invoice->getCustomerNote();
            if ($note != 'quickbook') {
                $incrementId = $invoice->getIncrementId();
                if ($incrementId && $this->isEnabled()) {
                    if ($this->isImmediatelyMode()) {
                        $qboId = $this->_invoice->sync($incrementId);
                        if($qboId)
                            $this->messageManager->addSuccessMessage(__('Successfully updated this Invoice(Id: %1) in QuickBooksOnline.', $qboId));
                    } else {
                        $this->addToQueue($incrementId);
                    }
                }
            }
        } catch (\Exception $e) {
            $this->messageManager->addErrorMessage($e->getMessage());
        }
    }
}


texts: magento 2 custom product attribute won't save

texts:
I am writing a Magento 2 module - am trying to get it to add a custom attribute to every product. My Setup>InstallData.php file is successfully adding the attribute to the eav_attribute table when installing the module, and the adminhtml is rendering the field as having name=product[my_attribute], which I think means that it "accepts" the field as being a valid part of the model. However, when attempting to save the product with a value in the custom attribute, nothing is saved in the database.

here is my code:

<?php

// module namespace is 'Duel', module name is 'Gallery'
namespace Duel\Gallery\Setup;

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

class InstallData implements InstallDataInterface
{

public function __construct(EavSetupFactory $eavSetupFactory)
{
    $this->_eavSetupFactory = $eavSetupFactory;
}

public function install(ModuleDataSetupInterface $setup,
ModuleContextInterface $context)
{
/** @var EavSetup $eavSetup */

$eavSetup = $this->_eavSetupFactory->create(['setup' => $setup]);

/**
* Add attributes to the eav/attribute
*/

$eavSetup->addAttribute(
    \Magento\Catalog\Model\Product::ENTITY,
    'my_attribute',
    [
        'type' => 'text',
        'backend' => '',
        'label' => 'My New Attribute',
        'input' => 'text',
        'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
        'visible' => true,
        'user_defined' => true,
        'required' => false,
        'visible_on_front' => true
    ]
);
}
}

and here is the html in view>adminhtml>ui_component>product_form.xml

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="attributes">
<argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
        <item name="label" xsi:type="string" translate="true">MY CUSTOM ATTRIBUTE</item>
        <item name="collapsible" xsi:type="boolean">true</item>
        <item name="sortOrder" xsi:type="number">200</item>
    </item>
</argument>
<field name="my_attribute">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">My new attribute</item>
            <item name="formElement" xsi:type="string">textarea</item>
        </item>
    </argument>
</field>

I briefly had it saving after manually changing a couple of fields of 'my_attribute' in the eav_attribute table, however I committed the code but stupidly didn't save the exact mysql database state and now can't get it to work again (upon testing that it creates a working form every time the module is installed).


texts:
We are running a magento installatino with two websites. I have configured a .htaccess redirect with GeoIP in order to redirect visitors from one country to website number two.

This works, however the backend url gets also redirected which would not be a problem, but it makes the backend behave "strange" like searches and saving don't work anymore.

Here is what I put into the .htaccess file:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^website\.co.th$ [NC]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^TH$
RewriteRule ^(.*)$ http://website.co.th/$1 [L]

What would I have to add in order to exempt the backend from the redirect rule?


texts: SQL error on changing the page number to large number

texts:
I have a strange problem. Whenever I change the page number to some none existing page number then the system throws sql error.

For example http://domain.com/category.html?p=1 works as expected but when I change it to http://domain.com/category.html?p=100 then it throws below error. In that category only 1-5 pages available.

  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 ') ASC' at line
  4, query was: SELECT e.*, price_index.price,
  price_index.tax_class_id, price_index.final_price,
  IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price,
  price_index.tier_price), price_index.min_price) AS minimal_price,
  price_index.min_price, price_index.max_price,
  price_index.tier_price, IFNULL(review_summary.reviews_count, 0) AS
  reviews_count, IFNULL(review_summary.rating_summary, 0) AS
  rating_summary, stock_status_index.stock_status AS is_salable
  FROM catalog_product_entity AS e  INNER JOIN
  catalog_product_index_price AS price_index ON
  price_index.entity_id = e.entity_id AND price_index.website_id = '1'
  AND price_index.customer_group_id = 0  LEFT JOIN
  review_entity_summary AS review_summary ON e.entity_id =
  review_summary.entity_pk_value AND review_summary.store_id = 1 AND
  review_summary.entity_type = (SELECT review_entity.entity_id FROM
  review_entity WHERE (entity_code = 'product'))  INNER JOIN
  cataloginventory_stock_status AS stock_status_index ON e.entity_id
  = stock_status_index.product_id WHERE ((stock_status_index.stock_status = 1) AND (e.entity_id IN (NULL)))
  AND (e.created_in <= 1) AND (e.updated_in > 1) ORDER BY
  FIELD(e.entity_id,) ASC

As you can see some SQL is missing after FIELD(e.entity_id,. This is how it should be:

  SELECT e.*, price_index.price, price_index.tax_class_id,
  price_index.final_price, IF(price_index.tier_price IS NOT NULL,
  LEAST(price_index.min_price, price_index.tier_price),
  price_index.min_price) AS minimal_price, price_index.min_price,
  price_index.max_price, price_index.tier_price,
  IFNULL(review_summary.reviews_count, 0) AS reviews_count,
  IFNULL(review_summary.rating_summary, 0) AS rating_summary,
  stock_status_index.stock_status AS is_salable FROM
  catalog_product_entity AS e  INNER JOIN
  catalog_product_index_price AS price_index ON
  price_index.entity_id = e.entity_id AND price_index.website_id = '1'
  AND price_index.customer_group_id = 0  LEFT JOIN
  review_entity_summary AS review_summary ON e.entity_id =
  review_summary.entity_pk_value AND review_summary.store_id = 1 AND
  review_summary.entity_type = (SELECT review_entity.entity_id FROM
  review_entity WHERE (entity_code = 'product'))  INNER JOIN
  cataloginventory_stock_status AS stock_status_index ON e.entity_id
  = stock_status_index.product_id WHERE ((stock_status_index.stock_status = 1) AND (e.entity_id IN (NULL)))
  AND (e.created_in <= 1) AND (e.updated_in > 1) ORDER BY
  FIELD(e.entity_id,NULL) ASC

It looks NULL is missing.

Diff image:

Magento 2.3.3 with elasticsearch 6+

Any idea why this happening? Which section should I be checking to fix this?


texts: Magento 2.3 - How to Add New Fields on Registration page in specific in "Personal Information" section

texts:
Using Magento 2.3
How to Add New Fields on the Registration page in specific in the "Personal Information" section.

Can anyone tell me how can I do this?

Any help would be appreciated. Thanks in advance..!


texts: Hide two or more attributes over custom layout

texts:
I try to hide two attributes in custom layout, but it works for only one attribute:

<reference name="catalog.leftnav">
<action method="unsetChild"><alias>category_filter</alias></action>
</reference>

How can I add here this action:

<action method="unsetChild"><alias>manufacturer_filter</alias></action>

This way it didn't work:

<reference name="catalog.leftnav">
<action method="unsetChild"><alias>category_filter</alias></action>
<action method="unsetChild"><alias>manufacturer_filter</alias></action>
</reference>

Do you know any other solution? I need this only for one category, not generally for all.


texts: Magento 2.4 Add Recaptcha in Custom From

texts:
Magento 2.4
How to add Google Recaptcha in Custom Form ?
Please Help me .


texts: How best to add extra pricing information into price.pthml

texts:
our social enterprise sells reclaimed carpet tiles, we generally have about 3 sizes whcih are defined as an atrtribute of simple products.
We quote the per tile price becuase the catalogue is managed per tile but we would like to be able to quote a /m2 price and a /box price.
This needs me to pull the size attribute and do some calculations.
It feels like I need to include some kind of helper function that I pass a product object and which returns this display content rather than just hacking price.phtml to do it, but I have no idea how I should do this in magento.

Can anyone advise of the correct approach?

Using CE 1.8.1 and customised argento theme.


texts:
How to get configurable product page, associate product custom option. ?

Thanks.


texts: How to update success/error message using PLUGIN in Magento 2?

texts:
I have already checked this link and found it working, but in this thread, the observer is used to change the success/error message.

I want to know whether it is possible to change/update the success/error message using a plugin or not?

If it is possible, then please let me know how?

I also know how to use translation way to change messages.

I have tried many ways but could not get success.


texts: How to achieve customization for dealer functionality or extension

texts:
Im trying to look the extension or solution for a B2B solution.

Marketing executive(admin role) account  creates dealer account(customer) and manager approves(admin role)
After approval of dealer, account send mail to different parties saying the new dealer is created and approved
Marketing executive place a quote for the dealer and manager should approve
After approval sends mail to different parties


texts: Venustheme Megamenu - Cat page left-side doesn't work on mobile

texts:
I've got the Venustheme Mega Menu for Magento 2, and I've created a menu for the main menu, that works fine, on both desktop and mobile.

Now I've created another menu, for the category page, on the left-side part. The menu works fine on desktop, shows the categories and on hover also the subcategories.

The issue is on mobile, it shows the categories, but when I click on the + icon to drop down and see the subcategories, doesn't drop down, but just sends me to that category page.

I've tried all the configurations that the extension offer for mobile, and none drops down the menu.


texts: Magento 2 Layout Add to cart button displaying twice on PDP page

texts:
I am customizing product page in Magento 2.3.I have removed and moved some element by creating catalog_product_view.xml file in our theme.

Below are the element tag:

<move element="product.info.overview" destination="product.info.main" before="product.info.price"/>
        <move element="product.price.final" destination="product.info.options.wrapper" after="product.info.overview"/>
        <move element="product.info.addtocart" destination="product.info.options.wrapper"/>

But when we added these lines ,add to cart button displaying twice on product page.

Please let me know what is the issue while moving element.


texts: Custom admin path with multistore in subfolders - 404's everywhere

texts:
I'm dealing with a site that's had Multistore set up by using Configuration > Web > Url options >  Add Store Code to Urls.

Most everything works fine, except for some Modules producing 404 pages in the Administration area. For example, the MageStore Giftvoucher uses the URL giftvoucheradmin/adminhtml_giftvoucher/index. Our admin path is simple /admin so Magento is presuming that giftvoucheradmin is a store URL and therefore throws up a 404.

This also became a bigger issue when we switched from using /admin as our administration path to something more secure (eg /new_admin_path), and got 404's throughout the admin.

After a considerable amount of debugging I found that adding the following into a custom module config.xml file solved the issue;

<global>
...
<request>
        <direct_front_name>
            <new_admin_path />
        </direct_front_name>
    </request>
...
</global>

Now I could add a node into request > direct_front_name for each of the URLs used that aren't store codes, frankly though it seems like a poor solution.

Is the only other way around this to change how the stores are configured, as outlined here by Ben Marks?


texts: After Cache Storage Management enable the local host store will not shown..?

texts: After Cache Storage Management enable the local host store will not shown.. ?


texts: Display Product Review on Product Page ? - Magento1.9

texts:
I want to know if Is it possible to get product reviews, let's say last 5 to appear on the Product page itself using the default Magento without any paid extension?

Just Below Add Tags options...


texts:
After uploading backup in xampp magento gives following error.

> a:5:{i:0;s:167:"SQLSTATE[42S02]: Base table or view not found: 1146
    > Table 'blingers.index_process' doesn't exist, query was: SELECT
    > `index_process`.`indexer_code` FROM `index_process`";i:1;s:1525:"#0
    > C:\xampp\htdocs\blingers\lib\Varien\Db\Statement\Pdo\Mysql.php(110):
    > Zend_Db_Statement_Pdo->_execute(Array)
    > #1 C:\xampp\htdocs\blingers\app\code\core\Zend\Db\Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
    > #2 C:\xampp\htdocs\blingers\lib\Zend\Db\Adapter\Abstract.php(480): Zend_Db_Statement->execute(Array)
    > #3 C:\xampp\htdocs\blingers\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `index_p...', Array)
    > #4 C:\xampp\htdocs\blingers\lib\Varien\Db\Adapter\Pdo\Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `index_p...', Array)
    > #5 C:\xampp\htdocs\blingers\lib\Zend\Db\Adapter\Abstract.php(794): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
    > #6 C:\xampp\htdocs\blingers\app\code\core\Mage\Index\Model\Resource\Setup.php(66):
    > Zend_Db_Adapter_Abstract->fetchCol(Object(Varien_Db_Select))
    > #7 C:\xampp\htdocs\blingers\app\code\core\Mage\Index\Model\Resource\Setup.php(45):
    > Mage_Index_Model_Resource_Setup->_syncIndexes()
    > #8 C:\xampp\htdocs\blingers\app\code\core\Mage\Core\Model\Resource\Setup.php(235):
    > Mage_Index_Model_Resource_Setup->applyUpdates()
    > #9 C:\xampp\htdocs\blingers\app\code\core\Mage\Core\Model\App.php(428):
    > Mage_Core_Model_Resource_Setup::applyAllUpdates()
    > #10 C:\xampp\htdocs\blingers\app\code\core\Mage\Core\Model\App.php(354):
    > Mage_Core_Model_App->_initModules()
    > #11 C:\xampp\htdocs\blingers\app\Mage.php(684): Mage_Core_Model_App->run(Array)
    > #12 C:\xampp\htdocs\blingers\index.php(83): Mage::run('', 'store')
    > #13 {main}";s:3:"url";s:10:"/blingers/";s:11:"script_name";s:19:"/blingers/index.php";s:4:"skin";s:7:"default

";}


texts: 2 Magento installs (version 1.9.2.4) on same server, is it good idea?

texts:
We have 2 stores Magento installs (version 1.9.2.4) each with 24,000 customers and 4,000 products on each with over 15 extensions installed on each and approx 20,000 orders on one of them and 10 orders on the other one. My question is it ok to use one server for both sites or would it be best to have seperate server for each?

We plan on getting a 128GB DDR4 ECC 2133MHZ Intel Xeon E5-1650v3 3.5GHz/3.8GHz with 4 x 800GB SSD + Hard Raid + FastPath


texts: Integrating 3rd party Shipping API in Magento

texts:
I was working on integrating a 3rd party REST API with our Magento installation. The 3rd party is a shipping company and the API they gave requirements to collect various shipment info (i.e shipper name, shipper address, consignee name, consignee address, tracking number, etc).

Can anyone point me in the right direction to do this? like a tutorial? I think I'm supposed to to do something when I create a shipment from Magento's back-end but I am not sure. Thanks in advance.


texts: Magento 2 how to save values to multiple tables

texts: I have 2 custom table and from admin side I want to save few field values to these 2 custom table while clicking Save button. For example in adminside I have Status option and Message option. The Status option value need to be in custom table 1 and message in custom table 2. How can I do this in Magento 2. I have Save.php file in Controller/Adminhtml/Manage folder.


texts: Creating bundles with Multiple instances of the same product in them

texts:
I'm a bit on the new side to Magento (currently using version 1.9) and I'd like to offer various bundles of the products I'm offering as options on the product page.

Essentially the pricing is as follows: A "Sample Pack" of a product will be $0.99 (and 1 include of the product)

A Standard pack will be $2.99 (and include 4 of the product)

A double pack will be $ 4.99 (and include 8 of the product)

I'd like these to appear as options on the product page and when ordered remove the correct number of items from my inventory (e.g. ordering a sample pack will remove 1 of the products from the inventory, ordering 2 double packs will remove 16 etc)

I've tried various methods using custom options and bundles but I can't find a way to get this to work.


texts:
I ran into this while building a custom module

Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.

When running this command I got another issue:

There are no commands defined in the setup namespace

Is this a know issue or did I something wrong?
Thanks

*****EDIT****

app/code/Unreal/Custom/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Unreal_Custom" schema_version="2.0.0" setup_version="0.0.2">
    </module>
</config>

app/code/Unreal/Custom/registration.php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Unreal_Custom',
    __DIR__
);


texts: How Can I Import Category META Tags(Titles, Descriptions, Keywords) into DB Using MySQL Query?

texts: Category META Tags(Titles, Descriptions, Keywords) Import not possible at the back end, how can I import into DB using MySQL Query?


texts: Magento2, get custom options value in minicart observer

texts:
Using below observer the price need to be calculated based on the start and end date in custom options.

<?php
/**
 *  CustomPrice Observer
 *
 * @category    CustomPricing
 * @package     CustomPricing_RentPricing
 *
 */
namespace CustomPricing\RentPricing\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\RequestInterface;

class CustomPrice implements ObserverInterface
{
    public function execute(\Magento\Framework\Event\Observer $observer) {
        $item=$observer->getEvent()->getData('quote_item');
        $product=$observer->getEvent()->getData('product');
        $item = ( $item->getParentItem() ? $item->getParentItem() : $item );
        if ($product->getData('rent_price')) {

                    $base_price= $product->getData('rent_price');

                    $number_of_days=??? how get the value of two custom options (type date)???

                    $price=$base_price * $number_of_days

            } else {
        $price = $product->getPrice();
            }
        $item->setCustomPrice($price);
        $item->setOriginalCustomPrice($price);
        $item->getProduct()->setIsSuperMode(true);
    }
}

Update: using below did not work

$product_id = $product->getId();
                    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                    $customProduct = $objectManager->get('Magento\Catalog\Model\Product')->load($product_id);
                    foreach ( $customProduct ->getOptions() as $o) {
                  ??

                   }

Update2: Using ObjectManager is problematic here and results to "We can't add this item to your shopping cart right now."


texts: Error sales order grid using column search

texts:
I created a custom module to extend the sales order grid with a SKU column. It works well, until you search in that specific column.

Then I do receive a error message.

How can I solve this?

Then I got the following error message:

Uncaught Error: Using $this when not in object context in /app/code/local/Atwix/ExtendedGrid/Model/Observer.php:60 Stack trace: #0 /app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(468): Atwix_ExtendedGrid_Model_Observer::filterSkus(Object(Atwix_ExtendedGrid_Model_Resource_Sales_Order_Grid_Collection), Object(Mage_Adminhtml_Block_Widget_Grid_Column)) #1 /app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(457): Mage_Adminhtml_Block_Widget_Grid->_addColumnFilterToCollection(Object(Mage_Adminhtml_Block_Widget_Grid_Column)) #2 /app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(534): Mage_Adminhtml_Block_Widget_Grid->_setFilterValues(Array) #3 /app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php(61): Mage_Adminhtml_Block_Widget_Grid->_prepareCollection() #4 /app/code/local/Atwix/ExtendedGrid/Model/Observer.php on line 60

The file looks like this:

class Atwix_ExtendedGrid_Model_Observer
{
    /**
     * Joins extra tables for adding custom columns to Mage_Adminhtml_Block_Sales_Order_Grid
     * @param Varien_Object $observer
     * @return Atwix_Exgrid_Model_Observer
     */
    public function salesOrderGridCollectionLoadBefore($observer)
    {
        $collection = $observer->getOrderGridCollection();
        $select = $collection->getSelect();
        $select->joinLeft(array('payment' => $collection->getTable('sales/order_payment')), 'payment.parent_id=main_table.entity_id', array('payment_method' => 'method'));

        $select->join(
                array('address' => $collection->getTable("sales/order_address")),
                'main_table.entity_id = address.parent_id AND address.address_type = "shipping"',
                array('postcode')
            );

        $select->join('sales_flat_order_item', '`sales_flat_order_item`.order_id=`main_table`.entity_id', array('skus' => new Zend_Db_Expr('group_concat(`sales_flat_order_item`.sku SEPARATOR ", ")')));
        $select->group('main_table.entity_id');
    }

    /**
     * callback function used to filter collection
     * @param $collection
     * @param $column
     * @return $this
     */
    public function filterSkus($collection, $column)
    {
        if (!$value = $column->getFilter()->getValue()) {
            return $this;
        }

        $collection->getSelect()->having(
            "group_concat(`sales_flat_order_item`.sku SEPARATOR ', ') like ?", "%$value%");

        return $this;
    }
}


texts: i am new in magento i want to add a category landing page my code is this but it show null

texts:
<?php $_categories=$this->getCurrentChildCategories()?>
<?php $_collectionSize=count($_categories); ?>

<?php $i=0; foreach($_categories as $_category): ?>
<?php $layer = Mage::getSingleton('catalog/layer');
$layer->setCurrentCategory(Mage::getModel('catalog/navigation')->load($_category->getId()));
$helper = Mage::helper('catalog/navigation');
?>

<?php $_img=$this->getCurrentCategory()->getImageUrl()?>
<?php if($_img): ?>

<a href="<?php echo $helper->getCategoryUrl($_category);?>">
<img src="<?php echo $_img?>" title <?php echo $_category -> getName() ?> "/>

<?php endif; ?>

<a href="<?php echo $_category->getURL()?>" title="<?php echo $this->htmlEscape($_category->getName())?> ">
<?php echo $this->htmlEscape($_category->getName())?>

<?php $i++;
endforeach;
 ?>


texts: Oauth 2.0 in Magento 2.2 with how to access the token

texts: Can please give example to access the magento 2 api by using oauth 2


texts:
Anyone know How to get all attribute value and label of a child product of a configurable product using by direct sql?

I only know the way to find out what attributes of a configurable is using:

select * FROM `catalog_product_super_attribute` where product_id = 421

the result is

product_super_attribute_id  product_id  attribute_id    position
53                          421         92              0
54                          421         180             0

the product 421 has the following child products

//294, 295, 296, 518, 519, 888, 889, 890, 891, 892, 893, 894, 895, 896

because i don't know how the product is linking to a attribute/label/value, so how to get linked attributes label and value of the child products?

---Update----
just found some a useful sql, alter it can get my wanted result

SET @entityid = 294;

SELECT ea.attribute_code, eav.value AS 'value', 'varchar' AS 'type'
FROM catalog_product_entity e
JOIN catalog_product_entity_varchar eav
  ON e.entity_id = eav.entity_id
JOIN eav_attribute ea
  ON eav.attribute_id = ea.attribute_id
WHERE e.entity_id = @entityid
UNION
SELECT ea.attribute_code, eav.value AS 'value', 'int' AS 'type'
FROM catalog_product_entity e
JOIN catalog_product_entity_int eav
  ON e.entity_id = eav.entity_id
JOIN eav_attribute ea
  ON eav.attribute_id = ea.attribute_id
WHERE e.entity_id = @entityid
UNION
SELECT ea.attribute_code, eav.value AS 'value', 'decimal' AS 'type'
FROM catalog_product_entity e
JOIN catalog_product_entity_decimal eav
  ON e.entity_id = eav.entity_id
JOIN eav_attribute ea
  ON eav.attribute_id = ea.attribute_id
WHERE e.entity_id = @entityid
UNION
SELECT ea.attribute_code, eav.value AS 'value', 'datetime' AS 'type'
FROM catalog_product_entity e
JOIN catalog_product_entity_datetime eav
  ON e.entity_id = eav.entity_id
JOIN eav_attribute ea
  ON eav.attribute_id = ea.attribute_id
WHERE e.entity_id = @entityid
UNION
SELECT ea.attribute_code, eav.value AS 'value', 'text' AS 'type'
FROM catalog_product_entity e
JOIN catalog_product_entity_text eav
  ON e.entity_id = eav.entity_id
JOIN eav_attribute ea
  ON eav.attribute_id = ea.attribute_id
WHERE e.entity_id = @entityid


texts: how to setup mixed case magento product url key

texts:
I am using magento 1.7 and I have already live site running in zencart. my zencart site's product url in Mixed case like http://wwww.example.com/Silver-Bracelet when i save product in magento with this product url key Silver-Bracelet then its auto convert into small case.

my live site url is

http://www.example.com/Silver-Badge

and on test server magento url is

http://test.example.com/silver-badge

when in click this url then product is open but when i type url as

http://test.example.com/Silver-Badge

then i got page not found thats why i am search to make mixed case urls in magento so please can any body please tell me how to change this url key in to mixed case


texts: Bulk products using rest Api with Rabbitmq custom queue

texts: I want to create custom module in magento 2.3 beta to track the publisher message and processing message in consumer


texts: Magento 2: Displaying ""%fieldName" is required. Enter and try again." in attention modal

texts:
I'm using Magento 2.3.5, and for the virtual products in checkout page, when the email is empty and when selecting the payment method I'm getting the following message in attention modal:"%fieldName" is required. Enter and try again." in attention modal.

As I checked in network tab, the API "V1/guest-carts/:cart_id/set-payment-information" requires email and getting the following response:
{"message":"\"%fieldName\" is required. Enter and try again.","parameters":{"fieldName":"email"}}

How can I display the Email is required instead of "%fieldName" is required.?
Since I'm new to Magento, Can let me know what files to changed to avoid the issue?


texts: How to translate only the ‘storefront’ in Magento 2?

texts:
I am translating my Magento 2 website.  I would like to keep English for the admin pages, but use another language for the storefront (i.e. the pages customers see).  This should mean there will be far fewer phrases to translate, as the admin pages will remain in English.

I am using the Magento command-line tool to generate the translation dictionary:

magento i18n:collect-phrases -o "/var/www/html/magento2/tr_TR.csv" -m

This outputs phrases used on the entire site - i.e. storefront AND admin pages.  I would like it to output only the phrases used on the storefront.

Does anyone know if this possible?


texts: Downloadable product event if someone click on the document (pdf) included

texts:
I need to trigger an event if an user click a downloadable product, i mean the document (pdf, word, etc...) included because i need my customer read those documents, and after that i need to do some action
Is there any event dispatched by downloadable product or i need to create a custom event?

Thank you very much


texts: Why Magento 2 have 2 possible root folder?

texts:
I'm trying to figure out how Magento 2 is working. I've seen something that made me confuse.

Magento 2 have 2 possible root folder:

/path/to/magento2/index.php
/path/to/magento2/pub/index.php

One is at the absolute top level of Magento 2’s distribution folder. The second is inside the “pub” folder.

If I set base URL is either of them, magento is working perfectly.

Can anyone explain me why Magento 2 using 2 root folder like that ?


texts: magento page is not redirecting when install on wamp

texts: I have tried a lot of time to install Magento on Wamp and it always gives error "page is not redirecting properly".I searched on google and applied various solutions but not getting its solution.


texts: Getting Error login via Linkedin in Magento 1.9

texts:
Hi I am using Social Login plugin in my site. I have added LinkedIn App id and Secret Key but Getting Below Error. Any one help me, which link I have to set to Authorized Redirect URLs: in LinkedIn Account.

If any one have idea then ask me.


texts: How to set default customer group for guest

texts:
I want to set different user group for the guest user, is that possible?
I have tried the following code but it's not working:
  if($product->getStoreId()=='1' || $product->getStoreId()==1){
            $this->session->setCustomerGroupId(17);
        }


texts: When extending Mage_Tax_Helper_Data admin menu Sales>Taxes disappears

texts:
I'm trying to extend properly the core class Mage_Tax_Helper_Data with a module named "smartvat". All seem ok, my config.xml file:

<?xml version="1.0"?>
<config>
  <modules>
    <Bsinformatica_Smartvat>
      <version>0.1.1</version>
    </Bsinformatica_Smartvat>
  </modules>
  <global>
    <helpers>
      <smartvat>
        <class>Bsinformatica_Smartvat_Helper</class>
      </smartvat>
    </helpers>
      <helpers>
        <tax>
          <rewrite>
            <data>Bsinformatica_Smartvat_Tax_Helper_Data</data>
          </rewrite>
        </tax>
      </helpers>
    <models>
      <tax>
        <rewrite>
          <config>Bsinformatica_Smartvat_Tax_Model_Config</config>
        </rewrite>
      </tax>
    </models>
      </global>
</config>

and my class...

class Bsinformatica_Smartvat_Tax_Model_Config extends Mage_Tax_Model_Config {

    public function getPriceDisplayType($store = null)
    {
        // code goes here
    }

}

All it seems ok and the class id properly rewrited. But doing this the admin menu Sales>Taxes disappear. If I comment out:

<helpers>
    <tax>
        <rewrite>
            <data>Bsinformatica_Smartvat_Tax_Helper_Data</data>
        </rewrite>
    </tax>
</helpers>

this section the menu displays correctly. Can someone help me?


texts: how to show products order by attribute, Attribute created from admin panel?

texts:
I created an attribute sorting order (attribute code : shortorder ) for arrange/sorting(ASC or DESC) the products by adding value to this attribute while adding the products.

In the list.phtml product collections are collect by

$_productCollection=$this->getLoadedProductCollection();.

Is there any way to do this shorting in product view page?


texts: How do I remove Admin from my shipping label?

texts:
My company has set up the USPS shipping module and we have started printing shipping labels through Magento 2.

Our only problem is that each time we print a shipping label, the name on the label says Admin. I have searched all over the backend, gone through every tab and can't find where this data is coming from.

Could somebody help me figure out how to remove this from our shipping labels?
(Bonus points if you know how to disable signature confirmation because it seems to be automatically applying to each USPS order)

Thank you for your time.


texts:
I have just started with the theme development in the magetento 2.1. I am over all new to magento. I wanted to know the setup and the ways to one develop a theme in magento . After a lot of reading the procedure i follow after making a change in the custom theme file is

When changing/overriding the layout file run the 'php bin/magento setup:static-content:deploy --theme vendor/theme' command.
When changing/overriding the less files/static files using grunt i run 'grunt exec:vendor && grunt less:vendor'. (Offcourse after configuring grunt).

But if instead of modifying the files from the app/design/frontend/vendor/theme/ if i modify the less/static files from 'pub/static/frontend/vendor/theme/en_US/' I can just run grunt less:vendor and i can get the compiled css there and after my development is done i can copy the files back to app/design/frontend folder at respective places.

What are the best practices or the common way of theme development steps?

PS: All vendor is your vendor and all theme is respective theme name.


texts: Magento2 How to add custom attribute to billing information of order rest api response

texts:
I want to add a custom attribute to the billing information section of order rest API response instead of showing in extension attribute section. please anyone can help me in this.

Thanks in advance


texts: How magento decides order of all _module.less file imported through @magento_import directive?

texts:
I am trying to add module specific less file named _module.less inside my custom module Mynamespace_Mymodule in M2.

For that I have created module.xml file with below sequence.

<module name="Mynamespace_Mymodule" setup_version="0.0.1">
        <sequence>
            <module name="Magento_Sales" />
            <module name="Magento_Payment" />
            <module name="Magento_Checkout" />
        </sequence>
</module>

and thus corresponding sequence is generated inside app/etc/config.php file.

However the sequence for my _module.less file is not the same as the order of module I set from module.xml. Instead, my _module.less file comes before those two modules that I set inside sequence, so I have to use ugly !important flag every time inside less file to override css properties.

Here is how compiled order for _module.less is inside styles-m.less after grunt exec:theme command.

@import '../Mynamespace_Mymodule/css/source/_module.less';
@import '../Magento_Checkout/css/source/_module.less';
@import '../Magento_Sales/css/source/_module.less';

How magento decides order for _module.less file?


texts: How can I rewrite URL which can help for SEO with multiwebsite?

texts:
I want to solve duplicate product content issue with multi website with same SKU.

I have magento with multi website under one magento instance. Where there are two type of admin user. One is main super admin user and others are website level admin user.

There are website level catalog access for each website admin user. WEbsite admin can create their own products or they can edit products provided/shared by super admin.

Some of the products are shared between the multiple websites.

Note. Allow Store code in URL is enabled from admin for each website.

There are two website.

Example.

Default website :- www.example.com/default

default is a store code for Default website.

Alabama website:- www.example.com/alabama

alabama is a store code for Alabama city website.

Question 1. For Default website, I want to remove store code permanently ?

For example, hoodie product has been created by super admin and shared with two websites and shirt product created by Franchise admin under their own website.

Question 2. For Alabama website, I also want to remove store code from the website for those products which are shared and not edited(there is no any change in name, description, meta information etc. upto that) by Franchise admin from admin.

So for example if hoodie is shared between these two website and it is not edited by any of the website admin, product URL will be www.example.com/apparel/hoodie.html. But if Alabama website admin has changed anything(name, description, meta information etc) for 'hoodie', URL should be www.example.com/alabama/apparel/hoodie.html.

But in case if Alabama website admin has created their own product called 'shirt', URL for that product for alabama website should be www.example.com/alabama/apparel/shirt.html

Can anyone have any idea about that how this can be achieve in magento with multiwebsite?

Please let me know if require more detail.
It is very much important for me to resolve this issue.

Thanks is advance.


texts: Category collection: addAttributeToFilter on parents

texts:
I have a category structure like this with a total of around 5000 categories:

A is_active=1

A1 is_active=1

A1-1 is_active=1
A1-2 is_active=1
A1-...

A2
A3

B is_active=0

B1 is_active=1

B1-... is_active=1

B2
B3

...

Now, getting all active categories is quite easy:

/** @var \Mage_Catalog_Model_Resource_Category_Collection $categories */
            $categories = Mage::getResourceModel('catalog/category_collection');

            $categories->addAttributeToSelect('*');
            $categories->addAttributeToFilter('entity_id', ['neq' => $this->getCurrentCategory()->getId()]);
            $categories->addAttributeToFilter('is_active', 1);

            return $categories;

I obviously also get all the B1 subcategories; how do I remove those from the returned collection? In general: I want to remove all the categories with a disabled parent from the collection. My hunch is to make a loop, but I suspect there is a smarter solution.


texts:
Importing gallery images seems like such a fundamental function, but I cannot find any column in my csv exported file where I would do this.
I created a single product with gallery images through magento's backend and then exported into csv and even those gallery images are nowhere to be found in the csv file.

what am I missing?


texts: How can use resize image with this code?

texts:
how can use following code with resize feature?

if ($_item->getProductType() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE && count($_item->getChildrenItems()) > 0) {
    $_productThumbnail = $_item->getChildrenItems()[0]->getProduct()->getThumbnail();
}
    <img src="<?php echo Mage::getModel('catalog/product_media_config')
                                ->getMediaUrl($_productThumbnail ); ?>" width="150" height="150" alt="" style="float:left;margin-right:10px" />


texts: Admin form redirect to dashboard - Magento2

texts:
I am trying to store the value in custom table from admin form but it is always redirect to admin dashboard when I submit the form.

form page admin url: http://magentodev.gworks.mobi/magento2/admin/gworksrc/cancel/

<form action="/magento2/admin/gworksrc/cancel/" method="post">
 <input type="number" name="timeinterval" id="timeinterval" />
 <input type="submit" value="SUBMIT" id="timesubmit" />
</form>

I have tried with various type of action URL but nothing work

 action=<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>
 action=""
 action="<?php echo $this->getUrl('gworksrc/cancel/index'); ?>"

I found the same problem here, but it is syntax error but my form look simple I can't found any syntax error.

Thanks


texts: filter / hide 1 category that would not show up on " new in the store" block ( home page )

texts:
On my site I have a category with adult products. When you click on it you going to have a popup that says you must be 18 to enter, everything is good there, but here's my problem:

Every time I update the adult products they are showing up on the "new in the store" block. How can I filter that category, so it never shows up on this block on the home page?

I’m using Magento 1.9.2


texts: Magento 2 - “Element.disabled is not a function” Attribute Error

texts:
In Magento 2, creating a configurable product using a custom attribute to create product configurations the following error occurs:

element.disabled is not a function


texts:
We are selling articles that should be sold cheaper if sold in specific multiplies (10 pieces, 20 pieces, ...).

When setting a tier price, it is only possible to set this price for "> 10" items and 11 items would also get an discount.

Is there an "easy" way to set this in the Magento backend or a simple approach for an own module?


texts: Problem with the homepage slider and content images position

texts:
I'm trying to bring the slider and the related images on right of the page but nothing seems to be working out perfectly. The slider is in perfect position but the image which should be on the right side, next to the slider has moved below it. Also, When you scroll down the page you'll can find only 2 Promotional block images in a row and again the other one has moved down. According to the Demo of the theme, all the images should be in a row.

Let me tell you one thing that I'm an amateur in programming and Magento too, I'm unable to figure out what I'm doing wrong. Can anyone please help me out?

The actual page should look like this as per the demo: https://www.pagayo.com/magento-themes/pt001.html

But my page looks like this: http://www.dirtrades.com


texts: How to Whitelist API for Maintenance flag

texts:
I have our site whitelisted via the index.php file and it works however the whitelist does not work for the SOAP API access.

Is there an easy fix to add the whitelist for API access?


texts: Magento 2: template security: which method to use?

texts:
I'm aware Magento 2 has several methods available to secure the template:

$block->escapeHtml()
$block->escapeQuote()
$block->escapeUrl()
$block->escapeXssInUrl()

But I'm wondering when to use each of those methods ?


texts: Magento 2: Override gallery.html file from vendor/magento/magento2-base/lib/web/mage/gallery

texts:
How to override file from vendor/magento/magento2-base/lib/web/mage/gallery folder.

I have to some changes inside gallery.html file and gallery.js file.
How to override those file inside my custom theme.

Thanks.


texts: Magento 2 site fails after upgrading server

texts:
We recently finished building a site with a Magento 2 template at www.cellar2door.com We were advised to upgrade our blue host hosting to a VPS account and did that.

Now the site doesn't show and we get the following text on the home page. Exception: Notice: Use of undefined constant ICONV_IMPL - assumed 'ICONV_IMPL' in /home/cellart1/public_html/vendor/magento/framework/Stdlib/StringUtils.php on line 162 in /home/cellart1/public_html/vendor/magento/framework/App/ErrorHandler.php:61 Stack trace: #0 /home/cellart1/public_html/vendor/magento/framework/Stdlib/StringUtils.php(162): Magento\Framework\App\ErrorHandler->handler(8, 'Use of undefine...', '/home/cellart1/...', 162, Array) #1 /home/cellart1/public_html/vendor/magento/framework/HTTP/Header.php(120): Magento\Framework\Stdlib\StringUtils->cleanString('Mozilla/5.0 (Ma...') #2 /home/cellart1/public_html/vendor/magento/framework/HTTP/Header.php(57): Magento\Framework\HTTP\Header->_getHttpCleanValue('HTTP_USER_AGENT', true) #3 /home/cellart1/public_html/vendor/magento/framework/App/Response/HeaderProvider/XssProtection.php(43): Magento\Framework\HTTP\Header->getHttpUserAgent() #4 /home/cellart1/public_html/vendor/magento/framework/App/Response/HeaderManager.php(42): Magento\Framework\App\Response\HeaderProvider\XssProtection->getValue() #5 /home/cellart1/public_html/vendor/magento/framework/Interception/Interceptor.php(123): Magento\Framework\App\Response\HeaderManager->beforeSendResponse(Object(Magento\Framework\App\Response\Http\Interceptor)) #6 /home/cellart1/public_html/var/generation/Magento/Framework/App/Response/Http/Interceptor.php(117): Magento\Framework\App\Response\Http\Interceptor->___callPlugins('sendResponse', Array, Array) #7 /home/cellart1/public_html/vendor/magento/framework/App/Http.php(185): Magento\Framework\App\Response\Http\Interceptor->sendResponse() #8 /home/cellart1/public_html/vendor/magento/framework/App/Http.php(156): Magento\Framework\App\Http->handleDeveloperMode(Object(Magento\Framework\App\Bootstrap), Object(Exception)) #9 /home/cellart1/public_html/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http->catchException(Object(Magento\Framework\App\Bootstrap), Object(Exception)) #10 /home/cellart1/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #11 {main}

Bluehost have tried everything they can think off but cannot find a solution.

The developer company is closed now for Chinese New Year so will have to wait until next week to hear back from them.

I was wondering if anyone had had similar problems or could point me in the right direction if it is as simple as editing a line of code?


texts:
I run a food delivery business where we make fresh food, package it, and delivery it locally each day. Each day we offer a different set of options. For example, on Monday there might be Entree A, Entree B, Salad A, and Salad B. On Tuesday, there would be Entree B, Entree C, Salad B, and Salad C.

We'd love to create an online store with Magento where our customers are able to view our menus 1-2 weeks in advance and place orders for those items. For example, on Monday, a customer could order food for Thursday and Friday. However, we won't make or deliver those items until those given days.

Is there an extension or a way to do this in Magento?


texts: Magento Quick Search showing all products, no pagination

texts:
Magento Quick Search showing all products with no pagination
Though 9 per page is selected, but still showing all products with that search


texts: Magento 1.9.3: Need extra fee specific plugin

texts:
I have a specific need:

I need a plugin (no problem if paid) that allows me to apply an extra fee on specific products and per customer group.

The situation in detail is this:

General customers will purchase specific products with an extra tax included in the price (in this case no intervention, I will add the tax to the price of the product)
Wholesale customers will purchase specific products with an extra tax separately, to be displayed in the cart (+ VAT), and to be totalized in the order.
Wholesale customers of a specific customer group will purchase specific products with an extra fee, but without paying it.

The features I'm looking for are:

possibility to specify different taxes (fixed and obligatory) by product / category, I will have different products taxed, with a tax per product, but different taxes according to the characteristics of the product
possibility to assign the fee to different store views
possibility of excluding the tax to certain customer groups
display of the tax on the product page, on the cart, on the invoice and on the order summary

The best plugin that ive find is this (that seems to do everything
, except the customer group choice):
https://www.magikcommerce.com/magento-extra-fee-extension

Any suggestions?


texts:
I want to display the productimage, based on the SKU of the product.

How can I achieve this?

My currenty code in a custom module, that displays the SKU based on the following code:

<?php echo $item->getProduct() ? $item->getProduct()->getSku() : Mage::helper('rma')->getOrderItemLabel($item) ?>


texts: Magento 2 : How to override fotorama.js in magento custom theme , to add one image at the end of the gallery

texts:
I need to add one image (the same image) at the end of the gallery images for all products, in file fotorama.js. How can i do that? I know there are other ways to do that , but it is important that I do that with fotorama.js (preference or plugin)
Does anyone knows that how to solve it? Thanks in advance.


texts: Magento2 order is not created after payment

texts:
I have a weird problem. Order seem not properly created after payment successfully. Order is expected to show in Sales -> Orders but it's not. I can find that missing order from customer account in frontend and Sales -> Transactions. Could anyone know what's the reason of this.

I also check paypal buyer and merchant account to ensure transaction is actually made. paypal IPN is also good. Does anyone have the same issue?

thanks in advance.

additional question:

I have a remote production and local development magento. Two days ago I upgraded my local magento via composer and then push it to my production site. And then I run the setup:upgrade in production. It seems working fine. But not sure if this a common practice to upgrade or will it causes implicit issue just like this one?


texts: Magento 2.3.2 Failed to load the "Magento_GiftMessage/js/view/gift-message" component

texts:
On cart page I am receiving this error in console:

  Failed to load the "Magento_GiftMessage/js/view/gift-message"
  component

*Applied coupon code "test123" not showing in cart page summary.

However the subtotal showing correct with deducted of discount amount*.

I have disabled 3rd party modules one by one. Still no change. Maybe this error is responsible to not display Discount amount in cart page summary.


texts: Errors validating salesrule programatically on 2.3.2

texts:
After upgrading to Magento 2.3.2 (from 2.2.8) I am having a problem with a piece of custom code. I am running this as part of a block for displaying valid cart rules for a product.

public function getRules($product) {
    if (!$product) {
        $product = $this->registry->registry('product');
    }

    $_rules = $this->ruleFactory->create()->getCollection();

    foreach($_rules as $rule){
        $validate = $rule->getActions()->validate($product);
        if ($validate){
            // Do something
        }

    }

    // remaining omitted
}

The problematic part that I am running into is this line:

$validate = $rule->getActions()->validate($product);

It is throwing the following errors.

2019/07/25 12:22:26 [error] 5286#0: *7638021 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function getTypeId() on null in /site.com/dev/vendor/magento/module-configurable-product/Plugin/SalesRule/Model/Rule/Condition/Product.php:59
Stack trace:
#0 /site.com/dev/vendor/magento/module-configurable-product/Plugin/SalesRule/Model/Rule/Condition/Product.php(30): Magento\ConfigurableProduct\Plugin\SalesRule\Model\Rule\Condition\Product->getProductToValidate(Object(Magento\AdvancedSalesRule\Model\Rule\Condition\Product\Interceptor), Object(Magento\Catalog\Model\Product\Interceptor))
#1 /site.com/dev/vendor/magento/framework/Interception/Interceptor.php(121): Magento\ConfigurableProduct\Plugin\SalesRule\Model\Rule\Condition\Product->beforeValidate(Object(Magento\AdvancedSalesRule\Model\Rule\Condition\Product\Interceptor), Object(Magento\Catalog\Model\Product\Interceptor))
#2 /site.com/dev/vendor/magento/framework/Interception/Interc" while reading response header from upstream

My store only has simple products. Any help would be greatly appreciated.