Jump to content

rajaroy

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by rajaroy

  1. @Muddy_Funster I do agree with you that guest should not be able to create a cart without registering first, unfortunatly the person for whom i am making the website wants it this way. Dont really know much about cronjobs, but i definitely am going to take a look at it for future shoppingcarts. I really am greatfull for your help and information, thanks again. Greetings, Roy
  2. @wepnop I really really suck at loopings cause for some reason it doenst make sense to me. But the foreach worked fabulously, thanks @Muddy_Funster My first tought was also to use database for shoppingcarts but i thought of the folowing problems that i couldn't think a solution for. First the user that visits the website is a guest. When he/she is adding products to his/her cart then it would be inserted into database. But if this guest leave's the website, the cartdata would still be in the database, causing to fill up unnecessarily. How would you empty the cartdata? I couldn't think of any solutions, maybe you can .
  3. @Muddy_Funster Sorry if I pronounced the sentence wrong. I tried my best to explain my problem, but if its not understandable i can try to explain again. @wepnop I tried the code but i get a total of 0. I only changed $array to my array name. Dont know if you had noticed, but the sub-array's keys are the id's of the product. Could it be that the for loop is having difficulties with it when counting ++?
  4. I am currently building (for my first time) a shoppingcart. Its an multidimensional array in a session that looks like this. Array ( [23] => Array ( [0] => 23 [1] => 11.32.097. [2] => 635 [3] => 2 [4] => 89 ) [800] => Array ( [0] => 800 [1] => 20.40.017. [2] => 100 [3] => 1 [4] => 125 ) ) The 4th key contains the price value. What i am trying to do is get all the sub-array's 4th key value and count them together to get a total price. I tried doing this with a foreach loop but its not my strong point, sadly. I you have some time can you please take a look how to solve this? Thanks in advance, Roy
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.