Zen Cart Logo
Forums / General Questions / Help with $products_name

Help with $products_name

Locked

Views: 615

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
23 Jun 2009, 6:10 PM
#1
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Help with $products_name

OK guys, someone please help me out here as I've been struggling with this code for ages now. I'm working on a code that uploads my products to Twitter and I want it to post the products name followed by the products_price and finally the tiny url.... every time I add a product to the site.

The Code I'm using is working for the price and the tiny url but I cannot for the life of me get the products name to display... what $ must I use for it to display the products name because $products_name just will not work!! I've tried $products_name, $productname and $ProductName but just cannot get it to display...

$message = $products_name . ' £' . $products_price . ' ' . $tinyPurl;

Can anyone help please??

23 Jun 2009, 8:27 PM
#2
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Help with $products_name

$products_name seems to be the correct variable . now i don't know what script you are using . but question is this .
dose that script has sql command to query database for product info that you wish to upload to twitter ? if so , dose it look for products name ? if there is sql command in the script , chance are is not retrieving products name from table.

24 Jun 2009, 7:04 AM
#3
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Help with $products_name

Hi Tony,

Thanks for the reply... I should have updated this as I found the answer. The problem with the product name is that it is language dependant. So there is no simple variable holding it.

However I accessed the name in the default language using:

**$_POST['products_name'][$_SESSION['languages_id']] **

Now, works a treat... All my new products are uploading to Twitter as soon as they're activated.... It adds the product name, the price and then the tiny URL. Perfecto!

24 Jun 2009, 10:11 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Help with $products_name

limelites:

Thanks for the reply... I should have updated this as I found the answer.
MODERATOR NOTE: You wouldn't have to keep track of so many separate threads if you kept all your related questions in just one thread in the first place.
Instead, you have multiple disjointed questions related to the same topic sitting in multiple places. 4 separate discussions on the same topic at the present time.
That's why double-posting the same thing in several places is discouraged.
It makes it hard on people who are looking for answers and don't find completed discussions, and also on volunteers who give answers, esp when they've already answered the same question elsewhere.

http://www.zen-cart.com/forum/faq.php