Zen Cart Logo
Forums / General Questions / Need help with PHP...Please...

Need help with PHP...Please...

Locked

Views: 915

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
10 Mar 2007, 8:45 PM
#1
zenrajan avatar

zenrajan

New Zenner

Join Date:
Apr 2005
Posts:
53
Plugin Contributions:
0

Need help with PHP...Please...

I was changing the order confirmation email so that I could enter Item number against each Items. Here is what I mean. The existing email order confirmation looks like this -

Products

1 x Cotton Short Sleeve = $17.00
Color : White
Size : Small
Print Layout : Front Only
1 x Cotton Short Sleeve = $17.00
Color : White
Size : Small
Print Layout : Front Only

I wan to change it to something like this -

Products

Item # 1
1 x Cotton Short Sleeve = $17.00
Color : White
Size : Small
Print Layout : Front Only

Item # 2
1 x Cotton Short Sleeve = $17.00
Color : White
Size : Small
Print Layout : Front Only

The line that I have identified is in /includes/classes/orders.php (// build output for email notification)

// $this->products_ordered .= $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' = ' .

I have changed it to :

$this->products_ordered .= 'Item # ' . $i . "\n" . $this->products[$i]['qty'] . ' x ' . $this->products[$i]['name'] . ($this->products[$i]['model'] != '' ? ' (' . $this->products[$i]['model'] . ') ' : '') . ' = ' .

But I cant get the $i to increment. I tried changing $i to $++i but that gives a parse error. I am a little new to PHP, so

  1. Am I changing the right piece of code to achieve the above
  2. If so how do I increment the value of $i

Thanks a lot !

11 Mar 2007, 2:43 AM
#2
zenrajan avatar

zenrajan

New Zenner

Join Date:
Apr 2005
Posts:
53
Plugin Contributions:
0

Re: Need help with PHP...Please...

Dont worry, solved it....