Contact Lee Brooks

x Cancel
posted 8 months ago

jCart Question?

Hi there,

My colleague has recently left me and I've got a few questions regarding jCart. I'm working on a site at the moment and jCart seems to be having a few strange glitches.

wallsfloorsdev.zen-host.com/products/floor/2/

For example, when the page loads you can see it says 'Your Cart (0 Items)' but when you add something to your basket, it duplicates that element which is odd.

I was also wondering if anyone knew how I could limit people to only adding one of each product to their basket.

Any help would be greatly appreciated, Lee.

posted 9 months ago

jQuery Tablesorter Pagination

Hi there,

TLDR: I'm using jquery.tablesorter with its pager plugin and would like to know if I can paginate using the actual SQL, not just storing all the records in JavaScript, something similar to the way jquery.DataTables does).

I'm sure many of you jQuery fans will be familiar with a nifty little plugin called "jquery.tablesorter" which basically makes sorting and manipulating tables a piece of cake. There's also a easy to use pager plugin for it, although I can't seem to be able to bend it to my will (i'm quite hopeless with JavaScript if i'm honest..)

Basically, I'm pulling records from a database (currently holds around 18k rows) and displaying them in the table, and using the pagination plugin to paginate it. This is fine when only returning a small number of rows (e.g. slapping LIMIT 1000) onto my query.

It's not feasible to pull through all the records at once (this crashes Chrome on a good specced PC on its own, let alone when your using javascript to store it all) so I need to paginate it via the SQL.

Does anyone know if I can integrate this into the pager or will I have to take a different approach?

Thanks, Lee.

posted 10 months ago

Brand help - ServerDocs, a free resource for developers

Hi Forrst,

Over the past 6 months Forrst has provided me with endless inspiration, help and just general advice in our industry, and the amount of talent that is on display here is amazing.

Recently there have been quite a few posts relating more to the server side of development, including setting up a suitable hosting environment, optimizing etc.

Now as this is my area of expertise, I've decided I'm going to give something back to the community. Free, professional advice and tutorials relating to everything server/development related.

As some of you may have seen in another thread, I've registered myself a domain (serverdocs.co.uk) and I'm aiming to build a nice clean site that'll feature all the information people want about this subject.

This being my area of expertise, means my design skills aren't that great, so I'm wondering if anyone wants to help with ideas for a logo - I have no colour scheme in mind right now, I'm just looking to see what Forrst can rustle up. I'll happily pay for someones talent, just want to see what people will come up with.

Whether it be just ideas, examples or a full blown logo, credit will be given where it's due and I'm hoping I can get many Forrst users involved in the process, as I'm doing this for them :)

P.S, if you haven't already figured it out, the theme is tutorials for server stuff, let's see what you've got!

posted 11 months ago

The Wordpress Saga Continued... Custom Post Types

Morning all,

Some of you may have read my previous posts regarding my Wordpress issues and for all of you that commented I'd like to say thanks.

Anyway, my final (hopefully) question is this. I have some custom post types set, and one happens to be for 'Case Studies' which just required a title and the body content.

Now, I'd like to remove the other 'bloggy' stuff from the page, e.g comments / trackbacks / category etc.

What is the easiest way of doing this?

Thanks, Lee.

posted 11 months ago

Another Wordpress Question..

Afternoon Forrst, I have another Wordpress question, but don't fear, I'll explain it properly this time around ;)

So basically I have my sidebar stored in sidebar.php (where else?) and would like different content to appear on a few of the pages.

I don't mind hard coding an if statement into sidebar.php, but I'm unsure what variable holds the name of the page..

E.g

if ($page = 'jobs') { echo 'Jobs content here'; }

So essentially I'm asking how do you get Wordpress to return the name of the current page, or is there a better method of displaying dynamic content in the sidebar dependent on what page your viewing..

Thanks in advance!

posted 12 months ago

Wordpress - Multiple Editable Areas In One Page?

Hey there,

I've just completed a Wordpress template for a client, but have stumbled across a problem. Some of the pages feature two main columns, which need to contain different content.

For the static pages this is fine, but a few of the pages are dynamic and therefore each column needs to be edited independently from one another.

Is there a plugin (or am I missing something) so when I go to edit a page in the Wordpress Admin there can be two editable regions instead of one?

posted 1 year ago

Critical: PHP and Paypal

Hey guys,

Me and my colleague @rickyduck have just about tied up an ecommerce site, but we've found a pretty serious vulnerability.

Basically, PayPal requires you to submit a bunch of hidden fields through a form (including price etc) before it reaches PayPal's checkout. This means in theory someone could edit the hidden value for price before submitting the form, and PayPal will take this value and not the real one.

Does anyone out there know how we can solve this problem?

We can easily verify whether the right price was paid after the transaction, but we'd prefer it if we could somehow do this before the payment process.

Apologies if we're both just overlooking something really dumb, 4am starts don't do us much good :)

Thanks in advance!

posted 1 year ago

Duplicate elements jquery.

Good afternoon Forrst,

If you've read any of my posts, you probably know that I'm not exactly a javascript guru. Well, if you hadn't guessed, I've got a javascript/jQuery question for you.

Basically, I have three input boxes, e.g

<input name="option_name[]" type="text" size="12" class="txt" id="option_name" value="Option Name..." />
<input name="option_price[]" type="text" size="12" class="txt" id="option_price" value="Price..." />
<input name="option_code[]" type="text" size="5" class="txt" id="option_code" value="Code..." />

Now, I would like to be able to hit an add button that will duplicate these inputs, so I can have 2 sets, 3 sets etc etc.

What is the best way of accomplishing this?

Thanks in advance, Lee.

posted 1 year ago

PHP woes - Storage dilemma.

Hey Forrst,

Got quite a weird question here..

Basically, on one of our websites we have items in several categories, and want a different description for the item in each category.

For example..

foo - category1 - Lorem ipsum dolor....

foo - category2 - Sit amet blabla...

foo - category3 - This could go on forever...

Now, this principle in itself is easy enough to understand, but it's storing them which is the hard part.

I was thinking I could maybe store all the descriptions in the same database column, and separate them by a tag or something (purely for example - description1 <--end--> description2 <--end-->) as I can't use comma's because the descriptions are likely to contain them. I can't just create a separate column for each description as there needs to be an infinite number available, so I'm not sure what to do.

If I could have some input into how I could possibly do this it would much be appreciated.

I could then just use something like str_split or explode to distinguish between the different values.

posted 1 year ago

Images as checkboxes (quite urgent)

Afternoon Forrst,

I was wondering what the easiest method of styling a checkbox with an image would be.

Currently I'm using Ryan Fait's plugin, but you can only use it on one element whereas I need multiple checkboxes styled with seperate images.

Basically I'd like to be able to have 2 images (for unchecked and checked) that display instead of the box and a ticks.

Any pointers in the right direction would be greatly appreciated!

Thanks in advance, Lee.