Topic: Video tutorials Shopping Cart with XML.

I want to thank you the killerPHP  team for the wonderful videos. I have a question reagrding the shopping cart with XML tutorial. (Maybe someone else asked it before). What if we want to add products that have to different sizes and therefore 2 different prices? How can we do that??

Any help will be greatly appriciated.


Thanks
Tony

Vote up Vote down

Re: Video tutorials Shopping Cart with XML.

I think doing something like that would require some significant modifications to the way products are handled. You would probably need to implement some sort of parent/child relationship between products, so that your different sizes would show up underneath the main product, and so that both products could be added separately to the shopping cart.

Benjamin Falk | Falken Creative : Twitter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter

Vote up Vote down

Re: Video tutorials Shopping Cart with XML.

Ok, i understand that,
but therefore you how can we pass that specific price (as it's going to be to different prices assuming)

<shop>
<item>1</item>
<pricesmall>1.00</pricesmall>
<pricelarge>2.00</pricelarge>
<shop>

Can we create a function so that the $finalprice (let's assume)

$finalprice = $pricesmall || $pricelarge


Sorry if i don't make sense. New to PHP

Thanks in advance

Tony

Vote up Vote down