Jump to content

If there is no order, hide the product page.


system32

Recommended Posts

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.

Screenshot_1.png

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

0J3yb6k.png

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....

xX3ZvEF.png

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...

Link to comment
Share on other sites

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...

0J3yb6k.png

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....

xX3ZvEF.png

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated