Echo details from another section??

36 posts by 5 authors in: Forums > CMS Builder
Last Post: May 31, 2010   (RSS)

By (Deleted User) - October 1, 2009

This is exactly the reason why I wish I had moved over to interactive tools earlier in my web life! I did the above and guess what - of course it only goes and works perfectly!

THANK YOU so much - I don't know any other company who will write plugins and how-to guides to help its customers. I know where I'll be coming when my next site commission comes through - YOU!

Jono

By (Deleted User) - October 2, 2009

This is great and has so far reduced quite a large page by about 300 lines of if commands and code.

Using the same principle am I able to do the following:

On a tour there are a list of bikes available. There is a default bike included in the tour price - that's fine I can use the list from the database method.

There are more bikes available for each tour but with an upgrade price.

At the moment I have a textfield for each bike. If that bike is available for upgrade a price is entered in the text field.

Then on the tour page I use a load of if commands to display any bike and it's price if it has been entered - if no price has been entered in the text field nothing shows.

I love the idea of your list options but can't work out how it would show only if something has been entered - can you help?

Thanks again,
Jono.

Re: [jonoc73] Echo details from another section??

By Chris - October 5, 2009

Hi Jono,

That's a tricky problem!

Are the "bike upgrade prices" completely customizable for each tour, or could they be calculated (e.g. bike.price minus tour.default_bike_price)?
All the best,
Chris

By (Deleted User) - October 5, 2009

Hi Chris,

I'm afraid it's different for each tour. I have a list of about 23 bikes. The upgrade price for each bike can indeed be different depending on what tour.

At the mo I just textfield list all the bikes individually and us loads of if commands to show the bike logo and price if anything is entered in it's textfield. It works but I can't help feel this is a very long way round.

Thanks for all your help still,

Jono

Re: [jonoc73] Echo details from another section??

By Chris - October 5, 2009

Hi Jono,

I can't think of a simple solution. The database designer in me wants to use a table for tours, a table for bikes, and a many-to-many table for available_bikes_per_tour, but that would be really tricky to set up and may confuse your client and/or successors more than a page full of IF blocks.

If I think of a better solution, I'll let you know. In the meantime, I think you're best sticking with your IFs.

Sorry I couldn't help more!
All the best,
Chris

By (Deleted User) - October 8, 2009

Hi, I am using the Related Record Lookup Functions Plugin and it works really well.

However I get a MySQL error when nothing is selected for one of the fields, this is understandable as it's trying to list something that isn't there.

How can I get it to ignore that Lookup Related field function if nothing is entered?

Thanks

Jono.

Re: [jonoc73] Echo details from another section??

By Chris - October 8, 2009

Hi Jono,

Can you please post the exact error you're getting?
All the best,
Chris

By (Deleted User) - October 8, 2009

Hi, It's:

MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) ORDER BY title' at line 3

Thanks Jono

Re: [jonoc73] Echo details from another section??

By Chris - October 11, 2009

Hi Jono,

I think I've fixed that bug. Can you try this new version please?

If you're still getting the error (or get any other errors) please let me know!
All the best,
Chris

By (Deleted User) - October 11, 2009

Yep, this newer function version works a treat - THANKS.

J