system32 Posted January 31, 2019 Share Posted January 31, 2019 Hello, I'm developing a client panel. There's something I'm hanging out with. For example, if there is no product or order on the product services page, I just want to have a new order button. For example, the following image. Page URL: clientarea.php?action=services I want it to be page: https://prnt.sc/meyypo Of course, whenever an order or product is available, the products page will display normally. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 2, 2019 Share Posted February 2, 2019 On 31/01/2019 at 22:07, system32 said: For example, if there is no product or order on the product services page, I just want to have a new order button. I would have thought the solution to that would be to count the $services array in the template... it it's equal to zero, then they have no products at all and you can show your alternate message.... other tabled client area pages should work in a similar way. 0 Quote Link to comment Share on other sites More sharing options...
system32 Posted February 2, 2019 Author Share Posted February 2, 2019 I've tried it. But I haven't been very successful. Because there is no product, we can only display the message I want. But the warning message does not disappear because it is the product. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 3, 2019 Share Posted February 3, 2019 15 hours ago, system32 said: I've tried it. But I haven't been very successful. Because there is no product, we can only display the message I want. But the warning message does not disappear because it is the product. as an example, i'm going to do this in "Six" - so you'll see sidebars, but I assume in your theme, you're not going to call them... in any event, they could be removed if they had to (before or after).... so if a client has no products and goes to clientarea.php?action=services, they should see... if we edit the clientareaproducts.tpl template and use... {if $services|@count eq 0} {$LANG.clientareaproductsnone}<br>You have not added any product - add first product now<br><a href="cart.php" class="btn btn-info" role="button">Add New Product</a> {else} * rest of current template * {/if} you should then see.... now you'd need to play with the layout (divs etc), but as I understand it, that basically does what your original question asked about... 0 Quote Link to comment Share on other sites More sharing options...
system32 Posted February 3, 2019 Author Share Posted February 3, 2019 5 hours ago, brian! said: as an example, i'm going to do this in "Six" - so you'll see sidebars, but I assume in your theme, you're not going to call them... in any event, they could be removed if they had to (before or after).... so if a client has no products and goes to clientarea.php?action=services, they should see... if we edit the clientareaproducts.tpl template and use... {if $services|@count eq 0} {$LANG.clientareaproductsnone}<br>You have not added any product - add first product now<br><a href="cart.php" class="btn btn-info" role="button">Add New Product</a> {else} * rest of current template * {/if} you should then see.... now you'd need to play with the layout (divs etc), but as I understand it, that basically does what your original question asked about... Thanks for your reply. I did it like you said, and it happened. It was exactly what I wanted. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.