Compare commits

..

376 Commits

Author SHA1 Message Date
Valentin Lab
ccb0399d91 new: doc: added `AGENTS.md` and small addition of a french paragraph 2025-10-10 08:20:13 +02:00
Valentin Lab
062d3a9141 fix: add delivery cost on load if delivery is selected 2025-10-05 12:38:19 +02:00
Valentin Lab
9ba8f4acf4 fix: make the selected channel apply changes to product each time 2025-10-05 12:33:08 +02:00
Valentin Lab
e080d98e81 fix: display only delivery types that have a price and auto-select first 2025-10-05 10:09:03 +02:00
Valentin Lab
bd63a92604 fix: make delivery option on checkout stick to the current sale channel 2025-10-05 09:56:33 +02:00
Valentin Lab
dc05eb31ac new: add channel management 2025-10-05 09:39:27 +02:00
Valentin Lab
5bee7c5e50 fix: make sale channel description field editable 2025-10-05 05:26:20 +02:00
Valentin Lab
31500f3386 new: make admin delivery edition can toggle off public and active states 2025-10-05 03:32:08 +02:00
Valentin Lab
0f58dfe1f4 fix: make save button avoid error 500 in delivery method admin page 2025-10-05 03:28:03 +02:00
Valentin Lab
c0737e3bce new: make the eye icon work to see an invoice in admin customer view 2025-10-04 15:37:28 +02:00
Valentin Lab
7913576f1a fix: remove 404 about javascript file in admin console 2025-10-04 14:39:07 +02:00
Valentin Lab
d88b8c8a70 new: keep cart when login in 2025-10-04 14:13:48 +02:00
Valentin Lab
f2a87f4d12 new: make click in choices of search box load the page of the product 2025-10-04 13:54:21 +02:00
Valentin Lab
c338a8afc7 fix: make invoices creation resistant to missing address if this still happens 2025-10-04 12:55:11 +02:00
Valentin Lab
29c21367d7 new: make invoice still keep the old addresses when their address gets deleted in profile 2025-10-04 12:39:13 +02:00
Valentin Lab
09b6c3cf28 fix: make the button to add an address unusable when the address form is open 2025-10-04 12:19:24 +02:00
Valentin Lab
a34905f34e new: add persistence of default address selection 2025-10-04 11:59:57 +02:00
Valentin Lab
8d8528f6fb new: display the default address checkbox on profile load 2025-10-04 11:59:57 +02:00
Valentin Lab
e69487f73e fix: make the address appear when added 2025-10-04 11:59:57 +02:00
Valentin Lab
a2da0a8a12 fix: prevent deleting last address for each kind 2025-10-04 11:59:57 +02:00
Valentin Lab
b7634e07c0 fix: prevent 404 when deleting an adress 2025-10-04 11:06:43 +02:00
Valentin Lab
ece0b433fd fix: prevent error 500 on profile edition 2025-10-04 10:51:41 +02:00
Valentin Lab
c94d815e5a fix: move `build directory to resources/shop` 2025-10-04 10:13:38 +02:00
Valentin Lab
0d0e7c4652 fix: repair favicon links and provide one from https://www.jardinenvie.com 2025-10-04 09:41:15 +02:00
Valentin Lab
0e9d758e6b fix: finalize payments and clear cart after Paybox success
This captures the Paybox verification flow, duplicate-payment guard, and cart cleanup.
2025-10-04 09:17:53 +02:00
Valentin Lab
883d2d634d fix: do not call debugbar if not available (when in prod) 2025-09-29 11:32:19 +02:00
Valentin Lab
1503f21b3b new: add docker build reproducible code 2025-09-29 11:22:02 +02:00
Valentin Lab
17fa80b96b fix: pkg: repair grunt 2025-09-25 13:58:09 +02:00
ludo
92c9975e81 fix: fix 2025-04-21 10:57:31 +02:00
ludo
b214d8dc74 fixes 2025-03-18 13:06:02 +01:00
ludo
08fc49cb61 fixes 2025-02-15 12:12:42 +01:00
ludo
0f32386406 remove browsershot 2025-01-03 16:05:05 +01:00
ludo
4023fd9ee4 fix contents 2025-01-03 16:04:19 +01:00
ludo
1e32fd7cf1 fix calculation on indirect articles by tags 2025-01-03 14:45:23 +01:00
ludo
870fc6c806 refactor scopes 2025-01-03 14:09:22 +01:00
ludo
045641e687 fixes 2025-01-03 03:46:45 +01:00
ludo
38e477ee5f fixes 2024-06-17 21:56:42 +02:00
ludo
561cd2248c fixes on addresses 2024-04-29 22:01:45 +02:00
ludo
0a538ee1a2 fix on producter 2024-03-11 19:31:22 +01:00
ludo
e490c27837 fix on tags 2024-03-11 19:02:57 +01:00
ludo
e92f38f6c3 fixes on auth customers 2024-03-11 18:48:25 +01:00
ludo
296dc4fde2 fix route 2024-03-11 18:38:23 +01:00
ludo
e4e2126ada fixes 2024-03-03 22:52:00 +01:00
ludo
44391e817c Core classes removed by error 2024-03-03 14:53:54 +01:00
ludo
5359375210 fixes 2024-03-03 14:44:35 +01:00
ludo
c15a6e380f minor fixes 2024-02-23 08:35:41 +01:00
ludo
3acb69abe4 cleaning day 2024-02-22 21:28:33 +01:00
ludo
00fc978217 coding style 2024-02-22 19:35:51 +01:00
ludo
7a33245c1e add monitoring 2024-02-22 19:33:56 +01:00
ludo
927be4ea77 add seo 2024-02-19 23:51:32 +01:00
ludo
b0b87db86d add shop cart storage 2024-02-07 21:54:58 +01:00
ludo
53448d7907 fixes 2024-02-07 21:11:17 +01:00
ludo
e920157c0b add health route 2024-02-07 21:07:19 +01:00
ludo
8f905ce1eb add health route 2024-02-07 21:05:48 +01:00
ludo
b95da54240 add health 2024-02-07 21:01:02 +01:00
ludo
e6ad147790 fix 2024-02-07 20:43:58 +01:00
ludo
5fc8d3dc57 move autocomplete for customer 2024-02-07 20:41:04 +01:00
ludo
4caf069011 force https on docker 2024-02-07 20:31:51 +01:00
ludo
d0e97ccd08 add restore backup 2024-02-05 22:36:45 +01:00
ludo
38ce69b525 fix on worker with php 8.2 2024-02-05 22:04:17 +01:00
ludo
b67e91d228 fix ports 2024-02-05 21:48:07 +01:00
ludo
94f84a7a85 fix on docker 2024-02-05 21:38:40 +01:00
ludo
54ab6b0231 fix on docker 2024-02-05 21:34:29 +01:00
ludo
9e30118088 add watermark on zoom, update display of article nature on shelve (change icon to text 2024-02-04 22:09:53 +01:00
ludo
6c88e43b74 add datatbles for invoices, add pdf icon, refactor icons components, add autocomplete on search, adapt searching to meilisearch 2024-02-04 02:51:38 +01:00
ludo
5c20e6d5d0 add new search engine 2024-01-31 23:45:58 +01:00
ludo
79af996c63 add metrics 2024-01-30 23:24:00 +01:00
ludo
c0c4146c9c add migration to catrt storage, update SCOUT 2024-01-29 23:45:55 +01:00
ludo
84bc5f2e67 add new metrics, graph metrics, prepare basket to storage 2024-01-29 23:44:49 +01:00
ludo
72f5da4555 add graphs for stats 2024-01-29 22:39:57 +01:00
ludo
349204307f Merge branch 'master' of https://gitlab.huma.net/ludo/opensem 2024-01-28 20:28:39 +01:00
ludo
36459de793 fix articles datatables, enhance statistics 2024-01-28 19:56:13 +01:00
Ludovic CANDELLIER
d432827bab restrict ports to be compatible with legacy version 2024-01-23 00:01:15 +01:00
Ludovic CANDELLIER
930695166d add certbot 2024-01-22 23:05:39 +01:00
Ludovic CANDELLIER
8c39035cdc add slave1 2024-01-22 23:04:23 +01:00
Ludovic CANDELLIER
6a1d8ba80a remove highcharts 2024-01-22 23:01:33 +01:00
Ludovic CANDELLIER
6f8340b90b remove old models 2024-01-22 22:52:03 +01:00
ludo
c5f06a608c update 2024-01-22 22:50:56 +01:00
ludo
50111787aa Merge branch 'master' of https://gitlab.huma.net/ludo/opensem 2024-01-22 22:47:39 +01:00
ludo
b80c2a8d41 update migrations 2024-01-22 22:47:20 +01:00
Ludovic CANDELLIER
2eea4ec73d update docker 2024-01-22 22:14:36 +01:00
ludo
88a57a9c32 refactoring on Articles, minor fixes 2024-01-21 11:42:42 +01:00
ludo
7e5b1fea89 render invoice in pdf 2024-01-07 23:16:29 +01:00
ludo
c053221662 fixing styles 2024-01-07 20:42:37 +01:00
ludo
25b8fc40c5 fix devops error 2024-01-05 01:30:46 +01:00
ludo
d33dd6e755 coding styles 2024-01-04 15:54:18 +01:00
ludo
04f92c9695 fix on payment by cb 2024-01-04 15:43:02 +01:00
ludo
7c8546e450 update payments and vat mentions 2023-12-21 23:04:42 +01:00
ludo
585d42264f fix parameters for invoices 2023-12-21 16:57:40 +01:00
ludo
9f4ef99ce2 fix greedy replace 2023-12-12 21:40:24 +01:00
ludo
501f3a5ab9 minor fixes 2023-12-11 21:09:48 +01:00
ludo
0ff39c1401 adjust deliveries by customer 2023-12-11 21:07:49 +01:00
ludo
71ecb13af0 change homepages to contents, add new methods to deliveries and sale_channels by customer 2023-12-09 23:55:50 +01:00
ludo
7561a8e8ba minor fixes 2023-12-09 21:02:28 +01:00
ludo
bbf4bc4232 enhance invoice display 2023-12-03 02:20:41 +01:00
ludo
5d5ea92127 better management of shipping and basket summary display 2023-12-03 00:40:47 +01:00
ludo
a84995e0ce add basket on merchandise form 2023-11-25 20:42:15 +01:00
ludo
fcc564b6d8 update 2023-11-25 20:23:21 +01:00
ludo
be468304c9 fix invoice payment 2023-11-25 19:33:41 +01:00
ludo
b812a78f9f add payments by invoice 2023-11-25 16:21:35 +01:00
ludo
0ec0b8e85b fix on merchandises with validator 2023-11-25 16:21:02 +01:00
ludo
9d520abfcf try to refresh total with recalculation by delivery and delivery_type 2023-11-16 00:00:05 +01:00
ludo
174c4ca0e2 add shipping to order, methods to calculate, little refactoring 2023-11-15 23:20:42 +01:00
ludo
216c408596 fixes 2023-11-14 00:25:58 +01:00
ludo
3cdb30a0dc little refactoring 2023-11-14 00:11:31 +01:00
ludo
5bcf265cda add validator, optimizations 2023-11-13 23:03:12 +01:00
ludo
7ec1d3e89b fix on weight 2023-11-13 00:40:41 +01:00
ludo
741f389620 Fix on addresses 2023-11-13 00:02:21 +01:00
ludo
37f1ebbb59 fix on product null 2023-11-08 17:07:53 +01:00
ludo
81974d38ab fix if no icon 2023-11-08 16:55:26 +01:00
ludo
cc9672ddca fix basket 2023-10-31 17:05:41 +01:00
ludo
12903b6029 add filter not collapsed if filter is on 2023-10-17 17:47:25 +02:00
ludo
e6b15e2438 fix on customer auth, fix filters on shelves, refactor for article_nature, add slug 2023-10-17 17:20:30 +02:00
Ludovic CANDELLIER
002644cb97 Supprimer le fichier .env du répertoire docker 2023-09-13 23:10:04 +02:00
Ludovic CANDELLIER
dfe7625995 add docker version 2023-09-13 23:04:55 +02:00
Ludovic CANDELLIER
53feef282f coding style 2023-09-13 22:53:37 +02:00
Ludovic CANDELLIER
69478e3c74 minor fix on updating status of order, upgrade datatables 2023-09-13 22:17:49 +02:00
Ludovic CANDELLIER
ab8ab8eba1 adapt display of article_natures 2023-09-12 23:39:28 +02:00
Ludovic CANDELLIER
de5f3d665d adapt display of article natures by disponibility of offers in shelve 2023-09-12 23:27:56 +02:00
Ludovic CANDELLIER
afaf0cc629 add methods to get icon on article natures 2023-09-12 23:00:36 +02:00
Ludovic CANDELLIER
419a4c2b9a refactor datatables admin 2023-08-29 23:31:15 +02:00
Ludovic CANDELLIER
d750cdced7 refactoring of admin datatables 2023-08-29 22:56:37 +02:00
Ludovic CANDELLIER
01f9c9ae7c fix orders datatables on profile, fix deliveries for profile (public & active) 2023-08-29 22:15:37 +02:00
Ludovic CANDELLIER
043b7d7215 fixes on login 2023-08-28 22:58:11 +02:00
Ludovic CANDELLIER
f85df32c67 fixes 2023-08-28 21:48:04 +02:00
Ludovic CANDELLIER
6f2a985edc fixes, add weight 2023-08-01 21:55:17 +02:00
Ludovic CANDELLIER
5f1ff26196 fixes 2023-07-16 18:09:40 +02:00
Ludovic CANDELLIER
ddb4520621 fix shipping 2023-07-16 17:54:44 +02:00
Ludovic CANDELLIER
c619f540f8 fixes on bad pint 2023-07-16 15:07:15 +02:00
Ludovic CANDELLIER
39c80ce6d1 add shipping rules 2023-07-16 14:45:42 +02:00
Ludovic CANDELLIER
297dcc62d2 add mail tracker 2023-07-04 23:33:13 +02:00
Ludovic CANDELLIER
b011f40b2f add multiple addresses on customer edition 2023-07-04 23:32:41 +02:00
Ludovic CANDELLIER
fdbf819bf5 rollback to retrieve buttons 2023-07-04 19:24:31 +02:00
Ludovic CANDELLIER
f4738377c7 fixes on mail templates, change order edit layout, add DeliveryTypes, DeliveryTypeCalculations & DeliveryPackages 2023-05-24 23:30:29 +02:00
Ludovic CANDELLIER
99bdf09be7 add package to date scopes & browsershot 2023-05-09 21:51:48 +02:00
Ludovic CANDELLIER
b283363543 finish implementing mails 2023-04-17 00:27:03 +02:00
Ludovic CANDELLIER
6649c32501 add methods to detect distinct product type et article nature on shelve 2023-04-01 22:01:15 +02:00
Ludovic CANDELLIER
bc1cf1190b simplify variables names for templates, refactor to be multi-model 2023-03-28 00:17:04 +02:00
Ludovic CANDELLIER
3dc6c70c4d Enhance modal 2023-03-27 23:12:57 +02:00
Ludovic CANDELLIER
6e4f93dd65 fix on article based on old merchandise 2023-03-27 21:05:37 +02:00
Ludovic CANDELLIER
ba8f87cff4 add basket on rows, uniformize baskets 2023-03-21 23:16:47 +01:00
Ludovic CANDELLIER
efb3fe9670 fix recalculation on basket, fix quick add on basket 2023-03-21 22:41:48 +01:00
Ludovic CANDELLIER
23e6ca35ca cosmetic fixes, enhance profile, fix mails, ... 2023-03-14 23:33:14 +01:00
Ludovic CANDELLIER
695d23a139 fix active hierarchy in menu and megamenu 2023-03-14 21:46:57 +01:00
Ludovic CANDELLIER
3943fc033f add datatables on orders 2023-02-28 08:42:53 +01:00
Ludovic CANDELLIER
bb77a199eb remove buggy package for logging mail / incompatible with laravel 9 2023-02-27 23:16:45 +01:00
Ludovic CANDELLIER
808e60e41b quick add to basket on shelves 2023-02-27 23:16:15 +01:00
Ludovic CANDELLIER
260eccc1f1 adapt to laravel 9 2023-02-27 23:15:16 +01:00
Ludovic CANDELLIER
abed17b3f0 fix modal 2023-02-27 22:02:19 +01:00
Ludovic CANDELLIER
3ad83b870a fixe menu 2023-02-27 21:45:28 +01:00
Ludovic CANDELLIER
241b255b1c fix typo 2023-02-17 22:27:07 +01:00
Ludovic CANDELLIER
d2ec87c374 fix typo on Admin 2023-02-17 22:22:04 +01:00
Ludovic CANDELLIER
24b86652aa fix on sale_channel get_default 2023-02-17 22:08:13 +01:00
Ludovic CANDELLIER
923f988aba fix on sale_channel get_default 2023-02-17 22:07:43 +01:00
Ludovic CANDELLIER
0778fdc10a fix if default sale channel empty 2023-02-17 21:47:36 +01:00
Ludovic CANDELLIER
900aa413a2 Fix on invoices, add delivery reference, wip on dashboard concurrency requests designed on template 2023-02-17 00:05:03 +01:00
Ludovic CANDELLIER
820a200e88 remove debug mode 2023-02-14 00:30:30 +01:00
Ludovic CANDELLIER
186e3de863 Add overlay on css, adapt shelves, fix bienvenue mail on laravel 9 methods 2023-02-14 00:20:00 +01:00
Ludovic CANDELLIER
7722b73be9 upgrade to version 9 2023-02-13 23:47:01 +01:00
Ludovic CANDELLIER
685160ddf5 enhance components, add mailtemplate, add traits for translations, for stats 2023-02-13 22:52:39 +01:00
Ludovic CANDELLIER
7449229ff7 change icons, css, add routing to merchandise, add mail templater, fixes 2023-02-12 23:34:48 +01:00
Ludovic CANDELLIER
c5ae71544a fix megamenu on hover for yellow background 2023-02-12 00:11:25 +01:00
Ludovic CANDELLIER
926996166b change registration or connection in order page, change filter on shelve page, add new api to get article_nature by product_type, css fixes 2023-02-10 23:11:48 +01:00
Ludovic CANDELLIER
fd8e89e33c fix on empty images on merchandise 2023-02-09 23:49:17 +01:00
Ludovic CANDELLIER
503efc6f25 add cookie consent, change search for product_type empty 2023-02-07 23:25:59 +01:00
Ludovic CANDELLIER
e8ae460bab fix debug mode 2023-02-06 23:52:20 +01:00
Ludovic CANDELLIER
bb1e1a6b18 remove order alphabetically because is against reordering tree 2023-02-06 23:48:50 +01:00
Ludovic CANDELLIER
02b2d3e410 fix col, because bug on 2 lines for long menu 2023-02-05 23:22:44 +01:00
Ludovic CANDELLIER
72870680cf fix 2023-02-05 23:16:00 +01:00
Ludovic CANDELLIER
f3289334f3 fix css and html structure 2023-02-05 22:57:47 +01:00
Ludovic CANDELLIER
12e5dbb721 enhance css 2023-02-05 21:40:05 +01:00
Ludovic CANDELLIER
b42ae14428 enhance addresses 2023-01-01 22:45:27 +01:00
Ludovic CANDELLIER
ea5350a0a6 fix on login 2023-01-01 21:24:40 +01:00
Ludovic CANDELLIER
90d78bc3e3 fix 2022-12-29 19:23:28 +01:00
Ludovic CANDELLIER
a85e5f2921 fixes 2022-12-29 17:13:43 +01:00
Ludovic CANDELLIER
5e6af2e5f8 fix design, add addresses 2022-12-29 16:16:09 +01:00
Ludovic CANDELLIER
11aaaa024c fix 2022-12-22 18:17:50 +01:00
Ludovic CANDELLIER
fd1ab5cf04 fix 2022-12-22 18:16:25 +01:00
Ludovic CANDELLIER
a03befbf44 fix 2022-12-22 12:10:44 +01:00
Ludovic CANDELLIER
ce7755ffe3 fix description on shelves 2022-12-22 01:17:01 +01:00
Ludovic CANDELLIER
17792fce40 fix cache css 2022-12-22 01:12:40 +01:00
Ludovic CANDELLIER
9698ba54d0 fixes 2022-12-22 01:09:11 +01:00
Ludovic CANDELLIER
ae39681cb0 fix layout 2022-12-21 18:33:15 +01:00
Ludovic CANDELLIER
9895266798 remove dump 2022-11-24 17:51:37 +01:00
Ludovic CANDELLIER
c1a9c21e52 fix routes 2022-11-24 17:48:08 +01:00
Ludovic CANDELLIER
3a18679a1c fix on better routes 2022-11-24 17:41:57 +01:00
Ludovic CANDELLIER
6ef31f286e fix 2022-11-24 16:07:40 +01:00
Ludovic CANDELLIER
52193994a3 fixes on invoices relations and revisions 2022-11-20 00:21:38 +01:00
Ludovic CANDELLIER
71c0489862 Merge branch 'master' of https://gitlab.huma.net/ludo/opensem 2022-11-19 23:43:39 +01:00
Ludovic CANDELLIER
d33b5eea52 fix editing orders 2022-11-19 23:43:12 +01:00
Ludovic CANDELLIER
782809829b reorganize 2022-11-11 13:24:24 +01:00
Ludovic CANDELLIER
ebe7ba5f6c restart 2022-11-11 13:05:40 +01:00
Ludovic CANDELLIER
dae8156164 [WIP] Working on orders & invoices 2022-08-19 22:04:44 +02:00
Ludovic CANDELLIER
1880b25407 [WIP] Finish the order process 2022-08-18 18:20:44 +02:00
Ludo
5819f51f79 Add new file 2022-08-02 14:21:10 +00:00
Ludovic CANDELLIER
01f56204b7 fixes 2022-07-04 00:35:43 +02:00
Ludovic CANDELLIER
eadea3958d [WIP] Order process with interactive methods 2022-07-03 23:36:33 +02:00
Ludovic CANDELLIER
719e4481d7 [WIP] Order process 2022-07-03 22:38:08 +02:00
Ludovic CANDELLIER
eae2cdf345 fix on array 2022-07-03 10:48:42 +02:00
Ludovic CANDELLIER
ab145dd60f fix 2022-07-03 09:31:45 +02:00
Ludovic CANDELLIER
8054bffb43 begin order form with registration 2022-06-26 23:33:39 +02:00
Ludovic CANDELLIER
d50ecd674e fix selector on filters 2022-06-22 22:40:04 +02:00
Ludovic CANDELLIER
1703082b3e Refactor article getter for descriptions & tags, minor fixes on tags 2022-06-22 22:28:18 +02:00
Ludovic CANDELLIER
35310b049e change for description by level of data 2022-06-16 22:59:26 +02:00
Ludovic CANDELLIER
4801ff4338 missing file 2022-06-14 22:29:18 +02:00
Ludovic CANDELLIER
b2987e5eed fixes 2022-06-14 22:24:24 +02:00
Ludovic CANDELLIER
8b334bc8ed new routes 2022-06-13 23:30:06 +02:00
Ludovic CANDELLIER
79c717ae6c [WIP] begin of new display for article, shelves 2022-06-13 23:29:05 +02:00
Ludovic CANDELLIER
8abf391a53 change display on categories 2022-05-31 23:21:04 +02:00
Ludovic CANDELLIER
cc2798a78e Works for friday & saturday 2022-05-29 00:46:04 +02:00
Ludovic CANDELLIER
ce9f613b66 Add new component, add flags on filter 2022-05-09 23:14:50 +02:00
Ludovic CANDELLIER
3370b8061c modify filter calculation 2022-05-09 22:33:18 +02:00
Ludovic CANDELLIER
8c898bf63b fixes on merchandise 2022-05-02 08:34:40 +02:00
Ludovic CANDELLIER
fedf463f15 fix on empty picture 2022-04-25 23:43:25 +02:00
Ludovic CANDELLIER
73508f6b46 Fix on merchandises 2022-04-25 23:31:24 +02:00
Ludovic CANDELLIER
c79facd0ca Fixes on available offers in category childrens for building menu 2022-04-25 22:36:43 +02:00
Ludovic CANDELLIER
3ba5a833b2 fix on shelve with available offers 2022-04-25 21:59:53 +02:00
Ludovic CANDELLIER
c77db883c2 fix on empty shelve 2022-04-25 20:46:18 +02:00
Ludovic CANDELLIER
904110d10f fix 2022-04-25 20:29:50 +02:00
Ludovic CANDELLIER
3c8fab27da Add plus on products 2022-04-25 20:02:28 +02:00
Ludovic CANDELLIER
ee0954931f Add producers 2022-04-25 11:07:02 +02:00
Ludovic CANDELLIER
d399b72120 Add new data in getBasket context 2022-04-24 23:49:28 +02:00
Ludovic CANDELLIER
6fc6451f6f Add new data in getBasket context 2022-04-24 23:20:52 +02:00
Ludovic CANDELLIER
f3e9ccaa46 'fixes' 2022-04-24 22:07:31 +02:00
Ludovic CANDELLIER
1fc860715f fixes 2022-04-22 02:32:53 +02:00
Ludovic CANDELLIER
6837954fc9 Filters collapsed, customer auth and register, fix on basket recalculation 2022-04-20 00:16:16 +02:00
Ludovic CANDELLIER
483aa59750 fix on basket 2022-04-17 00:16:36 +02:00
Ludovic CANDELLIER
f460865a57 Multi-images component, refactoring medias functions 2022-04-16 19:33:17 +02:00
Ludovic CANDELLIER
4d31b1682c Add count function for images herited 2022-04-16 13:58:09 +02:00
Ludovic CANDELLIER
ee148a27ed Add management of merchandises, enhance imageable trait 2022-04-16 11:40:19 +02:00
Ludovic CANDELLIER
79e5a6388a Build form for merchandise 2022-04-14 23:41:58 +02:00
Ludovic CANDELLIER
165262abfa Add merchandise, fix articletosell with src for images 2022-04-14 23:20:09 +02:00
Ludovic CANDELLIER
2f77b5fc23 wip 3d 2022-04-13 23:49:48 +02:00
Ludovic CANDELLIER
8afb3467f8 enhance add to basket 2022-04-01 00:11:15 +02:00
Ludovic CANDELLIER
e3c60e7cde Add homepage 2022-03-30 22:23:57 +02:00
Ludovic CANDELLIER
7187a312eb fix 2022-03-30 18:02:19 +02:00
Ludovic CANDELLIER
e208dc910b fix 2022-03-30 18:01:01 +02:00
Ludovic CANDELLIER
d4bb94a487 Fix slider 2022-03-30 17:54:50 +02:00
Ludovic CANDELLIER
e77ed62066 fix 2022-03-30 16:43:10 +02:00
Ludovic CANDELLIER
8dddd4d99b fix 2022-03-30 16:42:46 +02:00
Ludovic CANDELLIER
edf43ff270 fix 2022-03-30 16:38:49 +02:00
Ludovic CANDELLIER
36c6402f04 Fixes on grouping 2022-03-30 16:34:08 +02:00
Ludovic CANDELLIER
8ba8d9a276 Fix 2022-03-30 16:03:26 +02:00
Ludovic CANDELLIER
cdce15a29f fix 2022-03-30 16:01:12 +02:00
Ludovic CANDELLIER
c12b45f8ad fix 2022-03-30 15:59:31 +02:00
Ludovic CANDELLIER
081df4d5d0 Fix on tarif with sale_channel 2022-03-30 15:46:10 +02:00
Ludovic CANDELLIER
2d86f162a0 Try to fix price_lists by sale_channel 2022-03-30 00:36:58 +02:00
Ludovic CANDELLIER
c2b7315abf fix empty 2022-03-24 15:07:55 +01:00
Ludovic CANDELLIER
7b265d3b47 fix empty 2022-03-24 15:06:51 +01:00
Ludovic CANDELLIER
c90dd98319 Add calculations on basket 2022-03-24 14:57:39 +01:00
Ludovic CANDELLIER
193f5cf4ad Add toggle for homepage 2022-03-24 10:08:23 +01:00
Ludovic CANDELLIER
930eeaede8 Manage homepage by article, modify article template, enhance basket (add selector) 2022-03-24 00:48:26 +01:00
Ludovic CANDELLIER
36a63f3b14 Add variations, slider, fix cart ... 2022-03-21 21:52:12 +01:00
Ludovic CANDELLIER
d9dba1c515 Fix on default sale channel 2022-03-07 22:58:40 +01:00
Ludovic CANDELLIER
411b47f78d inherited description 2022-03-07 22:50:33 +01:00
Ludovic CANDELLIER
a550278f39 Fix name with spaces 2022-03-07 22:19:57 +01:00
Ludovic CANDELLIER
d715d726db Add method to get image with parent for article 2022-03-07 22:10:59 +01:00
Ludovic CANDELLIER
60acbc7939 add constaint on stock 2022-03-07 20:17:50 +01:00
Ludovic CANDELLIER
6a634c10ca Fixes on articles by sale_channel 2022-02-22 23:03:29 +01:00
Ludovic CANDELLIER
308f226ca0 fix empty 2022-02-22 22:46:10 +01:00
Ludovic CANDELLIER
c0aeda7554 fix 2022-02-22 22:41:50 +01:00
Ludovic CANDELLIER
3633581ebf Add prices and filtering by sale_channel with default 2022-02-22 22:32:46 +01:00
Ludovic CANDELLIER
15539f27a6 Add new search of articles 2022-02-21 09:09:36 +01:00
Ludovic CANDELLIER
0a9d03e214 Add price taxed 2022-02-20 21:59:19 +01:00
Ludovic CANDELLIER
36f16921bb change construction of articles/offers 2022-02-20 21:38:21 +01:00
Ludovic CANDELLIER
cbe397be6a fix 2022-02-18 09:48:02 +01:00
Ludovic CANDELLIER
8dc409bd78 Fix visible 2022-02-18 09:46:20 +01:00
Ludovic CANDELLIER
56659c73bb Fix save 2022-02-17 16:27:44 +01:00
Ludovic CANDELLIER
accc94f56b fix empty 2022-02-17 12:42:46 +01:00
Ludovic CANDELLIER
64f5663da5 fix empty 2022-02-17 12:30:17 +01:00
Ludovic CANDELLIER
c6ba4aaa24 active visible on shelves 2022-02-17 12:27:20 +01:00
Ludovic CANDELLIER
020954a7cc fix 2022-02-17 12:14:22 +01:00
Ludovic CANDELLIER
61be4a6769 fix on new tariff_unities 2022-02-17 12:03:01 +01:00
Ludovic CANDELLIER
cf9439852f Fix old methods 2022-02-17 11:52:19 +01:00
Ludovic CANDELLIER
5bf3b7ec7b change old route 2022-02-17 11:44:47 +01:00
Ludovic CANDELLIER
715e228b41 Fix save 2022-02-17 11:42:11 +01:00
Ludovic CANDELLIER
91675dc83b Upgrade package category and dependencies for php8.0 2022-02-17 11:38:19 +01:00
Ludovic CANDELLIER
e0addd61ce fix unsetted 2022-02-17 09:44:30 +01:00
Ludovic CANDELLIER
66cc7a6054 Fix 2022-02-16 09:42:08 +01:00
Ludovic CANDELLIER
2d6b092b64 Fix categories & varieties 2022-02-16 09:17:51 +01:00
Ludovic CANDELLIER
9ab19b0e4d fix name 2022-02-15 13:55:28 +01:00
Ludovic CANDELLIER
6110b42ce2 change template 2022-02-15 13:52:03 +01:00
Ludovic CANDELLIER
82a345c4c7 Fix 2022-02-15 13:19:30 +01:00
Ludovic CANDELLIER
c0a80aa62b fix search 2022-02-09 09:25:48 +01:00
Ludovic CANDELLIER
b325a44ee2 Add method to get offers by articles with siblings, enhance display 2022-01-30 22:48:04 +01:00
Ludovic CANDELLIER
88d87ceaab Fix bug on select2 in modal filters, add filters by tags and shelves on articles 2022-01-30 15:04:08 +01:00
Ludovic CANDELLIER
ba04007f86 fix roles 2022-01-30 00:30:21 +01:00
Ludovic CANDELLIER
81dcd273ce fix 2022-01-25 23:32:39 +01:00
Ludovic CANDELLIER
d899d3dcaa fix on image 2022-01-25 23:27:55 +01:00
Ludovic CANDELLIER
9f6d21ef04 Add no visual 2022-01-25 22:59:17 +01:00
Ludovic CANDELLIER
bdefa235eb Fixes on tag_Groups and variations, add migrations 2022-01-25 22:25:18 +01:00
Ludovic CANDELLIER
545c242bba fix on empty articles 2022-01-24 00:47:45 +01:00
Ludovic CANDELLIER
e241486143 Fix on home 2022-01-24 00:32:46 +01:00
Ludovic CANDELLIER
2f81f1d61d better integration of filters 2022-01-24 00:31:23 +01:00
Ludovic CANDELLIER
4d3ffa2ca3 Add toggle by rows/by cards 2022-01-23 23:16:56 +01:00
Ludovic CANDELLIER
f237882757 Add display of shelve 2022-01-23 22:49:23 +01:00
Ludovic CANDELLIER
090dcd6f24 fixes 2022-01-23 21:48:37 +01:00
Ludovic CANDELLIER
6db343c6b2 Add filter by sale_channel, add method to get prices by offer, sale_channel and quantity 2022-01-23 21:37:54 +01:00
Ludovic CANDELLIER
d46347a66f fix 2022-01-23 09:02:43 +01:00
Ludovic CANDELLIER
ab8f68e4bc fixes on tags with slug 2022-01-22 22:05:18 +01:00
Ludovic CANDELLIER
8c9fc66b89 Add tariff unities management 2022-01-22 19:26:35 +01:00
Ludovic CANDELLIER
2be53d581e Fixes size of description on article, fix save form on Families and genres 2022-01-22 17:53:24 +01:00
Ludovic CANDELLIER
26f3fc3d2c Display filters, and fix css for article 2022-01-22 13:12:43 +01:00
Ludovic CANDELLIER
efff4f0341 fix 2022-01-19 22:43:32 +01:00
Ludovic CANDELLIER
b3f2aa36be Add parameters to display by rows 2022-01-18 23:46:06 +01:00
Ludovic CANDELLIER
cdc88b43df Add display articles by rows, and display article in full mode 2022-01-18 23:39:27 +01:00
Ludovic CANDELLIER
ecbb7b62c9 Fix on data for article, problem with id on polymorphic 2022-01-18 00:08:04 +01:00
Ludovic CANDELLIER
b1a2e70d12 Add deep relations 2022-01-14 00:03:21 +01:00
Ludovic CANDELLIER
b2f5cc4a45 invert query from offers->articles to articles->offers 2022-01-05 22:05:30 +01:00
Ludovic CANDELLIER
8a1573d425 [WIP] Add thumb on offers, refactor categories, try to fix counter on relations polymorphic with eage loader, bad pattern ! 2021-12-17 00:30:07 +01:00
Ludovic CANDELLIER
cb0b2e4aa0 fixes 2021-11-24 23:04:13 +01:00
Ludovic CANDELLIER
7092cf23fc Manage address and deliveries 2021-11-24 20:57:12 +01:00
Ludovic CANDELLIER
e434220c16 Fix 2021-11-24 16:15:56 +01:00
Ludovic CANDELLIER
0858804095 fix on server 2021-11-24 15:56:02 +01:00
Ludovic CANDELLIER
5f7e90d22d Fix on php 7.4 2021-11-24 15:53:17 +01:00
Ludovic CANDELLIER
6dce60d227 Fixes for deliveries vs sale_channels 2021-11-23 23:37:47 +01:00
Ludovic CANDELLIER
f6668a6dd3 fixes 2021-11-07 23:41:17 +01:00
Ludovic CANDELLIER
dd396a86aa fixes 2021-11-07 19:58:38 +01:00
Ludovic CANDELLIER
f3b6504723 Fixes 2021-11-07 17:16:35 +01:00
Ludovic CANDELLIER
41cab61bda change last_nulls on mysql , is compatible with mariadb ? 2021-11-04 16:59:11 +01:00
Ludovic CANDELLIER
c76996db86 Fix 2021-11-04 16:37:42 +01:00
Ludovic CANDELLIER
f5716c6530 Add filters 2021-11-01 23:42:53 +01:00
Ludovic CANDELLIER
459d35e8a1 Minor fixes on traits 2021-11-01 18:50:17 +01:00
Ludovic CANDELLIER
e9ce44481a Add thumbs views in datatables with traits 2021-11-01 18:37:25 +01:00
Ludovic CANDELLIER
18f1f8a13a add offers count, & minor fixes code standards 2021-11-01 16:26:31 +01:00
Ludovic CANDELLIER
e97f54f126 Minor fixes, coding standards 2021-11-01 00:50:10 +01:00
Ludovic CANDELLIER
0d0e4deb16 Refactoring, change menu, add many features 2021-10-30 02:22:51 +02:00
Ludovic CANDELLIER
da51da2530 Fix 2021-10-26 21:51:47 +02:00
Ludovic CANDELLIER
c024bdc31e Fix 2021-10-26 21:47:00 +02:00
Ludovic CANDELLIER
4ec0558cd8 Synchro back-office, fix on tariffs 2021-10-26 21:41:46 +02:00
Ludovic CANDELLIER
48d89d338c refactor, better class namespace intergration 2021-10-04 14:09:51 +02:00
Ludovic CANDELLIER
0f23d5cd56 fixes 2021-10-04 13:49:45 +02:00
Ludovic CANDELLIER
9380d99688 downgrade for incompatibility with depedencies 2021-09-22 22:15:38 +02:00
Ludovic CANDELLIER
06fb42e7c7 Saving for offers 2021-09-22 22:14:39 +02:00
Ludovic CANDELLIER
66a830eec0 fix 2021-09-22 21:03:42 +02:00
Ludovic CANDELLIER
0e73c8109b Fix tags with group name 2021-09-22 21:03:19 +02:00
Ludovic CANDELLIER
5e4c9963c6 Remove duplicate migrations 2021-09-22 21:02:45 +02:00
Ludovic CANDELLIER
f9070b2ec8 Upgrade boilerplate 2021-09-22 21:01:43 +02:00
Ludovic CANDELLIER
8107078ea7 Add relations in tables, add saving states for datatables, minor fixes 2021-09-14 23:14:03 +02:00
Ludovic CANDELLIER
be3b6bc0a8 [WIP] Tentative d'ajout des tarifs dans le tableau 2021-09-09 00:30:36 +02:00
Ludovic CANDELLIER
290602057a fixes 2021-09-09 00:03:24 +02:00
Ludovic CANDELLIER
a1a3ccb227 fix filter on prices by tariff 2021-09-01 10:25:59 +02:00
Ludovic CANDELLIER
e9002fb494 add description on variations 2021-09-01 09:10:58 +02:00
Ludovic CANDELLIER
cffec143e0 fix adding price for count(prices) > 3 2021-08-31 23:33:10 +02:00
Ludovic CANDELLIER
385873a0cf Fix on refreshing description & images from products 2021-08-31 23:12:18 +02:00
Ludovic CANDELLIER
8842b7eea7 Add refreshing for inherited data 2021-08-30 22:59:50 +02:00
Ludovic CANDELLIER
0cd0e1f126 Enhance categories, add tags, parent 2021-08-26 17:45:37 +02:00
Ludovic CANDELLIER
7c01366281 Fix menu catalogue, fix path for price modal 2021-08-26 15:59:56 +02:00
Ludovic CANDELLIER
fa193a8089 Fix variation 2021-08-26 15:53:41 +02:00
Ludovic CANDELLIER
27c5663ba1 Fix translation yet forced on tags 2021-08-26 13:42:58 +02:00
Ludovic CANDELLIER
cfd8086586 Fixes on tag updating 2021-08-26 09:54:37 +02:00
Ludovic CANDELLIER
c3a05640ab Fixes 2021-08-24 23:41:10 +02:00
Ludovic CANDELLIER
ca691c8fdd Fix translation 2021-08-24 22:50:18 +02:00
Ludovic CANDELLIER
47ff07451f Fix translations typo case 2021-08-24 22:40:22 +02:00
Ludovic CANDELLIER
5bbf63b33f Fix tree 2021-08-24 22:26:37 +02:00
Ludovic CANDELLIER
768c7e88f9 Fix relationship 2021-08-24 20:42:51 +02:00
Ludovic CANDELLIER
23b8914187 fix segregation of article 2021-08-24 20:28:57 +02:00
Ludovic CANDELLIER
aee50813e4 Fix admin path 2021-08-24 19:14:29 +02:00
Ludovic CANDELLIER
331b7647de Fix css 2021-08-24 19:03:52 +02:00
Ludovic CANDELLIER
b1494477a2 Fix package eloquent-macro unavailable for now 2021-08-24 16:40:31 +02:00
Ludovic CANDELLIER
31b671bcdd remove old files 2021-08-24 16:27:05 +02:00
Ludovic CANDELLIER
9e2226a776 Fix on preview mode 2021-08-23 23:56:46 +02:00
Ludovic CANDELLIER
9ca510086b comments 2021-08-21 19:48:21 +02:00
Ludovic CANDELLIER
7ec40145de Rename Admin views directory, add some functions on models 2021-07-27 22:12:58 +02:00
Ludovic CANDELLIER
734ec87b89 Fixes on adding price & errors 2021-07-27 17:33:18 +02:00
Ludovic CANDELLIER
0d421226fa Add new version in repository 2021-07-25 23:19:27 +02:00
Ludovic CANDELLIER
d174fe1c81 MCD 2021-06-05 18:00:10 +02:00
Ludovic CANDELLIER
64abc46d99 [WIP] Refactor project 2021-05-21 00:21:05 +02:00
Ludovic CANDELLIER
f4ab8e71a8 v1 2021-05-07 00:14:27 +02:00
Ludovic CANDELLIER
763577bf87 Fixes 2021-04-19 21:45:17 +02:00
Ludovic CANDELLIER
226153f744 Fixes on article preview 2021-04-16 00:04:00 +02:00
Ludovic CANDELLIER
e298320119 Fixes on widget uploder 2021-04-15 23:58:51 +02:00
Ludovic CANDELLIER
b90d633e6e Add preview from father, add new features 2021-04-11 00:36:41 +02:00
Ludovic CANDELLIER
31e60dee45 Fix typo 2021-04-08 16:59:06 +02:00
Ludovic CANDELLIER
0dd3df2984 Fix Typo 2021-04-08 16:57:50 +02:00
Ludovic CANDELLIER
d53e9f5a4f Fix 2021-04-08 16:18:21 +02:00
24 changed files with 2283 additions and 516 deletions

View File

@@ -43,7 +43,6 @@ COPY . /app
WORKDIR /app
RUN mkdir -p /app/bootstrap/cache \
/app/storage/media-library/temp \
/app/storage/framework/cache \
/app/storage/framework/views \
/app/storage/framework/sessions \
@@ -85,6 +84,8 @@ RUN apk add --no-cache xz
# bring PHP app with vendor
COPY --from=phpdeps /app /app
# ensure required runtime dirs exist (empty is fine)
RUN mkdir -p storage/framework/{cache,views,sessions} bootstrap/cache
# create artifact (use tar + xz so we don't depend on GNU tar -J)
RUN mkdir -p /out \
&& tar -C /app -cf /out/app.tar \

View File

@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Admin\Botanic;
use App\Datatables\Botanic\SpeciesDataTable;
use App\Repositories\Botanic\Genres;
use App\Repositories\Botanic\Species;
use Illuminate\Http\Request;
@@ -20,7 +21,7 @@ class SpecieController extends Controller
public function create()
{
$data = Species::init();
$data = Genres::init();
return view('Admin.Botanic.Species.create', $data);
}
@@ -35,7 +36,7 @@ class SpecieController extends Controller
public function edit($id)
{
$data = Species::init();
$data = Genres::init();
$data['specie'] = Species::getFull($id);
return view('Admin.Botanic.Species.edit', $data);

View File

@@ -71,10 +71,7 @@ class PriceListValueController extends Controller
public function addPrice($index)
{
$data = [
'index' => $index,
'taxes' => Taxes::getOptions(),
];
$data['index'] = $index;
return view('Admin.Shop.PriceListValues.partials.row_price', $data);
}

View File

@@ -3,7 +3,6 @@
namespace App\Http\Requests\Admin\Shop;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class StoreArticlePost extends FormRequest
{
@@ -14,13 +13,8 @@ class StoreArticlePost extends FormRequest
public function rules()
{
$articleId = $this->input('id');
return [
'ref' => [
'required',
Rule::unique('shop_articles', 'ref')->ignore($articleId)->whereNull('deleted_at'),
],
'ref' => 'required|unique:shop_articles',
'product_type' => 'required',
'product_id' => 'required',
'article_nature_id' => 'required',

View File

@@ -11,6 +11,9 @@ class AppServiceProvider extends ServiceProvider
{
public function boot()
{
if (config('app.env') === 'production') {
\URL::forceScheme('https');
}
Schema::defaultStringLength(191);
View::composer('Shop.layout.layout', LayoutComposer::class);
}

View File

@@ -65,9 +65,6 @@ class Varieties
{
$images = $data['images'] ?? false;
$tags = $data['tags'] ?? false;
if (! array_key_exists('plus', $data) || $data['plus'] === null) {
$data['plus'] = '';
}
unset($data['images']);
unset($data['tags']);
$variety = self::store($data);

View File

@@ -2,8 +2,6 @@
namespace App\Repositories\Core;
use Spatie\MediaLibrary\MediaCollections\Models\Media as MediaModel;
class Medias
{
public static function getImage($model, $conversion = 'normal', $collection = 'images')
@@ -81,9 +79,13 @@ class Medias
public static function getImageSrc($image)
{
$media = self::resolveMedia($image);
if (! $image) {
return null;
}
$id = $image['id'];
$filename = self::getFilename($image);
return $media ? $media->getUrl() : null;
return "/storage/{$id}/{$filename}";
}
public static function getThumbSrc($image)
@@ -108,12 +110,6 @@ class Medias
public static function getSrcByType($image, $type)
{
$media = self::resolveMedia($image);
if ($media) {
return $type ? $media->getUrl($type) : $media->getUrl();
}
return $image ? '/storage/'.$image['id'].'/conversions/'.self::getFilename($image, $type) : false;
}
@@ -128,48 +124,4 @@ class Medias
{
return str_replace(['#', '/', '\\', ' '], '-', $name);
}
protected static function resolveMedia($image): ?MediaModel
{
if ($image instanceof MediaModel) {
return $image;
}
if (is_null($image)) {
return null;
}
if (is_array($image)) {
return self::hydrateMedia($image);
}
if (is_object($image)) {
if ($image instanceof \ArrayAccess) {
return self::hydrateMedia((array) $image);
}
$array = method_exists($image, 'toArray') ? $image->toArray() : (array) $image;
return self::hydrateMedia($array);
}
$id = data_get($image, 'id');
return $id ? MediaModel::query()->withoutGlobalScopes()->find($id) : null;
}
protected static function hydrateMedia(array $attributes): ?MediaModel
{
$id = data_get($attributes, 'id');
if (! $id) {
return null;
}
$media = new MediaModel();
$media->forceFill($attributes);
$media->exists = true;
return $media;
}
}

View File

@@ -27,34 +27,21 @@ class ArticleTags
switch ($article->product_type) {
case 'App\Models\Botanic\Variety':
$variety = $article->product;
if ($variety && $variety->tags) {
$data = array_merge($data, $variety->tags->toArray());
}
if ($variety && $variety->specie && $variety->specie->tags) {
$data = array_merge($data, $variety->specie->tags->toArray());
$data += $article->product->tags->toArray();
if ($article->product->specie ?? false) {
$data += $article->product->specie->tags->toArray();
}
break;
case 'App\Models\Botanic\Specie':
$specie = $article->product;
if ($specie && $specie->tags) {
$data = array_merge($data, $specie->tags->toArray());
}
$data += $article->product->tags->toArray();
break;
case 'App\Models\Shop\Merchandise':
$merchandise = $article->product;
if ($merchandise && $merchandise->tags) {
$data = array_merge($data, $merchandise->tags->toArray());
}
if ($merchandise && $merchandise->producer && $merchandise->producer->tags) {
$data = array_merge($data, $merchandise->producer->tags->toArray());
}
$data += $article->product->tags->toArray();
$data += $article->product->producer->tags->toArray();
break;
default:
}
if ($article->tags) {
$data = array_merge($data, $article->tags->toArray());
}
$data += $article->tags->toArray();
foreach ($data as $tag) {
if (! isset($tags[$tag['group']][$tag['name']])) {

View File

@@ -19,7 +19,7 @@ class Articles
public static function autocomplete($str)
{
$data = Article::byAutocomplete($str)->visible()->orderBy('name')->limit(20)->pluck('name', 'id');
$data = Article::byAutocomplete($str)->orderBy('name')->limit(20)->pluck('name', 'id');
$export = [];
foreach ($data as $key => $name) {
$export[] = ['value' => $key, 'text' => $name];
@@ -135,11 +135,8 @@ class Articles
$data['specie'] = $article->product ? $article->product->description : '';
break;
case 'App\Models\Shop\Merchandise':
$merchandise = $article->product;
$data['merchandise'] = $merchandise ? ($merchandise->description ?? '') : '';
if ($merchandise && $merchandise->producer) {
$data['producer'] = $merchandise->producer->description ?? '';
}
$data['merchandise'] = $article->product ? $article->product->description : '';
$data['producer'] = $article->product->producer->description;
break;
default:
}

View File

@@ -3,7 +3,6 @@
namespace App\Repositories\Shop;
use App\Models\Shop\Offer;
use App\Models\Shop\PriceList;
use App\Models\Shop\PriceListValue;
use App\Models\Shop\SaleChannel;
use App\Traits\Model\Basic;
@@ -186,44 +185,20 @@ class Offers
->with([
'article',
'tariff:id,status_id',
'variation',
])
->get();
return $channels->map(function ($channel) use ($offers) {
$priceValue = null;
$candidateOffer = null;
$allOffersForChannel = [];
foreach ($offers as $offer) {
$priceCandidate = self::getPrice($offer->id, 1, $channel->id);
if ($priceCandidate && (float) $priceCandidate->price_taxed > 0) {
// Get price list name
$priceListName = null;
if ($priceCandidate) {
$priceListModel = PriceList::find($priceCandidate->price_list_id);
$priceListName = $priceListModel ? $priceListModel->name : null;
}
// Collect all offers with their details
$allOffersForChannel[] = [
'id' => $offer->id,
'variation_name' => $offer->variation ? $offer->variation->name : null,
'stock_current' => (int) $offer->stock_current,
'status_id' => (int) $offer->status_id,
'is_active' => (int) $offer->status_id === 1,
'tariff_id' => $offer->tariff_id ? (int) $offer->tariff_id : null,
'price_taxed' => (float) $priceCandidate->price_taxed,
'quantity' => (int) $priceCandidate->quantity,
'price_list_name' => $priceListName,
];
// Keep first valid offer as the main candidate
if (!$candidateOffer) {
$priceValue = $priceCandidate;
$candidateOffer = $offer;
}
$priceValue = $priceCandidate;
$candidateOffer = $offer;
break;
}
}
@@ -234,7 +209,6 @@ class Offers
$offerHasStock = $candidateOffer && $candidateOffer->stock_current !== null
? (float) $candidateOffer->stock_current > 0
: null;
$offerTariffId = $candidateOffer && $candidateOffer->tariff_id ? (int) $candidateOffer->tariff_id : null;
return [
'id' => $channel->id,
@@ -247,8 +221,6 @@ class Offers
'offer_stock_current' => $offerStock,
'offer_has_stock' => $offerHasStock,
'tariff_status_id' => $offerTariffStatus,
'tariff_id' => $offerTariffId,
'all_offers' => $allOffersForChannel,
];
})->toArray();
}

View File

@@ -46,34 +46,12 @@ class PriceListValues
{
foreach ($values as $value) {
$value['price_list_id'] = $price_list_id;
if (self::hasPrice($value)) {
if ($value['price']) {
self::store($value);
}
}
}
public static function purgeRemovedValues($price_list_id, array $ids)
{
if (! count($ids)) {
return;
}
PriceListValue::byPriceList($price_list_id)
->whereIn('id', $ids)
->delete();
}
protected static function hasPrice($value): bool
{
if (! array_key_exists('price', $value)) {
return false;
}
$price = $value['price'];
return $price !== null && $price !== '';
}
public static function getModel()
{
return PriceListValue::query();

View File

@@ -17,7 +17,7 @@ class PriceLists
'taxes' => Taxes::getOptions(),
'price_list' => [
'tariff_id' => $tariffId,
'price_list_values' => [],
'price_list_values' => array_fill(0, 3, ''),
],
];
}
@@ -50,8 +50,9 @@ class PriceLists
public static function edit($id)
{
$price_list = self::getFull($id)->toArray();
if (count($price_list['price_list_values']) === 0) {
$price_list['price_list_values'][] = [];
$n = count($price_list['price_list_values']);
if ($n <= 3) {
$price_list['price_list_values'] += array_fill($n, 3 - $n, '');
}
return $price_list;
@@ -70,14 +71,9 @@ class PriceLists
public static function store($data)
{
$id = $data['id'] ?? false;
$price_list_values = $data['price_list_values'] ?? [];
$deleted_values = array_map('intval', array_filter($data['deleted_price_list_value_ids'] ?? [], function ($value) {
return $value !== null && $value !== '';
}));
$price_list_values = $data['price_list_values'] ?? false;
unset($data['price_list_values']);
unset($data['deleted_price_list_value_ids']);
$price_list = $id ? self::update($data) : self::create($data);
PriceListValues::purgeRemovedValues($price_list->id, $deleted_values);
PriceListValues::storePrices($price_list->id, $price_list_values);
return $price_list;

View File

@@ -49,7 +49,7 @@ class SaleChannels
}
}
return self::getByCode('POSTE');
return self::getByCode('EXP');
}
public static function getByCode($code)

View File

@@ -8,14 +8,8 @@ class Searches
{
public static function search($options)
{
// Get article IDs from Scout search
$searchResults = Article::search($options['search_name'])->get()->pluck('id');
// Filter to only include visible articles
$visibleArticleIds = Article::whereIn('id', $searchResults)->visible()->pluck('id');
return collect(Articles::getArticlesToSell([
'ids' => $visibleArticleIds,
'ids' => Article::search($options['search_name'])->get()->pluck('id'),
]))->sortBy('searchOrder')->toArray();
}

View File

@@ -1,35 +1,23 @@
<?php
return [
// Default configuration group for Gravatar
'default' => [
// --- The default avatar size
'size' => 80,
// --- The default avatar size
'size' => 80,
// --- The default avatar to display if we have no results
// (bool) false
// (string) 404
// (string) mm: (mystery-man) a simple, cartoon-style silhouetted outline of a person (does not vary by email hash).
// (string) identicon: a geometric pattern based on an email hash.
// (string) monsterid: a generated 'monster' with different colors, faces, etc.
// (string) wavatar: generated faces with differing features and backgrounds.
// (string) retro: awesome generated, 8-bit arcade-style pixelated faces.
'fallback' => 'identicon',
// --- The default avatar to display if we have no results
// (bool) false
// (string) 404
// (string) mm: (mystery-man) a simple, cartoon-style silhouetted outline of a person (does not vary by email hash).
// (string) identicon: a geometric pattern based on an email hash.
// (string) monsterid: a generated 'monster' with different colors, faces, etc.
// (string) wavatar: generated faces with differing features and backgrounds.
// (string) retro: awesome generated, 8-bit arcade-style pixelated faces.
'default' => 'identicon',
// --- Whether to use HTTPS protocol
'secure' => false,
// --- Set the type of avatars we allow to show
// - g: suitable for display on all websites with any audience type.
// - pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence.
// - r: may contain such things as harsh profanity, intense violence, nudity, or hard drug use.
// - x: may contain hardcore sexual imagery or extremely disturbing violence.
'maximumRating' => 'g',
// --- Force default image to always display
'forceDefault' => false,
// --- Optional file extension appended to URL
'forceExtension' => 'jpg',
]
// --- Set the type of avatars we allow to show
// - g: suitable for display on all websites with any audience type.
// - pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence.
// - r: may contain such things as harsh profanity, intense violence, nudity, or hard drug use.
// - x: may contain hardcore sexual imagery or extremely disturbing violence.
'maxRating' => 'g',
];

View File

@@ -126,7 +126,7 @@ return [
* The path where to store temporary files while performing image conversions.
* If set to null, storage_path('media-library/temp') will be used.
*/
'temporary_directory_path' => env('MEDIA_LIBRARY_TEMP_PATH', storage_path('media-library/temp')),
'temporary_directory_path' => null,
/*
* The engine that should perform the image conversions.

View File

@@ -1,30 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('shop_articles', function (Blueprint $table) {
$table->dropUnique('ref');
$table->unique(['ref', 'deleted_at'], 'shop_articles_ref_deleted_at_unique');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('shop_articles', function (Blueprint $table) {
$table->dropUnique('shop_articles_ref_deleted_at_unique');
$table->unique('ref');
});
}
};

2175
dump.sql Normal file

File diff suppressed because one or more lines are too long

View File

@@ -15,9 +15,4 @@
<td>
@include('components.form.inputs.money', ['name' => 'price_list_values[' . $index . '][price_taxed]', 'value' => $price_list_value['price_taxed'] ?? null, 'required' => true, 'class' => 'price_taxed'])
</td>
<td class="text-center align-middle">
<button type="button" class="btn btn-outline-danger btn-xs remove-price" title="{{ __('Supprimer') }}">
<i class="fa fa-trash"></i>
</button>
</td>
</tr>

View File

@@ -30,18 +30,12 @@
<th>Unit. HT</th>
<th>TVA</th>
<th>Unit. TTC</th>
<th class="text-center" style="width: 60px;">Actions</th>
</tr>
</thead>
<tbody>
@php($priceListValues = $price_list['price_list_values'] ?? [])
@php($nextIndex = count($priceListValues))
@foreach ($priceListValues as $index => $price_list_value)
@include('Admin.Shop.PriceListValues.partials.row_price', ['index' => $index, 'price_list_value' => $price_list_value])
@foreach ($price_list['price_list_values'] as $price_list_value)
@include('Admin.Shop.PriceListValues.partials.row_price', ['index' => $loop->index])
@endforeach
@include('Admin.Shop.PriceListValues.partials.row_price', ['index' => $nextIndex, 'price_list_value' => []])
</tbody>
<tfoot>
<tr>
@@ -55,28 +49,19 @@
</tfoot>
</table>
@endcomponent
<div id="deleted-price-list-values"></div>
</form>
<script>
var priceRowIndex = 0;
var lastRemovedIndex = null;
function handleAddPrice() {
$('#add_price').click( function () {
addEmptyPriceRow();
})
}
function addEmptyPriceRow() {
var index = nextPriceRowIndex();
$.get("{{ route('Admin.Shop.PriceListValues.addPrice') }}/" + index, function(data) {
$("#prices-table tbody").append(data);
var index = $('#prices-table tbody tr').length;
$.get("{{ route('Admin.Shop.PriceListValues.addPrice') }}/" + index, function(data) {
$("#prices-table").append(data);
})
handlePrices();
handleRemovePrice();
lastRemovedIndex = null;
});
})
}
function handle_prices() {
@@ -116,82 +101,9 @@
handle_prices_taxed();
}
function handleRemovePrice() {
$('#prices-table').off('click', '.remove-price').on('click', '.remove-price', function() {
var $row = $(this).closest('tr');
var idx = extractRowIndex($row);
var id = $row.find('input[name$="[id]"]').val();
if (id) {
registerDeletedPrice(id);
}
$row.remove();
lastRemovedIndex = idx;
ensureAtLeastOneRow();
});
}
function registerDeletedPrice(id) {
var $container = $('#deleted-price-list-values');
if ($container.find('input[value="' + id + '"]').length === 0) {
$container.append('<input type="hidden" name="deleted_price_list_value_ids[]" value="' + id + '">');
}
}
function ensureAtLeastOneRow() {
if ($('#prices-table tbody tr').length === 0) {
if (lastRemovedIndex !== null) {
$.get("{{ route('Admin.Shop.PriceListValues.addPrice') }}/" + lastRemovedIndex, function(data) {
$("#prices-table tbody").append(data);
handlePrices();
handleRemovePrice();
});
} else {
addEmptyPriceRow();
}
}
}
function computeStartingIndex() {
var maxIndex = -1;
$('#prices-table tbody tr').each(function() {
var $idInput = $(this).find('input[name$="[id]"]');
var name = $idInput.attr('name');
if (name) {
var matches = name.match(/price_list_values\[(\d+)\]\[id\]/);
if (matches && matches[1]) {
var idx = parseInt(matches[1], 10);
if (!isNaN(idx) && idx > maxIndex) {
maxIndex = idx;
}
}
}
});
return maxIndex + 1;
}
function nextPriceRowIndex() {
return priceRowIndex++;
}
function extractRowIndex($row) {
var $idInput = $row.find('input[name$="[id]"]');
var name = $idInput.attr('name');
if (!name) {
return priceRowIndex;
}
var matches = name.match(/price_list_values\[(\d+)\]\[id\]/);
return matches && matches[1] ? parseInt(matches[1], 10) : priceRowIndex;
}
$(function() {
priceRowIndex = computeStartingIndex();
handleAddPrice();
handlePrices();
handleRemovePrice();
ensureAtLeastOneRow();
});
</script>

View File

@@ -1,59 +1,37 @@
@php
// Check if article is not visible OR has no offers at all
$hasNoOffers = empty($article['offers']['semences'] ?? false)
&& empty($article['offers']['plants'] ?? false)
&& empty($article['offers']['legumes'] ?? false)
&& empty($article['offers']['marchandise'] ?? false);
$shouldShowComingSoon = !($article['visible'] ?? true) || $hasNoOffers;
@endphp
@if ($article['offers']['semences'] ?? false)
@include('Shop.Articles.partials.addBasket', [
'data' => $article['offers']['semences'],
'title' => 'Semences',
'model' => 'semences',
'bgClass' => 'bg-green-light',
])
@endif
@if ($shouldShowComingSoon)
{{-- Display "Coming Soon" box when article is not visible or has no offers --}}
<div class="card border-info">
<div class="card-body text-center p-4">
<h4 class="text-info mb-3">
<i class="fas fa-clock"></i>
</h4>
<h5 class="card-title mb-0">Bientôt disponible</h5>
</div>
</div>
@else
{{-- Display normal offers for visible articles with available offers --}}
@if ($article['offers']['semences'] ?? false)
@include('Shop.Articles.partials.addBasket', [
'data' => $article['offers']['semences'],
'title' => 'Semences',
'model' => 'semences',
'bgClass' => 'bg-green-light',
])
@endif
@if ($article['offers']['plants'] ?? false)
@include('Shop.Articles.partials.addBasket', [
'data' => $article['offers']['plants'],
'title' => 'Plants',
'model' => 'plants',
'bgClass' => 'bg-green-light',
])
@endif
@if ($article['offers']['plants'] ?? false)
@include('Shop.Articles.partials.addBasket', [
'data' => $article['offers']['plants'],
'title' => 'Plants',
'model' => 'plants',
'bgClass' => 'bg-green-light',
])
@endif
@if ($article['offers']['legumes'] ?? false)
@include('Shop.Articles.partials.addBasket', [
'data' => $article['offers']['legumes'],
'title' => 'Légumes',
'model' => 'legumes',
'bgClass' => 'bg-green-light',
])
@endif
@if ($article['offers']['legumes'] ?? false)
@include('Shop.Articles.partials.addBasket', [
'data' => $article['offers']['legumes'],
'title' => 'Légumes',
'model' => 'legumes',
'bgClass' => 'bg-green-light',
])
@endif
@if ($article['offers']['marchandise'] ?? false)
@include('Shop.Articles.partials.addBasket', [
'data' => $article['offers']['marchandise'],
'title' => 'Marchandises',
'model' => 'marchandise',
'bgClass' => 'bg-green-light',
])
@endif
@if ($article['offers']['marchandise'] ?? false)
@include('Shop.Articles.partials.addBasket', [
'data' => $article['offers']['marchandise'],
'title' => 'Marchandises',
'model' => 'marchandise',
'bgClass' => 'bg-green-light',
])
@endif
@include('load.basket')

View File

@@ -48,8 +48,8 @@
</div>
<div class="col-lg-3 col-xs-12">
@if (auth('web')->check() && !empty($article['available_sale_channels']))
<div id="article-admin-offers" class="alert alert-info p-2 mb-3">
@if (config('app.debug') && !empty($article['available_sale_channels']))
<div class="alert alert-info p-2 mb-3">
<strong class="d-block">Offres :</strong>
<ul class="list-unstyled mb-0 small">
@php
@@ -82,61 +82,16 @@
</span>
</span>
@if ($priceTaxed !== null)
@php
$tariffId = $channel['tariff_id'] ?? null;
@endphp
@if ($tariffId)
<a href="{{ route('Admin.Shop.Tariffs.edit', $tariffId) }}" target="_blank" rel="noopener" class="ml-2 text-nowrap text-right {{ $nameClass }} text-decoration-none text-reset d-inline-block admin-link-group admin-price-link">
{{ number_format($priceTaxed, 2, ',', ' ') }} TTC
@if (! empty($quantity))
<span class="d-block text-muted" style="font-size: 0.85em;">Qté min. {{ $quantity }}</span>
@endif
</a>
@else
<span class="ml-2 text-nowrap text-right {{ $nameClass }}">
{{ number_format($priceTaxed, 2, ',', ' ') }} TTC
@if (! empty($quantity))
<span class="d-block text-muted" style="font-size: 0.85em;">Qté min. {{ $quantity }}</span>
@endif
</span>
@endif
<span class="ml-2 text-nowrap text-right {{ $nameClass }}">
{{ number_format($priceTaxed, 2, ',', ' ') }} TTC
@if (! empty($quantity))
<span class="d-block text-muted" style="font-size: 0.85em;">Qté min. {{ $quantity }}</span>
@endif
</span>
@else
<span class="ml-2 text-muted"></span>
@endif
</div>
@if (!empty($channel['all_offers']))
<ul class="list-unstyled mb-0 mt-1" style="padding-left: 0.75em;">
@foreach ($channel['all_offers'] as $offer)
@php
$isSelectedOffer = $offer['id'] === $channel['offer_id'];
$offerClass = $offer['is_active'] ? 'text-dark' : 'text-muted';
$stockClass = $offer['stock_current'] > 0 ? 'text-success' : 'text-danger';
@endphp
<li class="small {{ $offerClass }}" style="font-size: 0.85em;">
<a href="{{ route('Admin.Shop.Offers.edit', $offer['id']) }}" target="_blank" rel="noopener" class="text-decoration-none {{ $offerClass }} admin-link-group admin-offer-link">
<div class="d-flex justify-content-between align-items-start">
<div>
<span style="opacity: 0.5;">{{ $isSelectedOffer ? '▸' : '○' }}</span>
@if ($offer['variation_name'])
{{ $offer['variation_name'] }}
@endif
- Stock: <strong class="{{ $stockClass }}">{{ $offer['stock_current'] }}</strong>
@if (!$offer['is_active'])
<span class="text-muted">(inactive)</span>
@endif
</div>
<div class="text-right text-nowrap ml-2">
{{ number_format($offer['price_taxed'], 2, ',', ' ') }}
@if ($offer['quantity'] > 1)
<span class="text-muted">(min {{ $offer['quantity'] }})</span>
@endif
</div>
</div>
</a>
</li>
@endforeach
</ul>
@endif
</li>
@endforeach
</ul>
@@ -148,67 +103,3 @@
@endsection
@include('load.layout.modal')
@if (auth('web')->check() && !empty($article['available_sale_channels']))
@push('styles')
<style>
#article-admin-offers .admin-link-group {
transition: background-color 0.15s ease;
border-radius: 3px;
}
#article-admin-offers .admin-price-link {
display: inline-block;
padding: 2px 4px;
margin: -2px -4px;
}
#article-admin-offers .admin-offer-link {
display: block;
padding: 2px 4px;
margin: -2px -4px;
}
#article-admin-offers .admin-link-group:hover,
#article-admin-offers .admin-link-group:focus,
#article-admin-offers .admin-link-group.linked-hover {
background-color: rgba(0, 123, 255, 0.1);
text-decoration: none;
}
</style>
@endpush
@push('scripts')
<script>
document.addEventListener('DOMContentLoaded', function() {
const container = document.getElementById('article-admin-offers');
if (!container) {
return;
}
const links = Array.from(container.querySelectorAll('a.admin-link-group[href]'));
const grouped = new Map();
links.forEach((link) => {
const href = link.getAttribute('href');
if (!grouped.has(href)) {
grouped.set(href, []);
}
grouped.get(href).push(link);
});
grouped.forEach((group) => {
group.forEach((link) => {
const addHighlight = () => group.forEach((item) => item.classList.add('linked-hover'));
const removeHighlight = () => group.forEach((item) => item.classList.remove('linked-hover'));
link.addEventListener('mouseenter', addHighlight);
link.addEventListener('mouseleave', removeHighlight);
link.addEventListener('focus', addHighlight);
link.addEventListener('blur', removeHighlight);
});
});
});
</script>
@endpush
@endif

View File

@@ -9,16 +9,14 @@
var selector = (typeof(sel) == 'undefined') ? '.save' : sel;
$(selector).off().click(function(e) {
if (typeof initValidator === 'function') {
console.log('click');
e.preventDefault();
if ($(form).valid()) {
$(this).prop("disabled", true);
$(this).html($(this).data('loading-text'));
$(form).submit();
} else {
const $firstInvalid = $(form).find(':invalid, .error').first();
if ($firstInvalid.length) {
$firstInvalid.focus();
}
console.log('erreur');
}
} else {
$(form).submit();

View File

@@ -75,12 +75,12 @@
if (typeof(tinyMCE) != 'undefined') {
tinyMCE.triggerSave();
}
getModalForm(form_id).trigger('submit');
$('form ' + form_id).submit();
status = 1;
}
function handlePostModal(form_id, url_save, callback) {
getModalForm(form_id).off('submit').on('submit', function(e) {
$('form ' + form_id).submit(function(e) {
e.preventDefault();
var formData = new FormData(this);
$.ajax({
@@ -98,15 +98,6 @@
});
});
}
function getModalForm(form_id) {
var $form = $(form_id);
if (! $form.length) {
$form = $('form' + form_id);
}
return $form;
}
</script>
@endpush