Reply to Re: Advanced options in shopping cart script

Your name:

Reply:


Posted by aaron.reese on 08/29/06 16:42

quick answer, long coding:-

You could add a key value pair to the item and keep the value as a key
value array and therefore have nested arrays.

you would need code to iterate the nested array out again and
process/validate the contents. If you are careful you could have
multiple levels of nesting:-

Eg.

item => computer
components=> array(
CPU =>Intel Pentium 5 3.2ghz
Case = Alien ATX
Heatsink => BIG
Memory => array(
Type => Kinsgston 512 SDRAM
qty => 2)
)

Obiron

Neil Trigger wrote:
> Hello!
>
> I'm new to this newsgroup, but not new to php. However I'm still having a
> bit of a problem and hope you can help.
>
> I wrote my own shopping cart script a while ago and now want to expant upon
> it by adding options to items if neccessary. These options would determin
> things like size, colour and materials of the items selected (it saves the
> shop database becomming too overloaded, and eases navigation for clients).
>
> My question is this:
> When adding items to a shopping cart, how do I record these advanced
> options? I'm currently using the Welling & Thompson shopping cart (modified
> quite heavily). It uses the same method of putting items into a session
> array, but I'm just wondering if I can add more details to the item.
>
> Some items have 1 set of options, some have none, some have lots. Likewise
> is there a way of defining items that are different sizes, shapes, colours
> etc. at the moment they're all bundled under "2 decks of cards" rather than
> 1 deck of poker sized red cards, 1 deck of bridge sized blue playing cards.
> Please visit http://magic2k.com/shop/index.php?cat_open=&open=1&itemid=55
> for an example.
>
> Hope this makes sense.
>
> Regards,
>
> --
> Neil Trigger
> Magic2k Manager
> http://www.magic2k.com
> http://www.oddmap.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация