texts: There was an error processing your order. Please contact us or try again later

texts:
I am getting this error. It was working fine from six months. I haven't changed anything.

Troubleshoot:

I have changed to Magento default theme.
Updated all core files and extensions.
Changed payment gateway
Change checkout method

Still nott working.

Please check system log and exception.log

Can anybody help me? I tried everything but stuck here 10 hours of troubleshooting.

exception.log
https://drive.google.com/file/d/0BwweON8IpmfWaHdqbEJIUUdnRTQ/view?usp=sharing

system.log
https://drive.google.com/file/d/0BwweON8IpmfWUW03ZWhkYUVkUTQ/view?usp=sharing


texts: Buy x number of Products from A and get x number of Products from B for free

texts:
I'm a newbie in magento. I'm trying to add the Shopping Cart price rule "Buy X Get Y".

In my case, I want to let the user buy x number of Products from Product A and the user will receive the same amount of Products from Product B for free.

This can be done by adding a rule for each value of x, but that is meaningless.

Is there another way I can achieve this? Something like a loop?

Thanks in advance


texts:
We have done some updates to Magento. We are now working on CE 1.9.1.0.
But we select some product(s) and then go to the upper right corner and click 'Update Attributes' in the Actions dropdown and update one or more attributes it clears the attributes color, size and two custom attributes.

Do you have any idea what is going on? or how to fix this?


texts: New to Magento 2 - Is it possible to change every product price every minute?

texts:
I work in -precious metal industry- where item prices change every minute based on markets. At the basic level, UnitPrice=MarketPrice+Premiums per tier.

My questions are:

If we want to import MarketPrices to Magento, should we implement a visual cron job that runs every minute and retrieve market prices through REST API? I suppose this is the only way but I want to confirm.
If we override the functionality that calculates item unit price according to our price calculation logic (UnitPrice= MarketPrice + Premiums), do you see any issues with it, such as mysql indexes?  Is UnitPrice indexed in Magento2. Do you see any risks?

Thanks


texts: Magento 1: Error Creating a Customer Attribute

texts:
I'm trying to create a Wholesale: Yes/No drop down attribute on customer accounts in the admin. After creating my module and install script, I get the following error:

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'mycompany_wholesale_setup' for key 'PRIMARY'

Here is what I tried:

  app/etc/modules/Mycompany_Wholesale.xml

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

  app/code/local/Mycompany/Wholesale/etc/config.xml

<?xml version="1.0"?>
    <config>
        <modules>
            <Mycompany_Wholesale>
                <version>0.1.0</version>
            </Mycompany_Wholesale>
        </modules>
        <global>
            <resources>
                <mycompany_wholesale_setup>
                    <setup>
                        <module>Mycompany_Wholesale</module>
                        <class>Mage_Customer_Model_Entity_Setup</class>
                    </setup>
                    <connection>
                        <use>core_setup</use>
                    </connection>
                </mycompany_wholesale_setup>

                <Mycompany_Wholesale_write>
                    <connection>
                        <use>core_write</use>
                    </connection>
                </Mycompany_Wholesale_write>

                <Mycompany_Wholesale_read>
                    <connection>
                        <use>core_read</use>
                    </connection>
                </Mycompany_Wholesale_read>
            </resources>
        </global>
    </config>

  app/code/local/Mycompany/Wholesale/sql/mycompany_wholesale_setup/mysql4-install-0.1.0.php

<?php
$installer = $this;
$installer->startSetup();

$setup = new Mage_Eav_Model_Entity_Setup('core_setup');

$entityTypeId     = $setup->getEntityTypeId('customer');
$attributeSetId   = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);

$setup->addAttribute("customer", "wholesale",  array(
    "type"     => "int",
    "backend"  => "",
    "label"    => "Wholesale",
    "input"    => "select",
    'source'   => 'eav/entity_attribute_source_boolean',
    "visible"  => true,
    "required" => false,
    "default"  => "",
    "frontend" => "",
    "unique"   => false,
    "note"     => "Wholesale"
));

        $attribute   = Mage::getSingleton("eav/config")->getAttribute("customer", "wholesale");

$setup->addAttributeToGroup(
    $entityTypeId,
    $attributeSetId,
    $attributeGroupId,
    'wholesale',
    '999'  //sort_order
);

$used_in_forms=array();

$used_in_forms[]="adminhtml_customer";
//$used_in_forms[]="checkout_register";
//$used_in_forms[]="customer_account_create";
//$used_in_forms[]="customer_account_edit";
//$used_in_forms[]="adminhtml_checkout";
        $attribute->setData("used_in_forms", $used_in_forms)
                ->setData("is_used_for_customer_segment", true)
                ->setData("is_system", 0)
                ->setData("is_user_defined", 1)
                ->setData("is_visible", 1)
                ->setData("sort_order", 100)
                ;
        $attribute->save();

$installer->endSetup();

Any idea what I did wrong or how I can fix the Duplicate entry error?  I should also note that I don't have direct access to the DB


texts: Magento 1.9 : Validate the Google reCaptcha in custom popup

texts:
I have added the google recaptcha in custom popup. But, form is also submitting without captcha.

I have used following codes for captcha:

I have also used js code for validating. But, I think it's not proper way to validate it.

=> js code :

function checkcaptcha() {
        if((jQuery('#g-recaptcha-response').val())=='') {
            jQuery('.captcha-error').css('display','block');
            return false;
        } else {
            jQuery('.captcha-error').css('display','none');
        }

    }

Please help me for validating reCaptcha in proper way.

Thanks.

Note : Do not suggest any extension link here. I want to check programmatically.


texts: Magento display multiple breadcrumbs in product view page

texts:
In my site I need to show all (Display Full Breadcrumb Path) category and sub category in breadcrumbs.

My product in many category like this :

Shirts >> full sleeves >> product A
T-Shirts >> Polo >> product A
Sweaters >> Woolen >> product A
Men >> Dresses >> product A

Like above I want to display all in breadcrumb [all categories which the product belongs to] in next next lines.

How to achieve this ?


texts: Changing store views doesn't apply unless I flush cache

texts:
I have 2 store views. Arabic and English.  Each has it own design. The problem is that when I load a store view it shows correctly but when I changet to the other store view the page design remains the same.

The only solution us to go and flush cache manually from backend to show the correct design that correspondes to the store view.

Plz help


texts: What can be wrong? Issues with patch 6285

texts:
I installed patch file on server in directory where all magento files are

than in ssh i wanted to run the patch

i got an error

this is last part of code (it says there is mo folder app/ect/ but it is there??)

What could be causing the issue?

