Needs work
Project:
Commerce Point of Sale (POS)
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Apr 2017 at 20:44 UTC
Updated:
22 Jan 2018 at 13:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sorabh.v6Comment #3
sorabh.v6Hi, this patch contains the work. Price is removed from the receipt and gift receipt text is added in the footer. Please review.
Thanks
Comment #4
sorabh.v6Comment #5
smccabe commented@sorabh.v6 patch looks good at first glance, can you roll it for 8.x first. I'd like to do any new functionality in 8 first and backport to 7.
Note: this issue was flipped to 8.x, flip back to 7.x once 8.x is committed.
Comment #6
sorabh.v6@smccabe Sure, I will create the patch for 8.x also.
Comment #7
sorabh.v6Patch uploaded for 8.x
Please review.
Comment #8
subhojit777As best practice, services should be loaded via dependency injection. Sources: https://docs.acquia.com/articles/drupal-8-dependency-injection, https://www.drupal.org/docs/8/api/services-and-dependency-injection/serv...
String translation missing.
$gift_ordercan be defaulted above. Then we won't need this `else` statement.$this->entity->setData('gift_order', $form_state->getValue('gift_order'))maybe?I will work on them.
Comment #9
subhojit777Sorry some important work came up.
Comment #10
subhojit777Comment #11
subhojit777Patch rerolled
Comment #12
subhojit777Comment #13
subhojit777:face palm:
Comment #14
subhojit777Comment #15
subhojit777if ($adjustment)?The concatenated string is not translated.
Comment #16
subhojit777Stepping out for a while. Not yet started #15
Comment #17
alexpottRather than chucking markup in here how about passing the order to the template and putting as much markup as possible in the template.
Do we want to store this information in the dumping ground that is the data field or should we store this in its own field? I can see arguments for both. I guess this fits into
Used to store temporary data during order processing (i.e. checkout).Comment #18
subhojit777Comment #19
subhojit777Added some changes as suggested by Alex #17. Not complete though. #15 still needs to be done.
Comment #20
subhojit777Comment #21
subhojit777Still not complete.
Comment #22
subhojit777And also when I wanted to print the receipt, it didn't work it says `/ajax-receipt` 404 not found.
Comment #23
alexpott@subhojit777 I don't think the Show receipt action works at the moment - it only seems to work directly from the POSForm.
Comment #24
subhojit777Comment #25
subhojit777@alexpott Yes I was talking about the POSForm. You select Print and click Complete Order and you get an error in the console.

Comment #26
subhojit777Partially fixed the problem as mentioned in #22
Comment #27
subhojit777This is just a workaround.
getCompletedTimewill never be obtained unless the order is completed. And that is not going to happen due to this #2935353-5: Site error during "Show receipt" operationComment #28
subhojit777I checked Drupal 7. Couldn't find this "gift order" functionality. I have changed the date in receipt to order creation time. The changes also includes fix suggestions on #15.
Re #17:
I think associating
gift_orderwith the entity should be better. For future reference. Suppose we need to create a view and would want to list whether the POS order was a gift order, then this would help.Comment #29
shabana.navas commentedJust a few UI recommendations.
Right now the heading looks like this: Order# 32224. I believe it should look like this: Order #121314.
I totally missed this underneath the order items fieldset. Would this be better placed in the right column next underneath the totals columns and just above the 'Payments and Completion' button?
Comment #30
shabana.navas commentedComment #31
subhojit777Comment #32
subhojit777The cart checkbox appears after "Adustments" fieldset, and it is also not much visible.
Comment #33
subhojit777Do we have to add tests here?
Comment #34
alexpott@subhojit777 whilst jQuery.print is a mandatory requirement and not a progressive enhancement tests for receipt functionality are awkward at best.
Comment #35
alexpottAre we sure that we want the order ID wrapped in
<em class="placeholder">ID</em>. I think that maybe we should just print the order.id here without passing to the placeholder twig filter.I might be missing something but what is the reason for this change? In general passing by reference and using that to affect change is harder to reflect on than just doing return values.