Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

checkout_shipping.php modification needed (help needed)


Recommended Posts



hopefully someone can help me out.


If a cusomter buys <6 items then they are displayed an error (this works fine)


I need this to only happen on a certain category (cards)


This is a bit of my checkout_shipping.php file


if ($cart->count_contents() < 6) {


I need to change this slightly so that it will only process that if statment if the contents of the cart are in a certain category. some pesudo code:


if ($cart->count_contents() < 6 && $cat="cards") {


If the items are not in the cards category then the user is allowed to buy only one if they want so i would need the following php right below the <6 one.


if ($cart->count_contents() < 1  && $cat="posters") {


I would also need an if statement incase the user buys 1 card and one poster as this is not allowed, if a poster is bought and one card is added then the user must buy another 5 cards.


Am I going about this the correct way?, or is there is better way to be doing this




Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...