You are here:  » Echo productname in pricesexternal

Support Forum



Echo productname in pricesexternal

Submitted by redspark on Thu, 2010-08-05 20:32 in

Hi David

I'm trying to echo the product name into the "q" variabable for getting the external prices. This echo $_helper->productAttribute($_product, $_product->getName(), name') the correct product name. But i cant seem to get it in the "q". I have tried every possible way. I get either a parse error or nothing in return. Do you know what i am doing wrong?

<?php
  $common_baseHREF 
"http://localhost/example/shop/";
  
$common_path "http://localhost/example/shop/";
  
$_GET["q"] = "product name";
my try->
  
$_GET["q"] = "echo $_helper->productAttribute($_product$_product->getName(), name')";
  require(
$common_path."pricesExternal.php");
?>

The baseHREF en common path are in the real script correct, when i put in the productname directly it works, but i want to make it dynamicly.

regards,
B

Submitted by support on Fri, 2010-08-06 04:19

Hi B,

As it is a variable you should be able to assign it directly - have a go with:

$_GET["q"] = $_helper->productAttribute($_product, $_product->getName(), name');

Cheers,
David.