Skip to content

Customer Second Display - #2482

Closed
WebShells wants to merge 8 commits into
opensourcepos:masterfrom
WebShells:master
Closed

WebShells wants to merge 8 commits into
opensourcepos:masterfrom
WebShells:master

Conversation

@WebShells

@WebShells WebShells commented Jul 2, 2019 •

Copy link
Copy Markdown
Member

Customer Second Display Feature for dual screen users.
Can be optionally enabled or disabled through configuration general section ( Show Customer Display ).
Duplicating register windows upon click with an interval of 1200ms.
Currently, the header is fully loaded in order to keep the page layout/format.
It's an optional feature and can be helpful for people who would like to show the client a list items currently being added to sale.
#422 #1461 #2411

Secondary Display Feature for Windows User.
Can be optionally enabled or disabled through configuration general section.
@WebShells
WebShells requested review from daN4cat and jekkos July 2, 2019 23:17
@WebShells WebShells self-assigned this Jul 2, 2019
@WebShells WebShells added this to the 3.3.0 milestone Jul 2, 2019
Comment thread application/controllers/Sales.php Resolved
Comment thread application/views/sales/register.php Resolved
Comment thread application/views/sales/register.php Resolved
@@ -0,0 +1,2 @@
INSERT INTO `ospos_app_config` (`key`, `value`) VALUES

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file alone will not work for an upgrade. Also I would set to 0 as default.

@WebShells WebShells Jul 3, 2019 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @daN4cat, i noticed that a php file should be in migration folder, i didnt know if it should be added manually or it's generated by any mean since the file names starts with specific date sequence... Ill double check at night along with other comments and fix it up

@daN4cat

daN4cat commented Jul 3, 2019

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Please see some review feedback.

WebShells and others added 4 commits July 4, 2019 01:17
Disabled by default
Migration File in order to update /insert app_config second display value.
@WebShells
WebShells requested a review from daN4cat July 3, 2019 22:48
@daN4cat daN4cat modified the milestones: 3.3.0, 3.4.0 Jul 6, 2019
@daN4cat

daN4cat commented Jul 6, 2019

Copy link
Copy Markdown
Collaborator

I move this to 3.4.0.
Let's release 3.3.0 as this is non critical.

Comment thread application/controllers/Sales.php Resolved
@andriux1990

Copy link
Copy Markdown
Member

this when we will integrate it

@andriux1990

Copy link
Copy Markdown
Member

this does not work

@WebShells

Copy link
Copy Markdown
Member Author

@andriux1990 this used to work as needed, needs to be updated now. Once we plan to add the feature ill re-work it.

@janab381

Copy link
Copy Markdown

Can I get it to work in Current Release Version? Any Help @WebShells

@odiea

odiea commented Mar 23, 2021

Copy link
Copy Markdown
Collaborator

Probably not because the code is out dated.

@janab381

Copy link
Copy Markdown

I have got it to working by modifying the code and simplifying the second display. The idea is same refresh after every 1200ms.

image

@chunter2

Copy link
Copy Markdown
Contributor

@janab381 Any chance I could try out your code for this?

Thanks

@jekkos jekkos removed this from the 3.4.0 milestone May 31, 2021
@nukerj

nukerj commented Jun 20, 2021

Copy link
Copy Markdown

this does not work

Let's work on this @ andriux1990 let's support this functionality, Friend shares the change we made for different prices by location. I think it is something that OSPOS could use very well

@andriux1990

Copy link
Copy Markdown
Member

this does not work

Let's work on this @ andriux1990 let's support this functionality, Friend shares the change we made for different prices by location. I think it is something that OSPOS could use very wel

this does not work

Let's work on this @ andriux1990 let's support this functionality, Friend shares the change we made for different prices by location. I think it is something that OSPOS could use very well

Hello @nukerj I agree with you, it seems like a good idea

@andriux1990

Copy link
Copy Markdown
Member

The second screen works very well .. it just lacks a little design in the aspect and some ajax

@joshbudu

Copy link
Copy Markdown

@WebShells I think this will be the right time to implement the customer display feature. This is because these dual monitor systems are becoming very common. Will be available to test it when ready.

@cmthai

cmthai commented Dec 3, 2022

Copy link
Copy Markdown

I request permission to modify the file to make it work better and more beautiful.
Untitled3
Untitled1
Untitled2

@joshbudu

joshbudu commented Dec 3, 2022

Copy link
Copy Markdown

I request permission to modify the file to make it work better and more beautiful. Untitled3 Untitled1 Untitled2

I like what I see. Will be nice you share your code for testing

@cmthai

cmthai commented Dec 4, 2022 •

Copy link
Copy Markdown

