Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Help adding a <br> tag in a php file for listed products

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-20-2008, 07:20 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default Help adding a <br> tag in a php file for listed products

Currently I have this code in my php file:
$giftcert["message"] = "".func_get_langvar_by_name("txt_message").":\n".$ product_line;

and it currently will display something like this in the email notification:
ex. You purchased: Coffee maker E37 Dodgers 07 Baseball Cap Graphic Tee Mens


(BUT)

I would like to have a <br> tag added with each product that is listed, see example below:
ex.
You purchased:
Coffee maker E37
Dodgers 07 Baseball Cap
Graphic Tee Mens


Can someone help me out? If its easier to add a COMMA between products that would be fine for me to.
ex. You purchased: Coffee maker E37, Dodgers 07 Baseball Cap, Graphic Tee Mens
Reply With Quote
  #2  
Old 03-21-2008, 01:33 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: Help adding a <br> tag in a php file for listed products

Quote:
Originally Posted by mmoskva
Currently I have this code in my php file:
$giftcert["message"] = "".func_get_langvar_by_name("txt_message").":\n".$ product_line;

and it currently will display something like this in the email notification:
ex. You purchased: Coffee maker E37 Dodgers 07 Baseball Cap Graphic Tee Mens


(BUT)

I would like to have a <br> tag added with each product that is listed, see example below:
ex.
You purchased:
Coffee maker E37
Dodgers 07 Baseball Cap
Graphic Tee Mens


Can someone help me out? If its easier to add a COMMA between products that would be fine for me to.
ex. You purchased: Coffee maker E37, Dodgers 07 Baseball Cap, Graphic Tee Mens

Before that line should be where the cycle would read something like:
PHP Code:
$product_line . = ...some variable

change this line, add one <br> tag - ."<br>";

PHP Code:
$product_line . = ...some variable."<br>"
Reply With Quote
  #3  
Old 03-22-2008, 08:47 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default Re: Help adding a <br> tag in a php file for listed products

Thank you it worked perfict.

- I have another question if i wanted this change to display only on the customer-end, could you help me out w/ the (ie. if, else) statement that i should include.
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #4  
Old 03-24-2008, 12:16 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: Help adding a <br> tag in a php file for listed products

Quote:
Originally Posted by mmoskva
Thank you it worked perfict.

- I have another question if i wanted this change to display only on the customer-end, could you help me out w/ the (ie. if, else) statement that i should include.

Explain to me what is - "customer-end"?
Checkout, confirmation page or ...?
Reply With Quote
  #5  
Old 03-24-2008, 05:43 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default Re: Help adding a <br> tag in a php file for listed products

When i am using tpl files if i want to display something in a particular way for customers to see VS admin/provider users etc.. i would apply something like the below.

example.

"C" means customer-end users:

{if $usertype eq "C"}
<FONT class="DetailsTitle">{$lng.txt_header}</FONT>
{else}
{$lng.txt_header}
{/if}



Q. how do i write this IF,ELSE statement but in php with the below example.

$product_line .= "\n".$product['product'].' #'.$product['productid']."<BR></BR>";
Reply With Quote
  #6  
Old 03-25-2008, 12:15 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: Help adding a <br> tag in a php file for listed products

Example for customer or affiliate.

PHP Code:
if ($current_area == "C" || $current_area == "B") {
{


Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:42 AM.

   

 
X-Cart forums © 2001-2020