Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22
  1. #11
    Join Date
    Aug 2010
    Location
    Israel
    Posts
    285
    Plugin Contributions
    0

    Default Re: How do I add a product attribute name and value to the order confirmation email

    Hi lat9
    I do not remember I made any changes to order.php file.

    I replaced the code with yours but that did not change anything...
    Then I changed the attribute value from Hebrew the English...
    but still got the strange letters/numbers attribute description.
    The interesting thing is that the letters/numbers of the same attribute value is not
    the same letters/numbers of the same attribute value of other product.
    What could this means?
    I use "dropdown" attribute.

    Another interesting thing - all above is a part of Shipping_By_Quote module
    meaning to say that the email that is sent by the customer is not a complete order
    but a step before the order when the customer is asking for a shipping quote.
    So now I continued to the final order stage (with Request for quote module) and the order by
    email arrived good! (with the English attribute value).
    So....what does it means?
    Do you have any idea why in the first email it is with letters/numbers but in the final order
    email it is ok?

  2. #12
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: How do I add a product attribute name and value to the order confirmation email

    I've just looked at the Shipping by Quote module (v2.3, the latest), but I don't see where it is gathering the product attributes information for the email message.

  3. #13
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: How do I add a product attribute name and value to the order confirmation email

    The full text information, ie. #254:e644e250cbc7557651e1dc4ad7d8f3ab is the non-sanitized products_id. Normally to provide just the products_id, the line of code would either be:
    Code:
    (int)products_id
    or the more preferred ZC:
    Code:
    zen_get_prid($products_id)
    Based on the other review, the fact that the attributes are not "reviewed" means that if an order contained more than one of the same base product, the attribute detail would not be provided and therefore if two or more of the same base product are ordered there is not a legible distinction presented (if modified to only give the sanitized products_id then would see a single number, if left as is, then see a string of text that doesn't mean anything to the human reader other than that there are attributes related to the product for those that know about that detail.)

    So, seems a few options: either leave as is, modify to show just the products_id's number, or incorporate additional code to either breakdown or pull out of the database the detail of the attributes for that portion of the email process.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #14
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: How do I add a product attribute name and value to the order confirmation email

    Quote Originally Posted by mc12345678 View Post
    The full text information, ie. #254:e644e250cbc7557651e1dc4ad7d8f3ab is the non-sanitized products_id. Normally to provide just the products_id, the line of code would either be:
    Code:
    (int)products_id
    or the more preferred ZC:
    Code:
    zen_get_prid($products_id)
    Based on the other review, the fact that the attributes are not "reviewed" means that if an order contained more than one of the same base product, the attribute detail would not be provided and therefore if two or more of the same base product are ordered there is not a legible distinction presented (if modified to only give the sanitized products_id then would see a single number, if left as is, then see a string of text that doesn't mean anything to the human reader other than that there are attributes related to the product for those that know about that detail.)

    So, seems a few options: either leave as is, modify to show just the products_id's number, or incorporate additional code to either breakdown or pull out of the database the detail of the attributes for that portion of the email process.
    Sorry, just noticed a typing error in the first set of code:
    Code:
    (int)$products_id
    is how that should read as I missed a dollar sign ($).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #15
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: How do I add a product attribute name and value to the order confirmation email

    Thanks for that, mc12345678. Sometimes I can't see the forest for the trees.

  6. #16
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: How do I add a product attribute name and value to the order confirmation email

    Quote Originally Posted by lat9 View Post
    Thanks for that, mc12345678. Sometimes I can't see the forest for the trees.
    I thought it (explanation I provided) was possibly "between the lines" and I wanted to get it out in the open. The review for attribute handling (lack of by the plugin) sorta sealed the deal.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #17
    Join Date
    Aug 2010
    Location
    Israel
    Posts
    285
    Plugin Contributions
    0

    Default Re: How do I add a product attribute name and value to the order confirmation email

    Thanks mc12345678 and lat9.
    I think I will leave it as is.

  8. #18
    Join Date
    Jun 2015
    Location
    Austin
    Posts
    8
    Plugin Contributions
    0

    Default Re: How do I add a product attribute name and value to the order confirmation email

    Hello @lat9 and friends,

    I am also struggling a bit with the attribute details in the confirmation email.

    I am trying to modify the order confirmation email (for purposes of customers and the admin's copy of the email) to include the attribute item price (the rate per each attribute option) beside the name of it.

    Right now, the email shows the list of selected attribute option names and quantities, but no price is listed - it only shows the subtotal. The customers and wholesalers really want to see the item price to do their checking against all the subtotals.

    This is the format it has right now:

    22 x Keep Austin Weird Shirt (5846TSHB) = $176.00
    Small 5
    Medium 3
    Large 7
    X-Large 7


    But this is what we want to update it to show:

    22 x Keep Austin Weird Shirt (5846TSHB) = $176.00
    Small 5 at $x each
    Medium 3 at $x each
    Large 7 at $x each
    X-Large 7 at $x each


    ----

    Currently as pointed out previously in this thread, on line 844 the includes/classes/order.php reads:
    $this->products_ordered_attributes .= "\n\t" . $attributes_values->fields['products_options_name'] . ' ' .

    Can I just modify this line to be:

    $this->products_ordered_attributes .= "\n\t" . $attributes_values->fields['products_options_name','options_values_price'] . ' ' .

    Will this work or break something? Or will I need to look at more steps?

  9. #19
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: How do I add a product attribute name and value to the order confirmation email

    Quote Originally Posted by Jac Web View Post
    Hello @lat9 and friends,

    I am also struggling a bit with the attribute details in the confirmation email.

    I am trying to modify the order confirmation email (for purposes of customers and the admin's copy of the email) to include the attribute item price (the rate per each attribute option) beside the name of it.

    Right now, the email shows the list of selected attribute option names and quantities, but no price is listed - it only shows the subtotal. The customers and wholesalers really want to see the item price to do their checking against all the subtotals.

    This is the format it has right now:

    22 x Keep Austin Weird Shirt (5846TSHB) = $176.00
    Small 5
    Medium 3
    Large 7
    X-Large 7


    But this is what we want to update it to show:

    22 x Keep Austin Weird Shirt (5846TSHB) = $176.00
    Small 5 at $x each
    Medium 3 at $x each
    Large 7 at $x each
    X-Large 7 at $x each


    ----

    Currently as pointed out previously in this thread, on line 844 the includes/classes/order.php reads:
    $this->products_ordered_attributes .= "\n\t" . $attributes_values->fields['products_options_name'] . ' ' .

    Can I just modify this line to be:

    $this->products_ordered_attributes .= "\n\t" . $attributes_values->fields['products_options_name','options_values_price'] . ' ' .

    Will this work or break something? Or will I need to look at more steps?
    Oddly the numbers to the right of each attribute added together and multiplied by 8 gives the current total. Any ways, the code as written would cause an error, but assuming that your product is priced by attributes then something similar would/could work.

    Code:
    $this->products_ordered_attributes .= "\n\t" . $attributes_values->fields['products_options_name'] . ' ' . $attributes_values->fields['options_values_price'] . ' '
    Though you will probably want some other language based text to give the per attribute of product price.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #20
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: How do I add a product attribute name and value to the order confirmation email

    @Jac Web, since that processing is present within a core-file (/includes/classes/order.php), you'll save yourself a world-of-hurts if you make those changes using an observer-class handler that augments/changes the built-in order-handling without actually changing the base order.php file.

    What version of Zen Cart is your store currently built on?

    P.S. I've got one of those "Keep Austin Weird" shirts!

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v155 Add company name to order confirmation email
    By Ryder in forum General Questions
    Replies: 5
    Last Post: 17 Aug 2016, 01:13 AM
  2. Duplicate Item Name / Product name repeat Order Confirmation Email
    By jsarwar in forum Managing Customers and Orders
    Replies: 3
    Last Post: 21 Nov 2014, 02:57 PM
  3. I would like to add the Product photo to the email Order Confirmation
    By touchclothing in forum General Questions
    Replies: 0
    Last Post: 1 Sep 2009, 10:55 PM
  4. How do I add attribute settings with $ value to categories and not just 1 product
    By 24hourDomainer in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 29 Jul 2009, 12:17 AM
  5. Replies: 0
    Last Post: 28 Feb 2008, 03:42 PM

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