close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Product accessories specific to different products

Thread began 7/27/2010 9:29 am by iainmacdonald331081 | Last modified 7/30/2010 3:17 pm by CraigR | 1044 views | 13 replies |


Product accessories specific to different products

Just looking for a heads up on something really.

Basically I've inherited a site that has a cart (not eCart, which is the only cart I'm familiar with, but I think was back in V3), but they would like to change a few things.

At the moment the site sells furniture, and through the cart process, customers have the option to buy cushions. At the moment its set up so that all cushions are the same price.

You can see how it works by quickly going through the process (although obviously not to the point of buying anything!) here :


However, it turns out that different items of furniture come with different sized (and so differently priced) cushions.

I don't really want to go in and mess the whole thing up, as I'm not really that clued up on hand coding PHP at the best of times, let alone when it might mess up a shopping cart.

So my question really is whether or not this is possible using eCart, and how involved it is to set up?


Sign in to reply to this post

Eric Mittman

I visited the link and added the item to the cart then proceeded to checkout and did not see an option about the cushions. In general this type of thing is not too difficult with eCart if you have an understanding of data involved and how you would like it to work.

If you have the cushions as another item it would be very easy, you can just add them to the cart and the price fo the cushions would be included in the subtotal. If you would like to make it all the same product it can be a little more involved. If you can describe a little more about how exactly you would like it to work I can tell you about what would be involved and how much skill would be required to achieve the result.

Sign in to reply to this post


Thanks Eric - there's a page about paint before you get to the cushion option.

I did think it might just be easier to add different cushions as items, rather than a 'if cushion selected add $x.xx per cushion' as it seems here.

With eCart, is it reasonably straightforward to have different cushions, and display particular cushions as being available with particular furniture? (I think there are only two sizes, maybe three).

I just don't want to go in and break the whole thing, as I wouldn't be too confident with coding the PHP directly, and I have no idea what the original cart is.

Similarly, if its something that *should* be pretty straightforward for someone to edit who did know about PHP and/or the original cart, then me spending time reinventing the wheel with eCart seems like a long road for a short cut....

Sign in to reply to this post

Eric Mittman

You will not be able to use eCart to make the association between the cushions and products, this would be up to you to do either by making this association in a table on your db or by manually associating different cushions with different products. Based on what you are describing I'm not sure that eCart would make this any easier for you since it would require you to change over the cart completely in order to make use of it. Like you noted, it is a long path for a quick solution. However there are other advantages of updating the cart in the site to make use of eCart, you could then easily edit all of the 'add to cart' and checkout server behaviors without having to edit any code directly. If this is a long term project that might need more customizing or updating in the future it might be a good idea to think about incorporating eCart into the site.

Sign in to reply to this post


Thanks Eric - I've basically been working on some other sites for the same people, and they asked me to have a quick look at this. But I think in this instance they might be best going back to the original developers.

Sign in to reply to this post

CraigRBeta Tester

Hi Iain.

If you fancy a challenge, with a little bit of database tweaking, you could create a selection of 'child' items, which you could decide are available at all times, or only of a certain 'parent' piece of furniture is in the cart.

As Eric said, ecart can't do this, it is something that needs to be done with the database, but once the database is altered, ecart can cope very well with the new structure.

Sign in to reply to this post


Thanks Craig - I'm still chewing it over.

With the current set up, there are no cushions available to buy and put in the cart. Just this page where you can choose to add cushions (I guess in the same way that postage can be selected), and a price added accordingly.

So as a kind of fix, I thought this might work (if not that elegantly!)

1. Add cushions to the products database.

2. Edit the current page where people can add cushions, to a page that reminds people that they might need cushions, and provide a link to a cushions product page.

Does kind of rely on customers knowing what cushions they need.

A step on from that, I guess if cushions are stored in their own table, eg


Then that table could be links to the main furniture table by adding a look up field, Cushion_ID

Which I guess is the sort of approach you're talking about?

Sign in to reply to this post

CraigRBeta Tester

Hi Iain,

i think the key question is, do you want to give customers the option of buying cushions ONLY, or must they be purchased with a chair/sofa.

What happens if a customer who already has cushions needs to buy new/ replacement cushions.

I realise I know nothing about your business, (or your datbase structure) so I hope I'm not leading you astray here, but I would be tempted approach this 2 ways

1. Add cushions to the existing products database, and change the menu so that they can be chosen like any other item, (category 8 ??)

This has the benefit that the existing cart structure should still work.

2. Create a 'linked items' table, where you could associate cushions and chairs/sofa's and vice versa. With a little bit of coding you would be able to display related product.

eg on a product page displaying a sofa, you could show cushion/cushions suitable for that sofa

Just a thought :-)

Sign in to reply to this post


Any input is welcome, as its something I've kind of inherited - hence my uncertainty about delving too deeply.

But I'm thinking 2. above shouldn't get too messy :

1. Add a field CushionID to the main Products table.

2. Add a Cushions table.

3. On the Product Details page add a new recordset to show the Cushion where Cushions_CushionID = Products_CushionID.

4. Include a link to that Product's details page.

Does that sound about right?

Sign in to reply to this post

CraigRBeta Tester

That does sound about right, and should work in principle.

With approach 2 only though, you are consigning cushions to 'subordinate/child items', also I don't know how it will work with your existing cart software.
also won't it prevent customers from buying cushions only ?

The reason I mentioned part 1 is that it should, in fact, be easier to implement, and with approach 2 as well, you get the best of both worlds, cushions (or whatever accessories you happen to want), available in their own right, and as subordinate items.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...