0

I've created this page on frontend.

enter image description here

I want input field fills with values product based on product id.

I have blank controller. How can I update product attribute in this form trough my controller and my .phtml file.

2
  • provide your block controller and template file Commented Feb 28, 2017 at 9:05
  • still blank for all @GopalPatel Commented Feb 28, 2017 at 9:09

1 Answer 1

0

You can try this:

In your controller you can load that product using

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

and then pass that product object to your phtml file using register i.e

Mage::register('product', $product->getData());

then in phtml get that product object using

$product_data = Mage::registry('product');

then you will get the product data in form of array.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.