Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New button "remove all" in the shopping_cart.php


Guest

Recommended Posts

Hi all,

I would want to make a little customization on the OSC but I’m not a good programmer.

My target is: insert of a new button in the shopping_cart.php page that permit the “remove all” object in the cart.

This operation is already present through the remove flags, but these OSC options allow a remove of only one product and not of all products in the cars. I would want allow a unique button to empty the cart.

To make this operation I think is necessary clean the TABLE_CUSTOMERS_BASKET and TABLE_CUSTOMERS_BASKET_ATTRIBUTES, through these delete command:

delete from TABLE_CUSTOMERS_BASKET where customers_id = <customer_ID> and products_id = <products_ID>;

delete from TABLE_CUSTOMERS_BASKET_ATTRIBUTES where customers_id = <customer_ID> and products_id = <products_ID>;

 

… but I don’t know like insert these SQL instructions on the shopping_cart.php code and above all how take the customer_id & products_id variables.

Is there someone that can help me?

Thank a lot – Grazie !

Marco 

Link to comment
Share on other sites

Hi all,

I would want to make a little customization on the OSC but I’m not a good programmer.

My target is: insert of a new button in the shopping_cart.php page that permit the “remove all” object in the cart.

This operation is already present through the remove flags, but these OSC options allow a remove of only one product and not of all products in the cars. I would want allow a unique button to empty the cart.

To make this operation I think is necessary clean the TABLE_CUSTOMERS_BASKET and TABLE_CUSTOMERS_BASKET_ATTRIBUTES, through these delete command:

delete from TABLE_CUSTOMERS_BASKET where customers_id = <customer_ID> and products_id = <products_ID>;

delete from TABLE_CUSTOMERS_BASKET_ATTRIBUTES where customers_id = <customer_ID> and products_id = <products_ID>;

 

… but I don’t know like insert these SQL instructions on the shopping_cart.php code and above all how take the customer_id & products_id variables.

Is there someone that can help me?

Thank a lot – Grazie !

Marco 

 

 

Clear Cart Button In Shopping Cart

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...