Post by linktraba » Wed Jan 29, 2014 12:06 am

Hello, does anyone know please tell how to display the ID of the product that I'm accessing to edit it:
In the file: admin \ view \ template \ catalog \ product_form.tpl
The product name got put thus:

<? php echo isset ($ product_description [$ language ['language_id']])? $ product_description [$ language ['language_id']] ['name']:; '('. $ model. ')' echo'';>?

The ID tried this:
<? php echo $ product ['product_id'];>

<php echo $ product_id;?>

But it is giving error:
Notice: Undefined variable: product in

I tried selecting the table and display the Product ID, also without success:

Code: Select all

<? 
 $sql = mysql_query("SELECT * FROM oc_product_to_store WHERE product_id= '$linha[product_id]'");
 $linha =  mysql_fetch_array($sql);?>
?>
<?echo $linha['product_id'];?>
I would also display the url from my shop on this page, is it possible?
http://www.mystore.com.br

But for that to happen automatically with the variable that has the display function:
<php echo $ store ['url'];?>

Thank you for listening.

Newbie

Posts

Joined
Mon Nov 04, 2013 12:27 am

Post by MarketInSG » Wed Jan 29, 2014 1:23 am

$this->request->get['product_id'] can pull the product ID off from the URL if it exist. But be careful how you're applying it


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by linktraba » Wed Jan 29, 2014 3:12 am

Excuse the question, but what arquvo have to put the command now?

How can I list the product ID I'm Accessing the product_form.tpl

Could you please inform how would the full command?

Thanks for responding

Newbie

Posts

Joined
Mon Nov 04, 2013 12:27 am

Post by MarketInSG » Wed Jan 29, 2014 10:54 pm

I would reckon you read up on some basic PHP and learn more about a get request first before proceeding. That was literally the answer


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore
Who is online

Users browsing this forum: No registered users and 11 guests