ver 3.3.8 Edit from the original customer page. Thanks a lot for the advice, I'll give you the second_display.php code.
Untitled66

@joshbudu

joshbudu commented Dec 4, 2022 via email

Copy link
Copy Markdown

@joshbudu

joshbudu commented Dec 4, 2022 via email

Copy link
Copy Markdown

@cmthai

cmthai commented Dec 7, 2022

Copy link
Copy Markdown

ไม่สามารถใช้งานได้ หน้านี้ไม่ทำงาน localhost ไม่สามารถจัดการคำขอนี้ได้ในขณะนี้ HTTP ERROR 500 อาจทำบางสิ่ง ในวันอาทิตย์ 4 ธันวาคม 2022 เวลา 13:46 น. Smart Ways -POS Masters < @.> เขียนว่า:
…
Thank you will try it out!! On Sun, 4 Dec 2022, 09:28 cmthai, @.
> wrote: > Edit from the original customer page. Thanks a lot for the advice, I'll > give you the second_display.php code. > [image: Untitled66] > https://user-images.githubusercontent.com/119729029/205483407-86597bba-264e-4658-b832-c83c07e89f1c.jpg > second_display.zip > https://github.com/opensourcepos/opensourcepos/files/10148175/second_display.zip > > — > Reply to this email directly, view it on GitHub > <#2482 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/A2IZO7LGQJ3FJ3QJTQZA7LTWLRP5DANCNFSM4H5ARMKQ > . > You are receiving this because you commented.Message ID: > @.***> >

Sorry, I didn't provide all the files. I will give you a new one

@cmthai

cmthai commented Dec 7, 2022 via email

Copy link
Copy Markdown

@cmthai

cmthai commented Dec 7, 2022 via email

Copy link
Copy Markdown

@cmthai

cmthai commented Dec 7, 2022

Copy link
Copy Markdown

อย่าละเลยหน้าที่นี้ โดยที่ localhost_เราจะต้องจัดการให้ได้ ซึ่งบางครั้ง HTTP ERROR 500 อาจทำได้มากกว่านี้ ในวันอาทิตย์ที่ 4 ธันวาคม 2565 เวลา 13:46 น. วิธีที่ชาญฉลาด -POS Masters < @ . > วันนั้น:
…
ขอบคุณนะ จะลองดู!! เมื่อ อา. 4 ธ.ค. 2565 09:28 cmthai, _
@**
. **
> เขียน: > แก้ไขจากหน้าลูกค้าเดิม ขอบคุณมากสำหรับคำแนะนำ ฉันจะให้โค้ด second_display.php แก่คุณ > [ภาพ: Untitled66] > https://user-images.githubusercontent.com/119729029/205483407-86597bba-264e-4658-b832-c83c07e89f1c.jpg > second_display.zip > https://github.com/opensourcepos/opensourcepos /files/10148175/second_display.zip> > — > ตอบกลับอีเมลนี้โดยตรง ดูได้ที่ GitHub > < #2482 (ความคิดเห็น) >, > หรือยกเลิกการสมัคร > https://github.com/notifications/unsubscribe-auth/A2IZO7LGQJ3FJ3QJTQZA7LTWLRP5DANCNFSM4H5ARMKQ > > คุณได้รับสิ่งนี้เนื่องจากคุณแสดงความคิดเห็น ID ข้อความ: > @ .***> >

ขออภัย ฉันไม่ได้ให้ไฟล์ทั้งหมด ฉันจะให้คุณใหม่

POS.zip

@cmthai

cmthai commented Dec 7, 2022

Copy link
Copy Markdown

อย่าลืมทำตามหน้าที่นี้_ซึ่ง localhost_ เราจะต้องจัดการให้ได้ ซึ่งในบางครั้ง HTTP ERROR 500 สามารถเกิดขึ้นได้ในวันอาทิตย์ที่ 4 ธันวาคม 2565 เวลา 13:46 น. สิ่งที่ได้จาก -POS Masters < @ . > ข้างบน:
…
ขอบคุณนะ จะลองดู!! เมื่อ อา. 4 ธ.ค. 2565 09:28 ซม.ไทย, _
@**
. _ >เขียน: > การแก้ไขจากหน้าลูกค้าเดิมสำหรับคำแนะนำที่จะให้โค้ด second_display.php เก่าคุณ > [ภาพ: Untitled66] > https://user-images.githubusercontent.com/119729029/205483407-86597bba- 264e-4658-b832-c83c07e89f1c.jpg > second_display.zip > https://github.com/opensourcepos/opensourcepos /files/10148175/second_display.zip > > — > อย่าลืมส่งอีเมลนี้โดยตรงดูได้ที่ GitHub > <>, > หรือต้องการสมัคร > https://github.com/notifications/unsubscribe-auth/A2IZO7LGQJ3FJ3QJTQZA7LTWLRP5DANCNFSM4H5ARMKQ > > สิ่งเหล่านี้เกิดขึ้นเนื่องจากคุณตอบกลับ ID กรด: > _@
Untitled
_ .*> >