I use Magento 1.9.1.0

 ./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 25: ((: > 0 : syntax error: operand expected (error token is "> 0 ")
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 32: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 33: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 34: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 35: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 36: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 25: wc: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 25: ((: > 0 : syntax error: operand expected (error token is "> 0 ")
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 32: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 33: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 34: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 35: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 36: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: fork: retry: Resource temporarily unavailable
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: fork: retry: No child processes
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 25: wc: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 25: ((: > 0 : syntax error: operand expected (error token is "> 0 ")
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 32: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 33: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 34: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 35: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 36: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: fork: retry: No child processes
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: fork: retry: No child processes
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: fork: retry: No child processes
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: fork: retry: No child processes
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: fork: Resource temporarily unavailable
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 25: ((: > 0 : syntax error: operand expected (error token is "> 0 ")
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 32: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 33: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 34: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 35: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: line 36: which: command not found
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: fork: retry: No child processes
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: fork: retry: No child processes
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: fork: retry: No child processes
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: fork: retry: No child processes
./PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: fork: Resource temporarily unavailable
ERROR: "/app/etc/" must exist for proper tool work.
bash-4.2$


texts: Magento 2: SQL error when redeeming coupon code

texts:
Magento 2.2.9

When I try to redeem a coupon code I get an SQL error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'rule_coupons.expiration_date' in 'where clause', query was:
SELECT `t`.*
FROM (
SELECT `main_table`.*, NULL AS `code`
FROM `salesrule` AS `main_table`
INNER JOIN (
SELECT DISTINCT `salesrule_website`.`rule_id`
FROM `salesrule_website`
WHERE (website_id IN (1))) AS `website` ON main_table.rule_id = website.rule_id
INNER JOIN `salesrule_customer_group` AS `customer_group_ids` ON main_table.rule_id = customer_group_ids.rule_id AND customer_group_ids.customer_group_id = 1
WHERE (from_date IS NULL OR from_date <= '2019-11-13') AND (to_date IS NULL OR to_date >= '2019-11-13') AND (`is_active` = '1') AND (main_table.coupon_type = 1) UNION ALL
SELECT `main_table`.*, `rule_coupons`.`code`
FROM `salesrule` AS `main_table`
INNER JOIN (
SELECT DISTINCT `salesrule_website`.`rule_id`
FROM `salesrule_website`
WHERE (website_id IN (1))) AS `website` ON main_table.rule_id = website.rule_id
INNER JOIN `salesrule_customer_group` AS `customer_group_ids` ON main_table.rule_id = customer_group_ids.rule_id AND customer_group_ids.customer_group_id = 1
INNER JOIN `salesrule_coupon` AS `rule_coupons` ON main_table.rule_id = rule_coupons.rule_id AND main_table.coupon_type <> 1 AND rule_coupons.code = 'test'
WHERE (from_date IS NULL OR from_date <= '2019-11-13') AND (to_date IS NULL OR to_date >= '2019-11-13') AND (`is_active` = '1') AND ((rule_coupons.expiration_date IS NULL OR rule_coupons.expiration_date >= '2019-11-13') AND (main_table.coupon_type = 3 AND rule_coupons.type = 1 OR (main_table.coupon_type = 2) AND ((main_table.use_auto_generation = 1 AND rule_coupons.type = 1) OR (main_table.use_auto_generation = 0 AND rule_coupons.type = 0))))) AS `t`
WHERE ((rule_coupons.expiration_date IS NULL) AND (to_date IS NULL OR to_date >= '2019-11-13') OR (rule_coupons.expiration_date IS NOT NULL) AND (rule_coupons.expiration_date >= '2019-11-13')) AND ((main_table.to_date IS NULL) OR (main_table.to_date >= '2019-11-13')) AND (`is_active` = '1')
ORDER BY sort_order ASC

I checked the table and the column expiration_date definately exists. I removed all existing rules and created only one simple rule that generates a discount.

I cannot wrap my head around. Why does it complain about a missing column that definately exists?

Thank you


texts:
I have strange issue when I am trying to set developer mode on my website.

When I tried to set developer mode with CLI and also changed app/etc/env.php it gave an error:

  Uncaught Magento\Framework\Exception\LocalizedException: Invalid Document Element 'plugin', attribute 'setOrder': The attribute 'setOrder' is not allowed. Line: 17 in /var/www/html/magento2/vendor/magento/framework/Config/Reader/Filesystem.php:160

While We have not changed any core files since recently I upgraded Magento to 2.1.8 version, but still issue not resolved.


texts: Load Grouped Product by custom attribute

texts: I need to get a grouped product url. How can I load a grouped product by a custom attribute and get its url?


texts: How magento 1.9 Decrease Stock quantity when order was placed in magento admin catalog inventory Qty.


texts: Mixed content problem onepage checkout ssl

texts:
i have a big problem on Onepage Checkout on Magento 1.7.0.2.
I can not find the place where getAdditonal get the data.

Load mixed active content "http://xxx.de/de/checkout/onepage/getAdditional/" was blocked.

Where can I insert the secure part:

array('_forced_secure' => true)

Thanks in advance.


texts: In magento how to format date in email template?

texts: In magento how to format date in email template ?


texts: please let me know how to delete my account information from Magento online shopping website


texts:
I am trying to create an eav attribute model. I create one for blog its working good as long as it has individual entity.

Now my question is how I can implement relationships using eav model.
for example I have a table name theme which have ( themeId, themeName, themeImage) now I have another table which have product related to theme it looks like ( productId, productName, productImage, productDescription, fkThemeId )

   <resources>
        <planner_setup>
            <setup>
                <module>Opco_Planner</module>
                <class>Opco_Planner_Model_Resource_Setup</class>
            </setup>
        </planner_setup>
    </resources>

and installer looks like

$installer = $this;
$installer->startSetup();
$installer->addEntityType('planner_theme', array(
 ..............
));
$installer->endSetup();

How we can create multiple table along with resource setup and how we manage relationship are define above.

link or help in any way will be highly appreciated.
thanks


texts: Magento2.3.4 Compilation Error: MiBPHP Fatal error

texts:
I'm trying to upgrade an existing Magento 2.2.4 installation to 2.3.4. The initial step performed was to update to 2.3.0 first, which went fine and without any errors, but when I'm trying to update from 2.3.0 to 2.3.4 I am getting the following error when compiling:

    Compilation was started.
    Repositories code generation... 1/7 [====>-----------------------]  14% < 1 sec 72.0 MiBPHP Fatal error:  Declaration of Rokanthemes\OpCheckout\Block\Checkout\AttributeMerger::getDefaultValue($attributeCode) must be compatible with Magento\Checkout\Block\Checkout\AttributeMerger::getDefaultValue($attributeCode): ?string in /var/www/html/app/code/Rokanthemes/OpCheckout/Block/Checkout/AttributeMerger.php on line 56

Here are the contents of the mentioned file:

    <?php

    namespace Rokanthemes\OpCheckout\Block\Checkout;

    use Magento\Directory\Helper\Data as DirectoryHelper;
    use Magento\Customer\Model\Session;
    use Magento\Customer\Api\CustomerRepositoryInterface as CustomerRepository;
    use Magento\Customer\Helper\Address as AddressHelper;
    use Rokanthemes\OpCheckout\Helper\Config as OneStepConfig;
    use Magento\Directory\Model\ResourceModel\Region\Collection as RegionCollection;

    class AttributeMerger extends \Magento\Checkout\Block\Checkout\AttributeMerger
    {

        protected $_oneStepConfig;

        protected $_regionCollection;

        protected $_directoryHelper;

        public function __construct(
            AddressHelper $addressHelper,
            Session $customerSession,
            CustomerRepository $customerRepository,
            DirectoryHelper $directoryHelper,
            OneStepConfig $oneStepConfig,
            RegionCollection $regionCollection
        )
        {
            $this->_oneStepConfig = $oneStepConfig;
            $this->_regionCollection = $regionCollection;
            $this->_directoryHelper = $directoryHelper;
            parent::__construct($addressHelper, $customerSession, $customerRepository, $directoryHelper);
        }

        protected function getDefaultValue($attributeCode)
        {
            if ($this->_oneStepConfig->getFullRequest() == 'checkout_index_index') {
                switch ($attributeCode) {
                    case 'firstname':
                        if ($this->getCustomer()) {
                            return $this->getCustomer()->getFirstname();
                        }
                        break;
                    case 'lastname':
                        if ($this->getCustomer()) {
                            return $this->getCustomer()->getLastname();
                        }
                        break;
                }
                return null;
            } else {
                return parent::getDefaultValue($attributeCode);
            }
        }
    }

I am really looking for a solution or fix to have this work properly, some expert advise would therefore be greatly appreciated. Thank you very much.


texts: USPS 1.9.1.1 Priority Mail International Broken

texts:
If you select Priority Mail International and do a estimate to Canada, The handling fee comes up as a option to select for shipping.

Work around is to deselect "Priority Mail International"


texts: Magento 2 - Translations in custom module

texts:
this is part of my

  etc/adminhtml/system.xml

 <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
            <label>General Configuration</label>

this is part of my file translations dictionary

  i18n/it_IT.csv

"General Configuration","Configurazioni generali"

  Store > Configuration > Local language > Italiano

but i cannot translate admin string in system configuration


texts: Magento 1 : Issue with Template override

texts:
How to override this file in magento 1 using module ?
app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml


texts: Testing Parent-Child Self Relationship With EcomDev_PHPUnit

texts:
I am working on my first extension that uses TDD principles and I am having trouble figuring out how best to write this particular test. In the module's database table, I have a column called parent_id which references the table's entity_id column. My goal is to have this type of parent-child relationship: grandparent > parent > child > grand-child > etc. To test this, I need to create some sort of dataset that includes the parent and child records. I am not sure if I need to use a fixture, expectation, or something else for this. I also need to know how to assert that the relationship was defined correctly. Can anybody give me some recommendations?

Edit:

I think I have a plan of attack for this and I will post the answer later if my idea works. I think if I create a fixture with the parent record's data, a provider with the child record, and an expectation with the relationship I may be able to use assertSame() to test it.


texts: How change top navigation menu from ol to ul?

texts:
I'm using Magento 1.9.2.4 and this is generating the menu as follow:

   Item 1

I need to change the root element of nav from  (ordered list) to  (unordered list). I checked the app/code/core/Mage/catalog/Block/Navigation.php but did not find anything.

Thank you!


texts: How do I constrain column width on the compare popup page?

texts:
http://election.perumiaminews.com

My attributes are fairly long so when you click the compare button, the column with the attributes is super wide.

The other columns have a max width so the text flows depending on window size.

I'd like to be able to fix the width of the column the attributes are listed in or set it to at least display everything in equally wide columns.

Can someone help with how to do that?

Looking through this some more, I see the class nobr is being applied to each element in the attribute column.  I imagine removing this would allow it to wrap like everything else but I don't see where that class is being applied.

...

I found the nobr class applied in list.phtml but removing had no effect.

<?php if($_i++%10==0): ?>
                    <?php echo $_attribute->getStoreLabel() ?>
                <?php endif; ?>

...

Ok, I found the below code in styles.css

background: #f4f4f4;

 text-transform: uppercase;

font-family: "Raleway", "Helvetica Neue", Verdana, Arial, sans-serif;
  line-height: 1.4;
  white-space: nowrap;

Removing the nowrap took care of the issue in both the popup and the additional information on the product page.  But it's a global change rather than strictly for the compare popup.  I think it's going to be ok but I would much rather be able to do this just for attributes and just on the product page and the compare popup.


texts: Magento2 configurable product and simple product link tables

texts: I mistakenly saved hurt all of my products catalog losing the links between simple products and configurable products, anyone knows the tables to be reset or if I can do it programmatically?


texts: Magento2 - Getting the selected custom option value for a product

texts:
I need to get the selected custom option value of product added in the cart. To observe the product add to cart, i have used an event checkout_cart_product_add_after

In the observer, I have loaded the product using below code:

$item = $observer->getEvent()->getData('quote_item');
$product = $observer->getEvent()->getData('product');

I am able to get product quantity added to the cart using $product->getQty() however, i am not getting the values of selected custom option.

By using below code i can get all the custom options for product

foreach($product->getOptions() as $o){
        $optionType = $o->getType();
        foreach($o->getValues() as $value){
            echo "<pre>";
            print_r($value->getData());
            echo "</pre>";
        }
}

Can anyone please guide how to get selected option value.

[Edit]

As per the answer by Raphael, i observed an event catalog_product_type_prepare_full_options and got the value of selected option for the product.

Now, my problem is i need to pass these values to the observer i have created for checkout_cart_product_add_after. The reason behind this is, I am trying to add a product into cart when certain product with selected custom option is added to the basket.

Is there a way to pass these value to my observer or any better/correct solution for this.


texts: My magento production site takes too long to load. How can this issue be resolved from magento side?


texts: Attribute value is not coming on my cart page, fetching all the attributes

texts:
On my website i want to display value of an attribute, but when i m trying to display, site goes blank.
On my cart page i want to display details of my products feature
Given below is the code to fetch all the attributes name
$attributes = $product->getAttributes();
foreach($attributes as $a)
{
    echo $a->getName()."\n";

}

I have written this code in default.phtml
i m getting below output , i.e name of the attribute
but i want the value of the attribute
how to achieve it

Tried methods
$product->getAttributeText('features');
$a->getData();


texts:
How can I add new status for reviews?

I want to do that from installer.

My code is kinda like this:

$sql = "INSERT INTO `review_status` (`status_code`) VALUES ('Approved And Verified');
";

try {
    $conn = Mage::getSingleton('core/resource')->getConnection('core_write');
    $conn->query($sql);
} catch (Exception $e){
    echo $e->getMessage();
}

The status is added in database but not usable/seen in admin in order to change a review status.

Thanks in advance.


texts:
I am having a serious issue with Magento and I don't know where to begin troubleshooting. I had about 40 orders come through my site on Sunday (7/12/15). When I logged in yesterday morning I saw the orders and printed all of them out for shipment (order numbers 100001511 to 100001540). When I logged back into my site today all of those orders have been deleted and there are new orders replacing 1512, 1513, 1515, 1516. I have reviewed my payment processors (authorize.net and paypal) and have cleared payments for orders 1511 - 1540 and duplicated cleared payments for orders 1512, 1513, 1515, 1516. The second orders for 1512, 1513, 1515, and 1516 are shown in my orders list but the original orders for these numbers as well as orders 1517-1540 are no where to be found in magento.

The only changes that were made to my site yesterday was the linking of the website to Shipstation which was installed through magento connect. I reached out to Shipstation and they replied saying that it couldn't have been there software as they don't send any signals to Magento that could delete orders.

If you could help me diagnose this issue it would be greatly appreciated. I have no idea how it happened or where to begin on diagnosing what caused it.


texts: How to create an empty container and render it

texts:
I want to create an empty container and get it rendered.
Currently my empty container isn't showing up.

<container name="empty-container" htmlTag="div" htmlClass="my-class"/>


texts: How to add quantity dropdown in cart for configurable product?

texts:
HelloI am using magento 1.7.0.2 CE. I need to display a dropdown for product quantity to allow a user to select quantity from the dropdown on cart page. I have added a code in checkout/cart/item/default.phtml for the same which is,

<?php echo $min_sale_qty = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($this->getProduct())->getData('min_sale_qty');
 $total_qyt = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($this->getProduct())->getQty();
     ?>
    <select name="cart[<?php echo $_item->getId() ?>][qty]">
    <?php for($i = $min_sale_qty; $i <= $total_qyt; $i = $i + $min_sale_qty)
      {
      ?>
    <option value="<?php echo $i?>" <?php echo ($i == $this->getQty())? "selected=selected": ""; ?>>
      <?php echo $i?>
    </option>
   <?php }?>
   </select>

This code displays the dropdown correctly for simple products. But when I add configurable product to my cart, It displays me dropdown without any option to select.
Can anyone help me with it? Thanks in Advance.


texts:
My transactional emails have a blue background near the top that I would like to change.

As I understand it, it's using SCSS files but I can only see things like $c-email-background; in those files.

Where do I make these changes?


texts: Magento 2 add shipping cost in product collection

texts:
I need to calculate shipping cost for each products so I used this code:
<?php

namespace Vebdor\Module\Model;

class ShippingCost
{
    protected $converter;

    protected $totalsCollector;

    protected $dataProcessor;

    protected $quote;

    protected $item;

    public function __construct(
        \Magento\Quote\Model\Cart\ShippingMethodConverter $converter,
        \Magento\Quote\Model\Quote\TotalsCollector $totalsCollector,
        \Magento\Quote\Model\Quote $quote,
        \Magento\Quote\Model\Quote\Item $item
   ) {
        $this->converter = $converter;
        $this->totalsCollector = $totalsCollector;
        $this->quote = $quote;
        $this->item = $item;

   }

    /**
     * @inheritdoc
     */
    public function estimateByProductAndAddress($product, $countryId, $currency)
    {
        $this->item->setProduct($product);
        $this->item->setQty(1);

        $this->quote->addItem($this->item);

        $shippingAddress = $this->quote->getShippingAddress();
        $shippingAddress->setCountryId($countryId);
        $shippingAddress->setCollectShippingRates(true);

        $this->totalsCollector->collectAddressTotals($this->quote, $shippingAddress);
        $shippingRates = $shippingAddress->getGroupedAllShippingRates();

        $minPrice = NULL;
        foreach ($shippingRates as $carrierRates) {
            foreach ($carrierRates as $rate) {
                $price = round($this->converter->modelToDataObject($rate,$currency)->getAmount(),2);
                if(!$minPrice){
                    $minPrice = $price;
                } elseif ($minPrice > $price){
                    $minPrice = $price;
                }
            }
        }

        return $minPrice;
    }
}

It works fine but after a while the foreach loop get slower and slower.
It will take 0.05 sec at the begining than up to 2/3 seconds.
Any suggestion is appreciated...


texts: How to Enable Search Engine Friendly URL's in Magento2?

texts: I am looking to use SEO friendly urls. What would be the best approach to do so?


texts: Export products with selected customer group specific price?

texts:
Is there a way to export product data to CSV with customer group specific price?

This would be needed for integration to the retailer's system. There are special prices for this retailer and we would like to automate the price and stock updates to their system.


texts: Custom module block - how to include sub-template?

texts:
I've created a basic module that has a block (extending Mage_Catalog_Block_Product_List). The purpose of the module is list products of a certain attribute set, and allow the user to filter them by defined attributes, in a certain way.

I have the module/block working, being called from a CMS page as follows:
{{block type="abc_pdn/list" name="pdn" template="catalog/product/list.phtml" attribute_set_id="9" attribute_list="rel_manu,rel_make"}}

This works fine, and allows me to list products using the default Magento template. The bit I'm struggling with is to inject a custom block above the product list that contains 2 dropdowns, one for each of the attributes. I have some code written that will output dropdowns as HTML, but I'm not sure how I add these through the template.

What is the Magento way of adding another block template within my module containing my custom dropdown HTML code?


texts: Expanded Configuration Groups in Magento 2

texts:
We used to have the expanded element in the group options when setting the system.xml file, e.g.

<sections>
  <groups>
    <groupx>
       <expanded>1</expanded>

but it's no longer there in the new structure in Magento 2, I checked system_file.xsd and couldn't find it. Is there an alternative in Magento 2 to have all the groups expanded by default.


texts: Error after running compile and upgrade cmd line

texts:
I am getting an error after running these two cmd line

php bin/magento setup:upgrade
/usr/local/php55/bin/php-cli bin/magento setup:di:compile

ERROR BELOW

Fatal error: Uncaught exception
'Magento\Framework\Exception\LocalizedException' with message 'Can't
create directory
/home/dme/public_html/magento204/var/generation/Magento/Framework/App/ResourceConnection/.'
in
/home/dme/public_html/magento204/vendor/magento/framework/Code/Generator.php:103
Stack trace: #0
/home/dme/public_html/magento204/vendor/magento/framework/Code/Generator/Autoloader.php(35):
Magento\Framework\Code\Generator->generateClass('Magento\Framewo...')
1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\Framewo...')
2 [internal function]: spl_autoload_call('Magento\Framewo...') #3 /home/dme/public_html/magento204/vendor/magento/framework/Code/Reader/ClassReader.php(19):
ReflectionClass->__construct('Magento\Framewo...') #4
/home/dme/public_html/magento204/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44):
Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\Framewo...')
5 /home/dme/public_html/magento204/vendor/magento/framework/ObjectMana
in
/home/dme/public_html/magento204/vendor/magento/framework/Code/Generator.php
on line 103


texts:
I am having the below 2 issues, I disabled the EAV Step, only to be hit with another error (the EAV Step issue)

I am using a fresh Magento 2 database to test this, I am using Magento migration tool 2.2.5, trying to migrate from magento 1.9.3.2

EAV Step Issue

[Exception]
  Notice: Undefined offset: 141 in /vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 813

Map Step Issue

[PDOException]
  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'row_id' in 'field list'

Any help please?


texts:
I am trying to get forgot password link in my controller with below code

   class CreatePost extends \Magento\Framework\App\Action\Action
   {
    protected $_messageManager;
    protected $customerForgotUrl;
    public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\Message\ManagerInterface $messageManager,
    \Magento\Customer\Model\Url $customerForgotUrl
) {
    $this->_messageManager = $messageManager;
    $this->_customerForgotUrl = $customerForgotUrl;
    parent::__construct($context);
}
  try{
     $user->save();
  }catch (\Magento\Framework\Exception\AlreadyExistsException $e) {
            $url = $this->_customerForgotUrl->getForgotPasswordUrl();
            $message = $this->__('There is already an account with this emails address. If you are sure that it is your email address, click here to get the password and access your account.', $url);
            $this->_messageManager()->addError($message);
        }

Its not working. Please anyone suggest on this.


texts: Magento error when going to forgotten password link

texts:
Hi when we go to the 'Forgot Password' link of our Magento 2 store we see this error...

  Fatal error: Uncaught Error: Call to a member function setEmailValue()
  on boolean in
  /home/signedge/public_html/idcardsolutions.net/vendor/magento/module-customer/Controller/Account/ForgotPassword.php:49
  Stack trace: #0

  /home/signedge/public_html/idcardsolutions.net/var/generation/Magento/Customer/Controller/Account/ForgotPassword/Interceptor.php(24):
  Magento\Customer\Controller\Account\ForgotPassword->execute() #1

  /home/signedge/public_html/idcardsolutions.net/vendor/magento/framework/App/Action/Action.php(102):
  Magento\Customer\Controller\Account\ForgotPassword\Interceptor->execute()
    #2

  home/signedge/public_html/idcardsolutions.net/vendor/magento/framework/Interception/Interceptor.php(74):
  Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
    #3

  home/signedge/public_html/idcardsolutions.net/vendor/magento/framework/Interception/Chain/Chain.php(70):
  Magento\Customer\Controller\Account\ForgotPassword\Interceptor->___callParent('dispatch',
  Array) #4

  /home/signedge/public_html/idcardsol in
  /home/signedge/public_html/idcardsolutions.net/vendor/magento/module-customer/Controller/Account/ForgotPassword.php
  on line 49

ForgotPassword.php has not been modified in anyway.

What's strange is this only happens on one of our stores. Other stores from the same installation work fine.

Any ideas please?

Thanks


texts: include shipping method in VAT calculation

texts:
i'm using magento CE 1.8.0.1, and i'm struggling with this issue:

if i order a product at 75€, then choose a shipping method in the checkout process, i want the tax to be calculated on the product price + the shipping method price. Actually, only the product price is considered.

Here's my tax configuration :

I tried many combinations before going back to my default settings, but i never got the shipping method price to get included.


texts: How to override vendor/magento/module-sales/view/adminhtml/templates/items/column/name.phtml Magento 2

texts:
Can anyone help how to override

vendor/magento/module-sales/view/adminhtml/templates/items/column/name.phtml file.


texts:
menus of main store's urls are as follow.

http://mainstore.magento6.com/index.php/electronics.html

But menus of the child stores' urls are as follow.

http://store2.magento6.com/catalog/category/view/s/electronics/id/20/

I want to change the url of main store to

http://mainstore.magento6.com/electronics

I want to change the url of child stores to

http://store2.magento6.com/electronics

How can I do it?


texts: Magento2 factory pattern advantages over Magento 1

texts:
Magento 2 is using factory classes for non-injectables.

For example product class: ProductFactory
For example customer class: CustomerFactory

I don’t understand what is the type of factory pattern here?

Because for each class associated with 1 factory class.
I'm thinking its something duplicate.
Why we shouldn’t create abstract factory for CustomerFactory, ProductFactory etc?

and also for example:

We can pass AbstractFactory for type checking instead of ProductFactory in ProductRepository class constructor.

So we can avoid tight coupling between ProductRepository and ProductFactory

Abstract Factory class:

namespace Magento\Framework\ObjectManager\Code\Generator;

/**
 * Abstract Factory class
 */
abstract class AbstractFactory
{
    /**
     * Object Manager instance
     *
     * @var \Magento\Framework\ObjectManagerInterface
     */
    protected $_objectManager = null;

    /**
     * Instance name to create
     *
     * @var string
     */
    protected $_instanceName = null;

    /**
     * Create class instance with specified parameters
     *
     * @param array $data
     * @return \Magento\Catalog\Model\Product
     */
    public function create(array $data = array())
    {
        return $this->_objectManager->create($this->_instanceName, $data);
    }
}

Abstract Factory implementation:

namespace Magento\Catalog\Model;
use Magento\Framework\ObjectManager\Code\Generator\AbstractFactory;
/**
 * Factory class for @see \Magento\Catalog\Model\Product
 */
class ProductFactory extends AbstractFactory
{

    public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName = '\\Magento\\Catalog\\Model\\Product')
    {

        $this->_objectManager = $objectManager;
        $this->_instanceName = $instanceName;
    }

}

What is the relation between object manager and factory?

There is so much of chaining objects:

For example ProductRepository(here we can call it as client)
requires Product object.
For this its depends on specific ProductFactory object.
ProductFactory object depends on ObjectManager object.
ObjectManager object depends on Factory Object (here Developer Object).

Off course they are using Interfaces for loose coupling. Still
really confusing flow.

Can you someone give in-depth advantages with Magento 2 factory pattern & also how it differs from Magento 1?


texts: Can I make Magento render HTML in shopping cart items?

texts: We've got products with descriptions containing HTML.  Hovering over the Shopping Cart button they render just fine in the floating window.  However, upon clicking the cart button, the full screen shopping cart displays the HTML code instead of rendering it.  Is there a setting I need to change to get the full cart to render instead of displaying the HTML?


texts: How can I add Country and State dropdown in Custom admin form?

texts:
I want to add country and state drop down in custom admin form.

How can I do that ?


texts: Fotorama Gallery - How to minimize the frame size for product base image

texts:
I'm struggling to minimize the frame width and height for the product base image gallery (Fotorama).

I have inspected the browser code and noticed that if I change the following width and height the related Fotorama Frame size change however, did not found the actual location to customized the white border size (width and height):

Basically when I change the above width: 707px; height: 707px; through browser inspect I can see the changes but no where found the actual file or location to change the value.


texts: Magento 2.1.8 Authorize.net payment method not working

texts:
Magento 2.1.8, Authorized.net payment method is not working, even with signature key. It was working fine before with patch installed.

I got error at checkout page The Referrer or Relay Response URL is invalid.

Note: Do we need to upgrade for client key or not.

Please give me any suggestions or else.

Your help would be appreciated.!!! Thanks,


texts:
Login to the frontend in a customer account.
Click on "Account information" and edit some information (firstname or lastname). Click on the save button.

Now go to the magento backend and click on customers -> manage customers.
Now you see the grid with the correct "updated_at" timestamp.

Login to the frontend in a customer account.
Click on "Account information"
Click on "Addressbook" and edit some information.
Click on the save button.
Now go to the magento backend and click on customers -> manage customers.
Updated_at is not changed.

How can we set new updated_at timestamp for the address book also?


texts: How to change the order of the form fields of the catalog advanced search form

texts: I have added a couple of custom attributes to the catalog advanced search form, but they appear in the order you add them. With the last attribute added at the bottom of the form. I would like to change the order of form fields to make it a bit more intuitive for my visitors. How can I do this?


texts: 8788v2 MageReport not showing as patched

texts:
Just a quick question. I have patched a site that is on 1.9.2.4 and it has been upgraded. But on Mage Report it is not showing as patched, despite it showing it in the applied patches file.

In their notes it says that it looks for /js/mage/adminhtml/uploader/instance.js should contain "fustyFlowFactory" But I have noticed that the folder and file is missing, and also I have looked on Magento and downloaded that version and its not listed in there. Would adding the file solve my issue.

Information is on here: https://support.hypernode.com/knowledgebase/magento-patch-supee-8788-release-1-9-3/


texts: Importing and mapping custom data with dataflow

texts:
I want to parse a csv, map the fields, and do perform some custom logic with the imported data, but I can't seem to figure out the Profile Actions XML.

The XML currently looks like this, along with my reasoning:

=> Firstly the Adapter checks if the file exists and creates the batch model.

<action type="dataflow/convert_adapter_io" method="load">
    <var name="type">file</var>
    <var name="path">var/import</var>
    <var name="filename"><![CDATA[stuff.csv]]></var>
    <var name="format"><![CDATA[csv]]></var>
</action>

=> Here the Parser parses the CSV and stores it into dataflow_import_data table for other actions to access/manipulate it.

<action type="dataflow/convert_parser_csv" method="parse">
    <var name="delimiter"><![CDATA[,]]></var>
    <var name="enclose"><![CDATA["]]></var>
    <var name="fieldnames">true</var>
</action>

=> Here the mapper converts the data stored in the dataflow_import_data table.

<action type="dataflow/convert_mapper_column" method="map">
   <var name="map">
       <map name="first_name"><![CDATA[Given Name]]></map>
       <map name="last_name"><![CDATA[Family Name]]></map>
   </var>
   <var name="_only_specified">true</var>
</action>

=> And finally, I can perform my own logic. (this doesn't make much sense since the csv rows are already parsed, but there doesn't seem to be a right action for this.. )

<action type="dataflow/convert_parser_csv" method="parse">
    <var name="delimiter"><![CDATA[,]]></var>
    <var name="enclose"><![CDATA["]]></var>
    <var name="fieldnames">false</var>
    <var name="number_of_records">10</var>
    <var name="adapter">mymodule/convert_adapter_myadapter</var>
    <var name="method">saveRow</var>
</action>

Obviously, above won't work because (in the second action) convert_parser_csv doesn't have an adapter and method.

Can someone point me in the right direction to make the mapper work?


texts:
I tried to upgrade Magento from Magento Connect, but when I started the process the report window said:

  Checking dependencies of packages

  CONNECT ERROR: Package community/Cm_RedisSession 1.9.2.2 conflicts with: community/Mage_All_Latest 1.9.2.1)

In my root there isn't the folder "pkginfo". What should I do?


texts: Magento 2: Customer dropdown attribute not selecting first option

texts:
I have added a new customer attribute which is working fine.
The only thing is that I would like it to display the first option selected by default in both admin and frontend side (account create / edit).
How can I achieve this?
This is how my eav_attribute table looks like:
attribute_id => 200,
entity_type_id => 1,
attribute_code => existing_member,
attrubute_model => null,
backend_model => null,
backend_type => int,
backend_table => null,
frontend_model => null,
frontend_input => select,
frontend_label => Existing Member,
frontend_class => null,
source_model => Magento\Eav\Model\Entity\Attribute\Source\Table,
is_required => 0,
is_user_defined => 1,
default_value => null,
is_unique => 0,
note => null

This is how it is being displayed atm:
Frontend:

Admin Panel:


texts: Demo Store Mode - Non-Obvious Side Effects

texts:
I am simply wondering if there are additional side-effects of turning on Demo Store Mode. Aside from the notice that is displayed on the front and backend, is there any ordering functionality that is disabled as well?

I'd like to use the demo store notice to add a global message to the site (I will change the wording) and want to make sure this won't disable some other feature that I am not aware of.


texts: How to move category image above product listing column in magento 2.2.0?

texts: I want to move the category Image and category description in the column of product listing at category page. Now the Image and description is appearing above the 2column-left layout.


texts: Magento2 slick slider issue on page load

texts:
I am applying slick slider on the home page at widget but on page load, it is not loading properly but after page load, ends it works fine

and when the page loads completely it looks like this

here is my code

<script type="text/javascript">

    require(['jquery', 'slick'], function($){
    jQuery(document).ready(function ($) {

           jQuery('#blog-post-silder').not('.slick-
   initialized').slick({
      dots: false,
      infinite: false,
      speed: 300,
      slidesToShow: 3.1,
      settings: "unslick",
      slidesToScroll: 1,
      responsive: [
        {
          breakpoint: 1024,
          settings: {
            slidesToShow: 3.1,
            slidesToScroll: 1,
            infinite: false,
            dots: false
          }
        },
         {
          breakpoint:767,
          settings: {
            slidesToShow: 3.2,
            slidesToScroll: 1,
             dots: false
          }
        },
        {
          breakpoint: 600,
          settings: {
            slidesToShow: 3.1,
            slidesToScroll: 1,
             dots: false
          }
        },
           {
          breakpoint: 320,
          settings: {
            slidesToShow: 2.1,
            slidesToScroll: 1,
             dots: false
          }
        },
        {
          breakpoint: 480,
          settings: {
            slidesToShow: 2.1,
            slidesToScroll: 1,
             dots: false
          }
        }
        // You can unslick at a given breakpoint now by adding:
        // settings: "unslick"
        // instead of a settings object
      ]
       });
       });
       });
    </script>
      <ol id="blog-post-silder" class="product-items <?= /* @noEscape
    */ $type ?>"  >

thanks a lot


texts: How to get the price range of bundle products in Magento 2?

texts:
How can I get the price range of bundle products? It's complicated as the bundle product can have different settings e.g. fixed price / dynamic price?

I tried to take Magento's core code as an example, but I failed to trace it as the price range is rendered in a _toHtml() function.

Any suggestion is welcome.


texts: How to create custom attribute for products without using eav attribute table?

texts:
I have different price for products based on cities say for example

  Pune = 100
  Mumbai = 120
  Bangalore = 140.

I planned to create a custom table in that fields will be id, mumbai_price, pune_price, bangalore_price.

Now my question is whether to create custom attribute in product field or any other way is there to do. Because cities can increase.

Can anyone suggest me what exactly to do?


texts:
I have a customlayout which looks like this:

<custom_structure_index translate="label">
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="content">
        <block type="custom/ueblock" template="unreal/custom/formsubmit/formsubmit.phtml" ></block>
    </reference>
</custom_structure_index>

This is refering to standard 1column.phtml

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

<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
<?php echo $this->getChildHtml('after_body_start') ?>

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

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

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

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

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

<?php echo $this->getAbsoluteFooter() ?>

This works like a charm.
But I know I don't want to change the content but the header.
So I thought adding a reference with header as a name would do the trick

<reference name="header">
    <block type="custom/ueblock" template="unreal/custom/header.phtml" ></block>
</reference>

Unfortunately I was wrong.
Is it possible to update specific content blocks by using the reference tag in my custom.xml or what would be the approach to solve this with a minimum amount of effort?

**** EDIT ****

When I add the following it works but not for header and I dont understand why

        <reference name="footer">
            <block type="custom/ueblock" name="footer" template="unreal/custom/footer.phtml" before="-"></block>
        </reference>


texts: How to remove steps from the Magento Onepage checkout?

texts: I'm using CE 1.7 and I am currently trying to remove the shipping, shipping method, and payment steps from Onepage checkout. I already removed the steps from local\mage\checkout\block\onepage\abstract.php. My issue comes when trying to progress from billing information to review when i click continue it loads the loading next step image than sits still. Any ideas would be much appreciated.


texts:
I have installed a magento theme (Milano), which installs at:

app/design/frontend/default/milano

I want to customize this theme and I have set up new theme directories:

skin/frontend/default/mycustomtheme
and
app/design/frontend/default/mycustomtheme

with a varied css at

skin/frontend/default/mycustomtheme/css/styles.css

In System->Configuration->Design I have changed the Skin to mycustomtheme and left everything else as the default milano, but it still won't show the customisation to the css on my store.

I have refreshed the cache and reindexed the data.

I have also checked the System > Design and there is no design themes listed there either.


texts: how to add orginal price on order email template

texts:
<?php
if ($this->helper('tax')->displaySalesPriceInclTax($_order->getStore())) {
$itemprice = $this->helper('checkout')->getPriceInclTax($_item) ;
echo $this->helper('checkout')->formatPrice($itemprice);
} else {
echo $this->helper('checkout')->formatPrice($_item->getPrice()) ;
}

with help of above code i am able to add unit special price but i want to add original price. anyone can help me


texts:
\app\code\local\Svi\Form\controllers\IndexController.php

<?php
Class Svi_Form_IndexController extends Mage_Core_Controller_Front_Action{
    public function indexAction(){
        $layout =$this->loadLayout();
        $this->renderLayout();
    }

    public function postAction()
    {
        $data = $this->getRequest()->getPost();
        $model = Mage::getModel('form/form')->setData($data);
        try {
            $insertId = $model->save()->getId();
            echo "Data successfully inserted. Insert ID: ".$insertId;
        }
        catch (Exception $e){
            echo $e->getMessage();
        }

    }

}
?>

From $model, I found following array......

  Svi_Form_Model_Form Object ( [_eventPrefix:protected] => core_abstract
  [_eventObject:protected] => object [_resourceName:protected] =>
  form/form [_resource:protected] => [_resourceCollectionName:protected]
  => form/form_collection [_cacheTag:protected] => [_dataSaveAllowed:protected] => 1 [_isObjectNew:protected] =>
  [_data:protected] => Array ( [fname] => amit [lname] => kushwaha
  [mothername] => Sushma [fathername] => bholaNath [mobile] =>
  8858234949 ) [_hasDataChanges:protected] => 1 [_origData:protected] =>
  [_idFieldName:protected] => [_isDeleted:protected] =>
  [_oldFieldsMap:protected] => Array ( ) [_syncFieldsMap:protected] =>
  Array ( ) )

I found my table blank but it gave me message 'successful inserted'. What to do? please help me...


texts: Why Magento 1.8 better than older version?

texts:
I have one question related to Magento new version its good for security point of view and other point which is mentioned there release note but there is no much enhacement related to front end performance.

Currently i have Magento 1.4.2 on my ongoing project for which client complain me performance are slow for end user prespective, to overcome this issue i tried to test Magento 1.8 performance for similar test cases but i don't even find any performance boosting result like in category page i get same loaing time in both Magento 1.4 and Magento 1.8 and also when i import 10,000 product and then check performance for loading time but there is no effect.

can any one highlight Why Magento 1.8 is better than Magento 1.4 it obviously newer version is better than old but i want to convience my client with some convincible point.

Thank You


texts: Manage orders by scope / user authorizations

texts:
A customer has more than one physical store, on the website we need one store for each physical store so that each store treats and sends their own orders,
On Magento, the whole process should be done respecting these points:

Each Store Admin must have access only to the orders made for his
store (Restricted access by Magento scope)
Magento general Admin should have the ability to change the scope of the order and assign
the order to the correct store
Each Store Admin must only have access to certain order statuses, the other statuses must only be processed by the general administrator.

Can anyone advise me on the best way to achieve this, or suggest any available modules.


texts: Magento 2 - create custom script on root directory

texts:
In Magento 1.9 I simply use below code and Magento's Mage model could be run on the script then

include_once 'App.php';
include_once __DIR__.'/../app/Mage.php';

How can I do it in Magento 2? So that I would be able to create custom script on root directory.


texts: New SUPEE-10497 Patch for 1.9.1.1 version possible issue?

texts:
A new patch (SUPEE-10497) is available for merchants using Magento Open Source 1.9.1.1. This patch replaces SUPEE-10266 (released September 14, 2017) and SUPEE-10415 (released November 28, 2017).

Do I need to patch?

  This issue affects users of Magento Open Source 1.9.1.1 only. Users of Magento Commerce, or any other version of Magento Open Source, are not affected.

  This patch combines SUPEE-10415 and SUPEE-10266 for Magento Open Source 1.9.1.1. To install, remove both patches first then install SUPEE-10497.


texts: Using and showing "Multiple Select" -attribute in list.phtml

texts:
I am using echo $_product->getAttributeText('target') in /app/design/frontend/default/mytheme/template/catalog/product/list.phtml to show the Input Type "Multiple Select".

The product is a "Simple product" with multiple selections in the Attribute "target".

But, result shows "Array" whenever there are more than one selection.

Would there be any good solution to this issue ?


texts: M2 - Preselecting a customizable option in a simple product by URL

texts:
Is it possible to select a customizable option (size) of a simple product by URL? Or is that only working for configurable products? I basically need one URL per size/option for each product.
How can I achieve that with Magento 2.3?

Below is the Markup for the Dropdown,how can I select an option there by URL parameters?


texts: how to add html in ordered item section in admin panel?

texts:
I just want item id after every item so I could create some buttons get some information from database but it is always showing id of first item
this is my xml

<layout version="0.1.0">
<adminhtml_sales_order_view>
    <reference name="order_item_extra_info">
        <block type="core/template" name="cgorder_wrap_container" template="customsales/sales/cgorder_details_container.phtml">

            <block type="core/template" name="own_real_block" template="customsales/sales/cgorder_details.phtml" />
        </block>
    </reference>
</adminhtml_sales_order_view>

this is my parent template file

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

this is my child template file

<?php
$id = $this->getParentBlock()->getParentBlock()->getItem()->getID();
echo "id is ".$id;
?>


texts: Magento media duplicates images and swap when not needed

texts:
I have come across a strange issue. Whereby, on the products page magento creates duplicate images for each image from the "More views" gallery.

I have located the relevant code to the file media.phtml and specifically:

<?php $i=0; foreach ($this->getGalleryImages() as $_image): ?>
        <?php if ($this->isGalleryImageVisible($_image)): ?>
        <img id="image-<?php echo $i; ?>"
             class="gallery-image"
             src="<?php echo $this->getGalleryImageUrl($_image); ?>"
             data-zoom-image="<?php echo  $this->getGalleryImageUrl($_image); ?>" />
        <?php endif; ?>
    <?php $i++; endforeach; ?>

Is there a way to stop this unnecessary image duplication?

Also, the gallery doesn't take into consideration the current main image. Whereby, if image1 is the main image and you click the thumbnail of image1 it still does the swap. So, would I amend the gallery to only do the swap if not already the main image?

Digging further, I believe the following function is responsible for the changing of the image(s):

swapImage: function(targetImage) {
    targetImage = $j(targetImage);
    targetImage.addClass('gallery-image');

    ProductMediaManager.destroyZoom();

    var imageGallery = $j('.product-image-gallery');

    if(targetImage[0].complete) { //image already loaded -- swap immediately

        imageGallery.find('.gallery-image').removeClass('visible');

        //move target image to correct place, in case it's necessary
        imageGallery.append(targetImage);

        //reveal new image
        targetImage.addClass('visible');

        //wire zoom on new image
        ProductMediaManager.createZoom(targetImage);

    } else { //need to wait for image to load

        //add spinner
        imageGallery.addClass('loading');

        //move target image to correct place, in case it's necessary
        imageGallery.append(targetImage);

        //wait until image is loaded
        imagesLoaded(targetImage, function() {
            //remove spinner
            imageGallery.removeClass('loading');

            //hide old image
            imageGallery.find('.gallery-image').removeClass('visible');

            //reveal new image
            targetImage.addClass('visible');

            //wire zoom on new image
            ProductMediaManager.createZoom(targetImage);
        });

    }
}


texts: Uncheck a radio button on a bundle product page

texts:
Thought this would be simple however having some difficulty. I want to uncheck a radio button, and even checkboxes, however, have achieved checkboxes with just simulated clicks. The below I have tried:
$( "#x" ).prop( "checked", false );
$( "#x" ).attr('checked', false);
$( "#x" ).removeAttr('checked');

I have also tried javascript checked = false and other methods, I also noticed the jQuery/UI .checkboxradio('refresh') method however could not get this to fire. Used the jQuery/UI as a whole as could not find the specific module however function did not seem available.
Anyone got a nice solution for this?


texts: Magento2 set custom options after media or before tabs

texts:
Magento2 set custom options on product details page

after - product.info.media
before - tabs

How can I achieve this?


texts: Magento v2.2.6: Proceed to Checkout displays a login popup even after logged in

texts: A login popup window is displayed after clicking "Proceed to Checkout" button from cart instead of redirecting to checkout page.


texts: how to add product.info.options.wrapper in custom extension magento

texts:
My product page load from

diamonds\product\view\setting.phtml

How can I load custom option over here?

<diamonds_product_setting>
    <update handle="diamond_layout_update"/>
    <remove name="breadcrumbs" />
    <reference name="root">
        <action method="setTemplate">
            <template>page/1column.phtml</template>
        </action>
    </reference>
    <reference name="content">
        <block type="diamonds/product_view_setting" name="diamonds_product_ring_view" template="diamonds/product/view/setting.phtml">
            <block type="diamonds/filter_design" name="diamonds_filter_design" template="diamonds/filter/design.phtml"/>
            <block type="diamonds/product_view_media" name="product.info.media" as="media" template="diamonds/product/view/media.phtml">
            </block>
            <block type="diamonds/product_view_setting_mainstone" name="mainstone" template="diamonds/product/view/setting/mainstone.phtml"/>
        </block>
    </reference>
</diamonds_product_setting>


texts: Magento 2 : How reduce size of fotoroma gallery icons on product detail page

texts:
I would like to reduce size of following icons appearing on detail page, enabled native fotoroma widget.
1. Fotoroma plus icon and minus icon
2. Fotoroma close icon

<var name="magnifier">
        <var name="fullscreenzoom">5</var>  <!-- Zoom for fullscreen (integer)-->
        <var name="top">5</var> <!-- Top position of magnifier -->
        <var name="left">780</var> <!-- Left position of magnifier -->
        <var name="width">200</var> <!-- Width of magnifier block -->
        <var name="height">200</var> <!-- Height of magnifier block -->
        <var name="eventType">hover</var> <!-- Action that atcivates zoom (hover/click) -->
        <var name="enabled">false</var> <!-- Turn on/off magnifier (true/false) -->
    </var>


texts:
I want to add filtering for a ui listing

<item name="filter" xsi:type="string">text</item>

Using this i am able to add filter but its a textbox. I want it to be a textarea any solution on this.


texts: Magento 2, Trigger content update or block refresh for Order summary block on checkout

texts:
I'm having a bit of trouble trying to get the Order Summary to update on the Magento 2 checkout

I have a block on the payment step of the checkout with a special offer item. It has an add to basket button which adds the product via ajax to the quote. This all works correctly without issue, the problem i'm currently having is trying to update the order summary in the sidebar without reloading the page. I've had a search around but not managed to find anything yet.

After adding to basket I've triggered a refresh of the window.checkoutConfig and i can see the data in there.

Does anybody have any insight on how i can trigger an update of the Order Summary so it shows the items and correct totals.

I thought there would be something like trigger('contentUpdated') for the block but can't seem to get that to do anything.


texts:
I want to make the product detail into 2 Columns  with images at the side and description on the other side...

I want the right side containing the detail to be sticky while scrolling and left side containing the images


texts: Strange calculations with product price in order

texts:
We've come across a strange calculation error in our Magento setup.

Magento 1.7.0.2 with PHP 5.4

In the above picture you see two products essentially the same. However the top product has a row total of 24.99 and the second product comes with 25.00

I know Magento 1.8 solves a lot of rounding errors but does it solve this one?
We can't really install Magento 1.8, this is a highly customized shop and 1.8 is still in alpha.

We have the feeling it has something to do with PHP 5.4, we are currently investigating this with a VM, I was hoping someone here has a better insight on why this happens or how can we possibly approach this problem.

If you need more information I'd be happy to tell you more.
Thank you in advance.


texts: Static content deploy error after upgrading magento 2.3.3 to 2.3.5 (EE)

texts:
I am facing Compilation from source: LESS file is an empty issue after Magento upgrade from 2.3.3 to 2.3.5 EE at the time of Static content deploy.
Anyone face OR fixed such kind of issues??
?


texts: Get order shipping tax percent in Magento 2

texts:
Since the order method getFullTaxInfo() is not available in Magento 2, how does one get the tax percent used on the order shipping amount for an order?

I see the item is in sales_order_tax_item table (where taxable_item_type = shipping), but I don't see any method in the Order or OrderInterface for fetching the tax details, except what is already in the Order table columns (tax amount, etc.).
Weirdly enough this table also does not contain an order_id column, so there's no direct back-reference.

I know you can calculate the percentage manually but I think it's best to avoid it.

I see a promising method

\Magento\Sales\Model\ResourceModel\Order\Tax::getTaxItemsByOrderId($orderId)

but I have no idea how to properly use it.


texts: How to show category specific products like related product displayed in product detail page?

texts:
I am  trying to override related product functionality since I want to display products related based on category.

vendor\magento\module-catalog\Block\Product\ProductList\Related.php


texts: How to set up pay pal express checkout without customer login in magento 1.9

texts:
if it possible to Paypal express checkout work without a customer login.
Now it is redirected to the login page but I have no requirement to the customer login so how can I have done it?


texts: Is it possible to save the database password as hashed?

texts: In the app/etc/local.xml file, when adding the database configuration, is it possible to have the password hashed or encrypted instead of having it in plain text?


texts: Magento 2 Fotorama always show zoom in and out icons on fullscreen

texts:
How can I make it so that the zoom in and zoom out icons are always displayed, right now it only shows when zooming my browser in to 200% for the icons to show up. I see that --disabled gets appended to  fotorama__zoom-in so I tried the following:
.fotorama__zoom-in.fotorama__zoom-in--disabled {
    display: block !important;
}

Which does always show the icons, but the functionality seems to be getting disabled too, so the zoom doesn't work.
This is how it currently looks without the CSS applied:

This is how it should look with the icons there (and functional):

So, to summarize: How can I make it so that the Zoom in and out icons always show, no matter the screensize?


texts: Displaying Attribute on Category Page: Works But system.log Error

texts:
I think I'm doing something wrong, and I'd appreciate any insight.

I have an attribute for my products called 'freeshipping'

It's either set to Yes or No for each product.

On my category pages, I use the attribute to display a Free shipping icon with each product with this code:

<?php if ($_helper->productAttribute($_product, $_product->getAttributeText('freeshipping')) == "Yes"):?><img src="<?php echo $this->getSkinUrl('images/shipsfree-bug.png') ?>" class="freeshipicon" />

It's working fine on the frontend: it shows the free shipping icon if the the product has free shipping, and if it doesn't it shows nothing. The problem is that it's filling my system.log with this error:

2014-11-20T13:35:59+00:00 ERR (3): Warning: Missing argument 3 for Mage_Catalog_Helper_Output::productAttribute(), called in /MYPATHTOMAGENTO/app/design/frontend/rwd/default/template/catalog/product/list.phtml on line 150 and defined  in /MYPATHTOMAGENTO/app/code/core/Mage/Catalog/Helper/Output.php on line 120
2014-11-20T13:35:59+00:00 ERR (3): Notice: Undefined variable: attributeName  in /MYPATHTOMAGENTO/app/code/core/Mage/Catalog/Helper/Output.php on line 122
2014-11-20T13:35:59+00:00 ERR (3): Notice: Undefined variable: attributeName  in /MYPATHTOMAGENTO/app/code/core/Mage/Catalog/Helper/Output.php on line 141

So clearly I'm doing something wrong in /template/catalog/product/list.phtml with the code above when I'm trying to check to see if the product has the freeshipping attribute set to Yes.

Any help would be greatly appreciate. Thanks in advance.


texts: Magento 2 get customer old and new data on model_save_before and model_save_after event in admin backend

texts:
I am working on Admin Actions Log Extension. For the reference i am using the link below
https://amasty.com/admin-actions-log-for-magento-2.html
I want to get old and new data of customers when we save the customer.
EDIT:-

I'm using these events model_save_before and model_save_after for
saving old data to the registry and retrieve it to the save after
event, but I'm getting old data as null from the registry.

SaveBefore.php

$object = $observer->getObject();
$customer = $this->objectManager->get('Magento\Customer\Model\Backend\Customer')->load($object->getId());
$customerData = $customer->getData();
$this->registryManager->register('adminactionslog_savebefore_data', $customerData, true);

SaveAfter.php

$oldData = $this->registryManager->registry('adminactionslog_savebefore_data');
// var_dump($oldData); I'm getting this value as null

if anyone has a solution please let me know.


texts: How to create a standalone PHP to reindex the store via browser?

texts:
I have a test environment locked via auth and I would like to create some standalone scripts in PHP in my pub folder in order to optimize the project managers' work, the first file requested is a file to be able to reindex the store indexes completely.
How could I do it?


texts: Is it possible to set the Magento checkout success to another page?

texts:
The website of a client is using an extension for it's payments. The creator of this extension has set the success page of the payments to a CMS-page.

There is one payment method left, which is handled by Magento itself. This payment method ends up on the standard checkout/success page. Is it possible to get that payment method to end up on the same CMS page?

The reason that is wanted is because on the CMS page, cart tracking has been implemented, and the client wants to be able to influence the page content, title and url herself.


texts:
I try to overwrite rules.js from vendor/Magento_Ui/web/js/lib/validation/rules.js in my custom theme but it dosen't work.
I found this solution but it's not working for me : Magento 2 How to extend rules.js to add custom validation rules?

Does anyone have any idea if it's other method to overwrite rule.js file?


texts:
join 2 collection in custom Grid Magento.I am using the below code. I want to join with sales_flat_order to get get Shipping address & Grand Total. how to do ?

$customerId = $this->getRequest()->getParam('id');//customer Id
$collection = Mage::getModel('modulename/modelname')
    ->getCollection()
    ->addFieldToFilter('customer_id', $customerId);


texts: Displaying a selectable list in Onepage Checkout and adding the selected item to an order

texts:
All,

This question is an extension to my previous post:
I need to override an Account email address with a Billing email address when Placing the Order

which I could not get working, or figure out what I was doing wrong.

However, in thinking more about what we are trying to achieve, we don't need to log in with an account at all, we can simply use Guest checkout as per the SCENARIO below. This means that the system will be simpler to administer (we are confident that the retailers will regularly mislay their account login/password details).

So, to achieve this we need to cater for the following customisation:

1)  Keeping the Retailers details (customer id, business/contact name and Address) in the system, as a simple CSV or XML config file (or possibly as a new DB table)?

2)  Having a selectable Dropdown of authorised retailers retrieved from the above configuration file at the first stage of Checkout, i.e. instead of Checkout Method

In terms of 1) I did think about using a standard Customer Account record, but this means I will also need to override the Account email address with the Billing email address for payment gateway purposes.

As iterated in my original post (referred to above), I am not a seasoned Magento pro; while I have PHP/HTML/XML and some Script knowledge, I don't have deep Magento configuration knowledge.

If anyone has done anything similar, or can guide me to an article that does something similar, or provides the simplest/method to achieve this, I would be grateful as I have been working on this on and off for a week already.

SCENARIO

We are selling a range of golf products via our Store which can only be exclusively ordered and purchased from our store through a number of authorised retailers.

Also, the product(s) can ONLY be delivered to the authorised retailer's address, i.e. the customer cannot request the product(s) to be delivered to their home address. We will therefore need to store each retailer's unique details in the system. This will contain a single Shipping Address that will be used when the applicable retailer is selected at the Checkout stage.

The customer can either select the product(s) and create the order while in store with the retailer, or remotely from his/her own computer/device (if they decide not to buy at the time).

The buying process will be thus:

Products are selected and added to Cart
Customer proceeds to Checkout (no login or registration required)
An authorised Retailer is selected (via a dropdown box)
Customer completes Billing Address (with a valid customer email address)
The selected Retailer's Shipping Address is posted as display only (for visual confirmation)
Payment Method is selected
Order is Reviewed and the customer pays via Worldpay/Paypal
Customer receives the transaction confirmation email from the payment gateway and the order confirmation from the Magento store

The Order will need to be passed with the Billing Form Customer Email address (as in 4 above) and the Shipping Address passed will need to be the selected Retailer in 3, as displayed in 5.


texts: Cache System and Cookie reading Magento 1.9

texts:
In the header.phtml I have a DIV which gets visible only when a cookie is NOT set in the browser.

<?php if (Mage::getModel('core/cookie')->get('cookiex') == '') { ?>

<?php } ?>

Sometimes when I refresh the page (ctrl+R) or when I refresh the Block Cache in admin, the DIV becomes visible ALTHOUGH the cookie is still present in the browser.

If there is a mistake in my approach , I am not able to identify it.

Can you give me some idea , please ?


texts: how to add icon instead of text in magento top links My Account My Wishlist My Cart Checkout Log In

texts:
i'm working with Magento ver. 1.9.0.1 and magento boilerplate theme. i want to change the top link text with icons.but unable to find the file.

Here is the code inside my app/code/core/Mage/Checkout/Block/links.php

public function addCartLink()
    {
        $parentBlock = $this->getParentBlock();
        if ($parentBlock && Mage::helper('core')->isModuleOutputEnabled('Mage_Checkout')) {
            $count = $this->getSummaryQty() ? $this->getSummaryQty()
                : $this->helper('checkout/cart')->getSummaryCount();
            if ($count == 1) {
                $text = $this->__('My Cart (%s item)', $count);
            } elseif ($count > 0) {
                $text = $this->__('My Cart (%s items)', $count);
            } else {
                $text = $this->__('My Cart');
            }

            $parentBlock->removeLinkByUrl($this->getUrl('checkout/cart'));
            $parentBlock->addLink($text, 'checkout/cart', $text, true, array(), 50, null, 'class="top-link-cart"');
        }
        return $this;
    }


texts: order still shows processing even when I click go back arrow in the browser

texts: I am having a serious issue here. When a customer places an order in the one page check out area, He gets redirected to the payment gateway. Now the issue is , Only when the customer clicks the cancel button in the payment gateway that the order is cancelled. But if the customer clicks the go back button on the browser it shows that the cart is empty, but in the backend the order is still under processing. The same goes when I just close the payment gateway window , the order will be still in processing mode.This shouldnt be like that as its a serious loop hole


texts: Magento 2: How can I use "import product data" functionality though REST API/Postman?

texts:
I want to use import functionality in magento 2 (image below) from POSTMAN or my application.
Is there any endpoint available for the same?


texts: Check if customer is logged in (problems with cache)

texts:
I have a CMS page that only shows information when the customer is logged in. In this page I load a CMS block with this code:

{{block type="core/template" template="class_management/source.phtml"}}

In the beginning of the phtml file, to check if the customer is logged in or not, I use this:

if(Mage::getSingleton('customer/session')->isLoggedIn()){
   //display content
}

The problem is, if the customer loads this page not logged in, the page will not show the content. If the customer log in and go back to the page, it will still not show the content until I refresh the cache.

Is there anyway to fix this?

I am using Magento 1.9.2.4 and my server has redis cache enabled.

Thank you!


texts:
I want to move the checkout sidebar with in left side of the FORM div in my custom theme.

the sidebar of checkout, where the summary of the products is rendered through KO Template.

I actually want to move both form and sidebar summary in main container of

<div class="row">

is there any way which i can do the accomplish this?

http://prntscr.com/n6bqnn


texts: Resize Images for Categories when showing on the frontend

texts:
below is code i am using to add custome image attirbute to magento category

$installer->addAttribute('catalog_category', 'my_image', array(
    'type'          => 'varchar',
    'label'         => 'My Image',
    'input'         => 'image',
    'backend'       => 'catalog/category_attribute_backend_image',
    'required'      => false,
    'sort_order'    => 99,
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
    'group'         => 'General Information'
));

and below code to show that images on frontend:

  echo $imagepathidentifier =  Mage::getBaseUrl('media').'catalog/category/'.Mage::getSingleton('catalog/layer')->getCurrentCategory()->getData('identifier_image')->resize(100);

now above code shows error:

Fatal error: Call to a member function resize() on a non-object in    [...] listcustomtops.phtml on line 39 –

what to do resize images and then show to user..


texts:
I am not sure if this is possible but i want to add something to my cart table that checks if a products has a tiered saving (Buy 2 and save £5) and if the customer is not taking advantage of this saving then it tells them so in the cart.

Ideally we would like to have a String saying "Saving available" then when you put your cursor over it it pops up with a box showing the tiered price. I have added a picture to show what i mean.

However if that is not possible (the hover) is it possible just to show the saving in the cart under the title

I have just tried this:

Add this after $_item = $this->getItem(); inside checkout/cart/item/default.phtml:

$_tierPricing = $this->getLayout()->createBlock(
    'catalog/product_view',
    'product.tierprices',
    array(
        'product_id' => $_item->getProductId()
    )
);
$_tierPricing->setTemplate('catalog/product/view/tierprices.phtml');
And then where you want to put your pricing info:

<?php echo $_tierPricing->getTierPriceHtml();?>

Source:Magento display tiered pricing for each product on cart page

And i can see it is pulling the template in but it is displaying nothing

////////////////UPDATE\\\\\\\\\
It seems to work it the product that is first in the cart has a tiered price but then it displays that tier price on all products??

Thanks


texts:
I have a store in Magento 1.7, and as it is b2b, the first page is login. I need to have a box for Creating account, which I already have. There I need to have a text field to write the e-mail, and then click a button Create account, in order to fill all the necessary information for the registering.

My question is, how can I get the e-mail from the form? And, currently my 'Create account' button is defined as

<button type="button" title="<?php echo $this->__('Create an Account') ?>" class="login" onclick="window.location='<?php echo Mage::helper('persistent')->getCreateAccountUrl($this->getCreateAccountUrl()) ?>';"><?php echo $this->__('Create an Account') ?></button>

but this simply redirects to a normal registering page that doesn't include the already provided e-mail. How can I do in order for the e-mail to be included automatically in my registering form?

I guess that there is some method in Magento to retrieve it, but I am new to Magento and don't know which are the available methods.

Any help will be much appreciated.


texts:
I've started learning and at the same time writing tests for my Magento 2 custom development. Not a ride in the park. It feels like digging a pit in the sand sometimes. I got to the point where I need to test something like:

$payment->setPaymentReminderSendStatus(true)->save();

Writing something like below won't work.

$this->orderPaymentMockSend->expects($this->once())
    ->method('setPaymentReminderSendStatus')
    ->with($paymentReminderSentStatus)
    ->willReturnSelf()
;

It will fail with the message: Trying to configure method setPaymentReminderSendStatus which cannot be configured because it does not exist, has not been specified, is final, or is static, which is true because the setters and getters are handled by \Magento\Framework\DataObject::__call magic method.

A colleague suggested mocking the payment object like below, but to me it feels a bit like hardcoding.

$this->orderPaymentMockSend = $this->getMockBuilder(Payment::class)
    ->disableOriginalConstructor()
    ->setMethods(['setPaymentReminderSendStatus'])
    ->getMock()
;

I'm also looking at maybe mocking the \Magento\Framework\DataObject object to be able to use the __call method (I don't if this is even possible or if I'm overthinking it).

What would be the best practice in this case?


texts: Magento 2 : Store Switcher In admin not working

texts:
In Magento 2 admin side, I added store switcher in phtml file using this code.

protected function _prepareLayout()
    {
        $this->getToolbar()->addChild(
            'store_switcher',
            'Magento\Backend\Block\Store\Switcher'
        );
        return parent::_prepareLayout();
    }

So above code show store selection in phtml file as below,

When I select diffrent store from the list, then admin URL is change,
but when I access store information in phtml like this $this->_storeManager->getStore()->getCode()

but it always return "default" not selected store code.

Can Any one have idea ?


texts:
Been searching around here but can't seem to find an answer to this.
How do I add currency switcher in navigation menu in mobile view? It's displaying on the header in desktop view. Would like to add into navigation menu in mobile view.


texts: How to get order data + customer data after successful order in magento 2

texts:
I have created new extension to get data after successful order in magento 2.

I have created below files.

Narola\Eye4frauds\etc\module.xml
Narola\Eye4frauds\registration.php
Narola\Eye4frauds\etc\events.xml
Narola\Eye4frauds\Observer\Checkout\OnepageControllerSuccessAction.php

Here is my events.xml

   <?xml version="1.0"?>
      <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
          <event name="sales_order_place_after">
              <observer instance="Narola\Eye4frauds\Observer\Checkout\OnepageControllerSuccessAction"  name="Narola_Eye4frauds_observer_checkout_onepagecontrollersuccessaction_sales_order_place_after"/>
          </event>
      </config>

here is my OnepageControllerSuccessAction.php file

namespace Narola\Eye4frauds\Observer\Checkout;
  class OnepageControllerSuccessAction implements
   \Magento\Framework\Event\ObserverInterface
  {
public function __construct(\Magento\Sales\Model\Order $order)
{
    $this->order = $order;
}
public function execute(\Magento\Framework\Event\Observer $observer)
{
    $orderids = $observer->getEvent()->getOrderIds();

    echo "<pre>";       var_dump($orderids);        echo "</pre>";      die;

    try {
        foreach ($orderids as $orderid) {
            $order = $this->order->load($orderid);
            $order->hold();
            $order->save();
        }
    } catch (\Magento\Framework\Exception\LocalizedException $e) {
        // Error logic
    } catch (\Exception $e) {
        // Generic error logic
    }
  }
}

here I have printed var_dump($orderids);
but it does not display. This file is not called.
Did I make any mistake?


texts: Can't see my widget name in admin dropdown

texts:
I am learning about widgets through this link. I have done everything as mentioned in that link but still I can't see my widget in admin panel..

I observed some error logs in var/log/system.log file which are as follows:

  2013-10-03T06:56:53+00:00 ERR (3): Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : XML declaration allowed only at the start of the document  in C:\xampp\htdocs\magento\lib\Varien\Simplexml\Config.php on line 510
  2013-10-03T06:56:53+00:00 ERR (3): Warning: simplexml_load_string() [function.simplexml-load-string]:  <?xml version="1.0"?>  in C:\xampp\htdocs\magento\lib\Varien\Simplexml\Config.php on line 510
  2013-10-03T06:56:53+00:00 ERR (3): Warning: simplexml_load_string() [function.simplexml-load-string]:       ^  in C:\xampp\htdocs\magento\lib\Varien\Simplexml\Config.php on line 510

The above log lines are repeated many times.

As instructed, I am trying to see my widget in :

CMS > Pages > select "home" > go to "content" tab > press "insert widget" in WYSIWYG editor.

Here is the screenshot


texts: Show static image on category if no category banner uploaded

texts:
I have the following code that displays my category banner image:

          <?php
            $_helper    = $this->helper('catalog/output');
            $_category  = Mage::registry('current_category');
            $_imgHtml   = '';
            if ($_imgUrl = $_category->getImageUrl()) {
                $_imgHtml = '
escapeHtml($_category->getName()).'" title="'.$this->escapeHtml($_category->getName()).'" />
';
                $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image');
            }
            ?>

          <?php if($_imgUrl): ?>
          <?php echo $_imgHtml ?>
          <?php endif; ?>

I'd like to adapt the code, so that if no category banner exists an alternative banner is displayed. The alternative banner is stored in a static block called 'alternative_cat_banner'.

Can anyone suggest an edit to the code above to achieve this please?


texts: Magento2 Unable to save custom category attribute

texts:
I want a custom category attribute for my categories, so I have created a module with all the necessary files and code, in admin, I am able to see the custom field but when I am trying to save it the value doesn't save. For reference I am pasting my code, please suggest me where I am getting wrong or missing something.

  /app/code/Belong/Categoryattrs/Setup/InstallData.php

namespace Belong\Categoryattrs\Setup;

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

class InstallData implements InstallDataInterface
{

private $eavSetupFactory;

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

public function install(
    ModuleDataSetupInterface $setup,
    ModuleContextInterface $context
)
{
    $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

    $eavSetup->addAttribute(
        \Magento\Catalog\Model\Category::ENTITY,
        'alfasi_category_id',
        [
            'type'         => 'varchar',
            'label'        => 'Alfasi Category Id',
            'input'        => 'text',
            'sort_order'   => 100,
            'source'       => '',
            'global'       => 1,
            'visible'      => true,
            'required'     => false,
            'user_defined' => false,
            'default'      => null,
            'group'        => '',
            'backend'      => ''
        ]
    );
}

}

  app/code/Belong/Categoryattrs/view/adminhtml/ui_component/category_form.xml

    <?xml version="1.0" ?>
    <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
        <fieldset name="general">
            <field name="alfasi_category_id">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="required" xsi:type="boolean">true</item>
                        <item name="validation" xsi:type="array">
                            <item name="required-entry" xsi:type="boolean">false</item>
                        </item>
                        <item name="sortOrder" xsi:type="number">333</item>
                        <item name="dataType" xsi:type="string">string</item>
                        <item name="formElement" xsi:type="string">input</item>
                        <item name="label" translate="true" xsi:type="string">Alfasi Category Id</item>
                    </item>
                </argument>
            </field>
        </fieldset>
    </form>


texts: Magento 2.1 Changing review list position in product page

texts:
I am building a custom theme in magento2.1. In product details page, I need to show customer review list after the review form. By default the list of recent reviews will come first in tab panel followed by review form. I need to show review form first. I have copied
 vendor/magento/module-review/view/frontend/layout/catalog_product_view.xml

and pasted in

app/design/frontend/custom/theme/Magento_Review/layout/catalog_product_view.xml

and added

<referenceBlock element="product.info.product_additional_data" after="product.review.form"/>

before closing the body tag. But not affecting in my site. Am I doing right? Can any one please help me?


texts: Magento2: Benefits of using UI Cmponents in Frontend

texts:
I am Working on developing a new extension, I need to know What are the benefits have while using UI components in storefront.

I have Searched about Magento 2 UI Components Using in Storefront. I think Customer_form only used UI Components Using in Storefront.

vendor/magento/module-customer/view/base/ui_component/customer_form.xml this used in Checkout Page.

But, Magento2 used More Forms, Like

Customer Register
Login
contact us
Search  and advanced Search form
Quantity Update.,,,,

Its all have Normal forms. So, Suggest Me What are the Benefits have using UI Components in Storefront.


texts: How can I solve product attribute reindex error: "Allowed memory size of ... bytes exhausted"?

texts: When i try to reindex, I got error like this:


texts: magento 2.4.1 not saving product positon on index table

texts:
When I change the position of the products in the category panel, I don't get any errors (not even in the re-indexing process).
However, in the table
"catalog_category_product_index_store1"
the "position" column remains at the value "0".
I tried to disable some extensions but the result doesn't change.
In the logs I have no trace of errors or exceptions.
Any ideas for me?


texts: How order magento 2 EE customer custom attributes?

texts:
I'm using magento 2.1.7 EE and customer custom attributes creation in built, so I have added three attributes customer_title, customer_type and industry_type

So I want to display all three categories separately in my desired places. Still didn't find a way to show it.

Following section shows the all customer custom attributes together.

<?php $customerAttributes = $block->getChildBlock('customer_form_user_attributes'); ?>
<?php if ($customerAttributes): ?>
<?php $customerAttributes->setEntityType('customer')->setShowContainer(false);?>
<?php $block->restoreSessionData($customerAttributes->getMetadataForm());?>
<?php echo $customerAttributes->toHtml()?>
<?php endif;?>

Need help.


texts:
I'm receiving these errors in the magento connect/update panel

 Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /home/cleverop/public_html/lib/Zend/Db/Statement/Pdo.php:228 Stack trace:
#0 /home/cleverop/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/cleverop/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/cleverop/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/cleverop/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#4 /home/cleverop/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `mg_core...', Array)
#5 /home/cleverop/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `mg_core...', Array)
#6 /home/cleverop/public_html/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Arr in /home/cleverop/public_html/lib/Zend/Db/Statement/Pdo.php on line 235

I have no idea where they came from.


texts: How can I reduce the size of the picture onthe detailed product page on Magento Go?

texts:
I'm preparing a store on Magento Go to sell products for which the picture is not really significant. I thus would like to reduce its size on the product view, detailed information beeing inserted in the descritpion.
I'm currently using a standard theme.
Is it possible to define the size of the picture displayed, and how?
Or maybe some particular themes are already made to display small view and not large picture?
Does anyone have any idea?
Thanks?


texts: If the costumer can get free shipping, it should be autoselected. Is there an easy way to do it?  Thank you.


texts:
Can anyone give me solution for these warnings.

  Model LSD method load() detected in loop

$item = Mage::getModel('catalog/product')->load($item->getProductId());

  Data load getFirstItem() method detected in loop

$attribute=Mage::getResourceModel('eav/entity_attribute_collection')->addFieldToFilter('attribute_id', $data['attribute_id'])->getFirstItem();

  Array size calculation function count() detected in loop

$pidsCount=count($pids);


texts: Best way to store a setting value for a custom extension

texts:
Excuse me for the title as I can't find the best way to express the question correctly.

I'm developing an extension and apart from the tables with data that I've already created I need to store and access a singe value.
In my case this value is a time-stamp of the last sync I did with some external data source.

What is the best way to store this value? Should it be a custom variable, a hidden config value, should I create a table just to store this value, should I add a field to every entry keeping last sync date or is there any other way that I miss?

Please if you see the relevance of the question but think the title is misleading give me an idea of a better title to change it.

Thank you


texts: magento2 how to update tier price programmatically, including value type?

texts:
I am able add tier prices using csv

$this->tierPrice->add($sku, $customerGroupId, $price, $qty);

but it is taking "value_type" as Fixed , i want to dynamically give the value for "value_type"