Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Referencing Product Name in Custome Text

Referencing Product Name in Custome Text

Views: 461

Results 1 to 2 of 2
30 May 2012, 10:26 AM
#1
abcdhello avatar

abcdhello

New Zenner

Join Date:
May 2012
Posts:
1
Plugin Contributions:
0

Referencing Product Name in Custome Text

Hey Zen Cart Peoples,

So far the forum has been a big help in referencing things like users name (first and last) but I can't find anything about the session variables for the product names that are in the cart. I would like to change the checkout success page to include, in the text I can change through the admin define pages editor, the name of the product. From there I'll figure out how to add a certain sentence or two afterwards based on the product.

So far the check out success. I put the variable in parenthesis. It says:

Congrats...

(Month Day, Year)

Thanks (First Name)


Now I would like it to say:

Thank you for buying (product name 1). I hope it helps you (some text from product 1's description).


Here's what I got so far in code:

<?php echo date("M j, Y"); ?> </p> <p> <?php

echo $_SESSION['customer_first_name'];
echo $name;

/**

?>

I can't figure out how to call that. Is it because it's not stored in cookies but in the database? Can someone please provide the variable name and/or method I need to call to get the name of the products that were purchased? Code would be nice :)

Much appreciated!

5 Jun 2012, 1:27 AM
#2
ohandy1 avatar

ohandy1

New Zenner

Join Date:
Aug 2011
Location:
Florida
Posts:
5
Plugin Contributions:
0

Re: Referencing Product Name in Custome Text

I'm working on much the same thing. I want to personalize the success page and then the receipt email but having trouble locating the variables, or making anything work. I've been using this thread as a starting point but the variables simply print. i'm no php programmer, i know enough to tweak and this one is stretching my comfort zone.
http://www.zen-cart.com/showthread.php?106519-How-to-display-variable-in-define-pages&highlight=php+variables+define+pages