ขออภัยสำหรับการบันทึกทั้งหมดฉันจะให้คุณใหม่

POS.zip

@joshbudu

joshbudu commented Dec 8, 2022

Copy link
Copy Markdown

อย่าลืมทำตามหน้าที่นี้_ซึ่ง localhost_ เราจะต้องจัดการให้ได้ ซึ่งในบางครั้ง HTTP ERROR 500 สามารถเกิดขึ้นได้ในวันอาทิตย์ที่ 4 ธันวาคม 2565 เวลา 13:46 น. สิ่งที่ได้จาก -POS Masters < @ . > ข้างบน:
…
ขอบคุณนะ จะลองดู!! เมื่อ อา. 4 ธ.ค. 2565 09:28 ซม.ไทย, _
@**
. _ >เขียน: > การแก้ไขจากหน้าลูกค้าเดิมสำหรับคำแนะนำที่จะให้โค้ด second_display.php เก่าคุณ > [ภาพ: Untitled66] > https://user-images.githubusercontent.com/119729029/205483407-86597bba- 264e-4658-b832-c83c07e89f1c.jpg > second_display.zip > https://github.com/opensourcepos/opensourcepos /files/10148175/second_display.zip > > — > อย่าลืมส่งอีเมลนี้โดยตรงดูได้ที่ GitHub > <>, > หรือต้องการสมัคร > https://github.com/notifications/unsubscribe-auth/A2IZO7LGQJ3FJ3QJTQZA7LTWLRP5DANCNFSM4H5ARMKQ > > สิ่งเหล่านี้เกิดขึ้นเนื่องจากคุณตอบกลับ ID กรด: > _@
Untitled
_ .*> >

ขออภัยสำหรับการบันทึกทั้งหมดฉันจะให้คุณใหม่

POS.zip

Will try

@joshbudu

joshbudu commented Jun 5, 2025

Copy link
Copy Markdown

IMG-20250605-WA0010
I was able to design Customer Display for a client and its working nicely

$data = array();
$sale_id = $this->session->userdata('sale_id');
if($sale_id == '')
{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All new code needs to be PSR compliant, so these curly braces should go on the previous line.

$this->session->set_userdata('sale_id', -1);
}
$data['cart'] = $this->sale_lib->get_cart();
$customer_info = $this->_load_customer_data($this->sale_lib->get_customer(), $data, TRUE);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All new code needs to be PSR compliant so these local variables need to be camelCase

}
$data['cart'] = $this->sale_lib->get_cart();
$customer_info = $this->_load_customer_data($this->sale_lib->get_customer(), $data, TRUE);
$data['modes'] = $this->sale_lib->get_register_mode_options();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rather than add to the data array this way, let's switch to array notation when there are a lot of additions to data at the same time. Less repeating code and easier to read.

    [
'modes' => 'bar',
'mode` => `foo`,
...
]

$data['pos_mode'] = $data['mode'] == 'sale' || $data['mode'] == 'return';
$data['quote_number'] = $this->sale_lib->get_quote_number();
$data['work_order_number'] = $this->sale_lib->get_work_order_number();
if($this->sale_lib->get_mode() == 'sale_invoice')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this block of if...elseif...elseif...else to use match. more readable and easier to maintain.

$lang["config_website"] = "موقع الشركة";
$lang["config_work_order_enable"] = "تفعيل طلبات العمل";
$lang["config_work_order_format"] = "شكل طلبات العمل";
$lang["config_second_display"] = "Show Customer Display"; No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is no translation for a language, then it should be blank ''. The lang() function falls back automatically to English when there is no translation and when there is English in another language it can make weblate think the language is more translated than it actually is.

$lang["sales_work_order_number_duplicate"] = "מספר הזמנת עבודה חייב להיות ייחודי.";
$lang["sales_work_order_sent"] = "הזמנת עבודה נשלחה אל";
$lang["sales_work_order_unsent"] = "הזמנת עבודה לא נשלחה אל";
$lang["sales_second_display"] = "Second Display"; No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to remove these anyway but I think Second Display is an old phrase anyway. I think we moved to Show Customer Display

@BudsieBuds

Copy link
Copy Markdown
Member

@WebShells isn't this PR superseded by #4533? If so, please close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Customer-facing display Second Display and Other Improvements