Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2007
    Posts
    31
    Plugin Contributions
    0

    help question Replace "model" with "id" on confirmation email

    I want to replace the product model number with the id number on our confirmation emails. We are using 1.3.8. In searching the forum I found the file I need to manipulate and I thought it was as easy as swapping out "model" for "id" in the following code found in /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'] . ') ' : '') . ' = ' .
    $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .
    ($this->products[$i]['onetime_charges'] !=0 ? "\n" . TEXT_ONETIME_CHARGES_EMAIL . $currencies->display_price($this->products[$i]['onetime_charges'], $this->products[$i]['tax'], 1) : '') .
    $this->products_ordered_attributes . "\n";
    $this->products_ordered_html .=
    '<tr>' . "\n" .
    '<td class="product-details" align="right" valign="top" width="30">' . $this->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
    '<td class="product-details" valign="top">' . nl2br($this->products[$i]['name']) . ($this->products[$i]['model'] != '' ? ' (' . nl2br($this->products[$i]['model']) . ') ' : '') . "\n" .
    '<nobr><small><em> '. nl2br($this->products_ordered_attributes) .'</em></small></nobr></td>' . "\n" .
    '<td class="product-details-num" valign="top" align="right">' .
    $currencies->display_price($this->products[$i]['final_price'], $this->products[$i]['tax'], $this->products[$i]['qty']) .
    ($this->products[$i]['onetime_charges'] !=0 ?
    '</td></tr>' . "\n" . '<tr><td class="product-details">' . nl2br(TEXT_ONETIME_CHARGES_EMAIL) . '</td>' . "\n" .
    '<td>' . $currencies->display_price($this->products[$i]['onetime_charges'], $this->products[$i]['tax'], 1) : '') .
    '</td></tr>' . "\n";

    When I substituted model with id the confirmation email came through with the id number, but it also had a very long strand of numbers ( I think it is a dynamic number?)
    Example:
    1 x White Flower Bouquet Greeting Card
    (467:b785de45eaf576fa2936017903ee1323) = $4.45
    Bouquet Tag Message Get Well

    I am clearly an amateur and know it is probably an easy fix, but can't figure it out how to just have the id number "467" appear without the long strand of numbers.

    Any help or advice would be fantastic.
    Thanks,
    mkopecky

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Replace "model" with "id" on confirmation email

    if you're using "$this->products[$i]['id']" for your product ID, a very fast way to drop the attribute-specific hash off the end of the number is to add "(int)" in front of it: "(int)$this->products[$i]['id']"
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2007
    Posts
    31
    Plugin Contributions
    0

    Default Re: Replace "model" with "id" on confirmation email

    That worked. Thanks for the easy hint!

 

 

Similar Threads

  1. Replacing "model" with "part number"
    By enigma666666 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 26 May 2010, 09:52 PM
  2. Table Rate: Replace "0.00" With "FREE"?
    By msmith29063 in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 1 Dec 2008, 04:50 PM
  3. Replies: 3
    Last Post: 3 Jun 2008, 11:41 AM
  4. "Sold out" won't replace "Buy Now"
    By Donnettacb in forum Basic Configuration
    Replies: 22
    Last Post: 15 Nov 2006, 01:27 AM
  5. How do I replace "Zen Cart" with "the patch shop"
    By RKB in forum Basic Configuration
    Replies: 1
    Last Post: 2 Oct 2006, 06:17 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR