Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

We have one particular product in our product line that requires a $100 dollar fee. That means no matter how many quantity are ordered, a 100$ fee is attached to the order because of the processing.

 

Now I price things by qty and the minimum is 288. I added an attribute to charge plus 100 dollars for the imprint option as we call them, but then it applies this 288 times to make the order total like 28,800!

 

I tried installing the Bundled products mod but had errors with it because I'm using the milestone 1 release. Does anyone know if there is another contribution or a way to charge 100 dollars on top of this product everytime its ordered?

Assault

If you want to find it you'll have to google "Assault T-Shirts" because posting my damn url in my signature is against the forum rules.

T-Shirts with an edge

Powered by OSCommerce + about 20 different custom addons and some Wordpress

Posted

hrm...here's a possibility. It's a bit of a kludge, but it should work.

 

Create a product for this fee - call it "setup charge" or "processing fee" or whatever. Price it at $100 and give it a weight of 0 so it doesn't add to the shipping cost.

 

Edit the add_to_cart call which is in application_top.php(at least in MS2 it is). Find the case for "add_product."

 

Look for something like this:

if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

This code checks to be sure that a product_id has been passed and it is a number.

 

Add right after it something like this:

if($HTTP_POST_VARS['products_id']=x){
$cart->add_cart(y, 1);
}

This says, basically:

If the product you're adding to the cart is x, first add product y with a quantity of 1.

 

and then the remaining code will still be like this:

  $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;

This is the existing code that adds the product to the cart. This will still be executed regardless of what product you're adding.

 

x in this case is the id of the product that incurs this fee. y is the id of the fee. I've taken these code excerpts from a modified MS2 store, but you should be able to do something similar on your copy of MS1.

Chris Dunning

osCommerce, Contributions Moderator Team

 

Please do not send me PM! I do not read or answer these often. Use the email button instead!

 

I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.

Posted

Brilliant, that worked perfectly! Thank you soooo much you just saved me about 4 hours time.

 

I have one quick question though, is there a way to not make this product show up in the product listing? I'd like for it to be hidden unless ordered by this particular product.

 

thanks again soo much!

Assault

If you want to find it you'll have to google "Assault T-Shirts" because posting my damn url in my signature is against the forum rules.

T-Shirts with an edge

Powered by OSCommerce + about 20 different custom addons and some Wordpress

Posted

Is there a way to do this by weight of a product vs. just the product name?

 

In other words, we sell all our products by pound, so I need to add a "setup fee" for any orders less than 150 lbs. Every product on my site is sold by pound so if a customer orders less than 150, they would automatically get the setup fee added to their invoice.

 

I hope that is clear!

 

Mark

Mark

 

Contributions Used:

STS

B2B Suite

Description in Product Listing

Header Tag Controller

Easypopulate

Purchase Orders

USA Flag

Local Delivery

New Attributes Editor

Pickup

Posted

ttoomey - if you create the product in the highest level (ie, don't put it in a category) then it will not show up in product listings anywhere. You may have to go into the database manually and change the date it was added to keep it from showing in "new product" displays. It will still show if you have something like all_products, however...and it could turn up in searches.

 

The better, but more difficult way, would be to add a new field to the products database (call it products_listing_status) and then change all database queries to ignore a product without the right products_listing_status. A contribution called Master Products uses this sort of system.

 

armycopter - you would have to add in a database query to pull the weight of the product and use that in your comparison. I know there's a way to charge a low-order fee...say if someone orders less than $100 worth of merchandise, they have a processing fee...maybe you could hack that a bit to do what you need.

Chris Dunning

osCommerce, Contributions Moderator Team

 

Please do not send me PM! I do not read or answer these often. Use the email button instead!

 

I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.

Posted

Excellent, I posted another topic regarding deleting multiple products at once directly related to this thread.

 

I want to be able to delete both of these products now by just having one of the 2 checkboxes selected in shopping_cart.php

 

This way I can disable deletion of just the fee. Here's the link to that post:

 

http://www.oscommerce.com/forums/index.php?showtopic=96003&hl=

 

if anyone can help on that I'd greatly appreciate it.

Assault

If you want to find it you'll have to google "Assault T-Shirts" because posting my damn url in my signature is against the forum rules.

T-Shirts with an edge

Powered by OSCommerce + about 20 different custom addons and some Wordpress

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...