Jump to content

Modifying home page (non-logged in)


omega1

Recommended Posts

  • 4 weeks later...

Hello brian!

Thank you for your reply. Found it.

I'm just getting my head around WHMCS as I've only just started using it.

Is there an easy way to display items from the product list here? Ideally I'd want to choose a bunch of products and list them in a similar way to how they appear on the 'Browse All' page.

Thank you again for responding.

Link to comment
Share on other sites

8 hours ago, omega1 said:

I'm just getting my head around WHMCS as I've only just started using it.

yeah, I remember what that was like back in 2013... though there were only 2,000 files in WHMCS back then, there's over 10,000 now!

8 hours ago, omega1 said:

Is there an easy way to display items from the product list here?

an easy way, no... if only there were a checkbox you could tick to show product x on the homepage.

8 hours ago, omega1 said:

Ideally I'd want to choose a bunch of products and list them in a similar way to how they appear on the 'Browse All' page.

oh good luck with that.

the biggest problem (and there are so many others!) is that non-cart pages won't have cart functionality or product arrays, so the best you can do easily outside of the cart pages is just link products to the cart.

if you were wanting to do this on any non-cart page, e.g the homepage, then you need to do at least 4 things...

  1. decide which products you want to show.
  2. get those product's details (name, price, description etc) from WHMCS.
  3. display them in the template.
  4. add a link to the cart for each product.

so 1️⃣ is straightforward and just needs you to decide which products you want to show. 🙂

for 2️⃣ there are a number of ways to get the information - the easiest, for new users, would be using Data Feeds, but more experienced users could use an action hook to create an array via querying the database using Capsule, using the Class/Model method or even the API.

i'm sure if you search these forums for products on homepage, you'll see plenty of hooks that i've posted that can pull the information from the database.

now 3️⃣ is tricky and long-winded (not least because you might be using custom themes)... you can't just copy & paste a template from one of the orderforms and expect it to work immediately... it's ultimately doable though with effort.

with 4️⃣ you can get the URL to add the product to the cart from the specific product configuration page in the admin area..

Link to comment
Share on other sites

22 hours ago, brian! said:

if only there were a checkbox you could tick to show product x on the homepage.

Absolutely!

OK, thanks for your reply, I will probably just end up redirecting the homepage to the 'Browse All' page as this does exactly what I want to display on the home page...

Thanks again.

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