If you want to get instant help...please click here to submit a ticket [ link ]
We support 7000+ osCommerce add-ons! Affordable, Reliable, Speed on Rails services on customizations of osCommerce shipping, payment, marketing and others.

Actual Attribute Price V1.0

for osCommerce Merchant version 2.2


Retail Price: $100.00


Ask a Question About:Actual Attribute Price V1.0

07/08/2011

This contribution is designed for those of us who would rather use a product attributes actual price rather than use a calculator to figure out the option price.

Example:
--------

Tire A
Price: $84.99

Options: Size 1
Size 2 ($89.99)
Size 3 ($95.99)
Size 4 ($109.99)

Versus
-------

Tire B
Price: $84.99

Options: Size 1
Size 2 ($5.00)
Size 3 ($11.00)
Size 4 ($25.00)

As you can plainly see, it is much easier for a customer to figure out the cost of Tire A Size 4 than it would be for Tire B Size 4.

Installation:
-------------
1. Copy my updated code from:
includes/classes/shopping_cart.php
Includes/functions/general.php

(code is marked by "AAP V1.0")
2. Your are done! Now wasn't that easy?

Using AAP:
----------
It's very simple. When creating a product
attribute, leave the price prefix empty and
insert the price you want to sell the product
for with that attribute. (i.e. Tire A Size 4)

I hope you find this usefull, I know I did.

Actual attribute price easy

07/08/2011 by editia

Hacer solo un pequeño cambio de codigo para poder mostrar los precios de los atributos.

Making just this small change of code to display the prices of the attributes.


Actual Attribute Price v1.8

10/05/2010 by arakishore

* This is a complete package *

In this I have fixed the bug when Attribute price having lower than the orginal price

Just minor change in tep_adjust_price()


thanks


Actual Attribute Price v1.7

08/18/2009 by surfalot

* This is a complete package *

Updates
+ Added Fix from zeppos
+ Added utility to update all your existing attributes quickly.
+ Added back Compare files for those that know how to use them and know how much time it saves.
+ Cleaned up the code so it actually uses the vars it sets-up.
+ Added required GNU licensing notice.

Discuss: http://forums.oscommerce.com/index.php?showtopic=69543


small typo fix in v1.6

07/29/2009 by zeppos

Just a small correction in both versions 1.5 and 1.6.

in the file includes/classes/shopping_cart.php, the line:

$this->total += $qty * tep_add_tax(tep_adjust_price($option_price, $products_price), $product_tax);

should be:

$this->total += $qty * tep_add_tax(tep_adjust_price($option_price, $products_price), $products_tax);

(the ONLY thing that changes is the $products_tax at the end of the string, it was typed as "product_tax")

NO FILE UPLOADED.


Actual Attribute Price easy Install 1.6

12/02/2008 by Daimyo

This is an improvement over 1.5. add better how to install.txt so no one will get lasted in deciphering where to put the code in. Also improved performance and speed for the server use.


Actual Attribute Price v1.5

11/05/2008 by DimeNote

I have cleaned up and updated the install file to, hopefully, make this contribution easier to follow along with and install. I have also added screenshots.

All credit goes to the original and contributing authors.

Please feel free to add/modify/update this contribution if you can. Thanks again.


Actual Attribute Price

04/26/2008 by sumaiya

I have noticed that this contribution is scattered so I have just created a working full package,

with all the files without any bugs.

I have added one small change in the admin product_attribute page, to remove the price_prefix

column so that the user enters the actual price of a given attribute without worrying about leaving

the price_prefix column blank


Fix for Checkout Confirmation Page

04/01/2006 by anchor555

Actual Attribute Price
---------------------------------------
Fix for catalog/includes/classes/order.php

The Checkout Confirmation page in the shopping cart uses the functions from catalog/includes/classes/order.php to gather it's information. It was presenting the wrong price information since order.php was not updated in previous versions of this contribution.

The cart() function in the lower part of the page uses the get_products() function from catalog/includes/classes/shopping_cart.php for all the product and price information for the Checkout Confirmation page.

Find the following code around line 230:

'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']),

Change it to:

'final_price' => $products[$i]['final_price'],

This will bring in the correct price information to the Checkout Confirmation page.
This contribution is working well for us now that we fixed this glitch.


Better instructions and Drop-in files

02/21/2006 by ATeschner

In the catalog folder you will find drop-in files for a MS2 fresh install.
You can use a file comparison utility with these files, or follow the included
instructions. (Which have been cleaned up a bit)

What it does:
As coded, this mod will change the attributes coding so that if there is no
prefix added to the attribute price, the dropdown will display the attribute
price with no prefixes, and when the selection is added to the cart, the value
of the attribute will be passed to the shopping cart as the total price.

If there is a prefix, it will still display the attribute price with the prefix,
and the calculation will be applied to the base price in the same manner as it
already does by default.

This works with a combination of prefixed and non-prefixed attributes, as long
as only one attribute is non-prefixed.

Example:
Matrox G400 32MB $499.00
Memory: 16MB (-$10.00)
Model: Deluxe ($609.00)

When the above options are selected, the price of $609.00 will override the
price of $499.00, and $10.00 will be subtracted from $609.00.

See the end of file for a SQL snippet to convert your attributes prices to flat
prices.


Fix to add an actual attribute's weight for shipping v0.9

05/25/2005 by Philip

The only problem with this contribution is that it doesn't account for weights. So I came up with this fix.
What this does is allow you to assign specific weights to each attribute. When you select an attribute product for purchase, that attribute's weight is added to cart (for checkout and shipping purposes) WITHOUT BEING ADDED TO THE PRODUCT'S ORIGINAL WEIGHT!!! The product's base weight is replaced with the weight of the attribute!

Before proceeding make sure you already have the Actual Attribute Price mod correctly installed, as this edits one of it's lines of code.

STEP 1: Install the contribution: "Add Weight To Product Attributes v0.2"

STEP 2: In catalog/classes/shopping_cart.php:

Find this line:

$this->weight += ($qty * $attribute_price['options_values_weight']);

And replace it with this line:

$this->weight += ($qty * $attribute_price['options_values_weight'])-($qty * $products_weight);

That's it!!
I've tested this in every scenario possible, but there is still a possibility for error.




Actual Attribute Price 1.41

03/11/2005 by CrashWave

This fixes the multiple attribute prefix bug.
Read this http://forums.oscommerce.com/index.php?showtopic=69543&view=findpost&p=562891
fix is here
http://forums.oscommerce.com/index.php?showtopic=69543&view=findpost&p=565490
Again this only happens with the above criteria. So if you have it already and it works for you and you know you won't have that problem don't worry about it.


Actual Attribute Price 1.4

02/28/2005 by CrashWave

Allows for actual price of product in attribute not just + or -.
When using do not place anything in the prefix (leave it blank) unless you want it added or subtracted. when an attribute does not change the products price do not put '0' in price this will cause the final price to be '$0'.


Advanced Actual Attribute Price 1.4

01/19/2005 by heidi

Forgot to add the new file to the zip. SORRY


Advanced Actual Attribute Price 1.4

01/19/2005 by heidi

Version 1.4 STABLE now on several sites.

This just fixes a typo which caused several errors. There were too many dots '.' in the Advanced method catalog/shopping_cart.php modifictaions.
If you use the Simple and you don't plan on using the advanced method you don't really need this.
Complete Instructions in download.

If you use this and you like it (or don't) please send me an email (in download) or you can comment at this actual attribute topic that was started a while back
http://forums.oscommerce.com/index.php?showtopic=69543


"Actual Attribute Price 1.3.5"

01/17/2005 by CrashWave

Sorry everyone found another
And no I will not say this is the last one because I jinx it

Anyway got an email telling me the products without an attribute display as
'0' in shopping cart and checkout
I guess everyone was concentrating on whether the script worked with
attributes no one checked without. I didn't..

Here is the fix also attached full changes
SIMPLE
5-in classes/shopping_cart.php above
includes bug fix from 1.3.4 where if there was no attribute product price =
0
$products_array[] = array('id' => $products_i
add
//actual attribute//hadir
if (isset($this->contents[$products_id]['attributes'])) { //fix for 1.3.4
if ($this->attributes_prefix($products_id) == ''){
$the_final_price = $this->attributes_price($products_id);
} else
$the_final_price = ($products_price +
$this->attributes_price($products_id));
}else $the_final_price = ($products_price); //eof actual attribute//hadir
//fix for 1.3.4
///////////////////////
All others
8-In Classes/order.php
above
$this->products[$index] = array('qty' => $products[$i]['quantity'],
Add
//actual attribute price//hadir
if (isset($cart->contents[$products[$i]['id']]['attributes'])) {//fix 1.3.4
if ($cart->attributes_prefix($products[$i]['id']) == ''){
$the_final_price = $cart->attributes_price($products[$i]['id']);
} else
$the_final_price = ($products[$i]['price'] +
$cart->attributes_price($products[$i]['id']));
}else $the_final_price = ($products[$i]['price']); //eof actual
attribute//hadir//fix 1.3.4
///////////////////////////////
9a- for customer group pricing only
under
if ($orders_customers = tep_db_fetch_array($orders_customers_price)) {
add
//actual attribute price//hadir
if (isset($cart->contents[$products[$i]['id']]['attributes'])) {//fix 1.3.4
if ($cart->attributes_prefix($products[$i]['id']) == ''){
$grp_final_price = $cart->attributes_price($products[$i]['id']);
} else
$grp_final_price = ($orders_customers['customers_group_price'] +
$cart->attributes_price($products[$i]['id']));
}else $grp_final_price = ($products[$i]['price']); //eof actual
attribute//hadir//fix 1.3.4
//eof


Actual Attribute Price 1.3.4

01/17/2005 by CrashWave

Ok hopefully this will be the last one.
Thank you all who have emailed me. We found a few bugs and hopefully this is the last one.
Thanks to maxi maximilian for the pointing out the checkout bug.
in classes/order.php
above
$this->products[$index] = array('qty' => $products[$i]['quantity'],

add
//actual attribute price//hadir
if ($cart->attributes_prefix($products[$i]['id']) == ''){
$the_final_price = $cart->attributes_price($products[$i]['id']);
} else
$the_final_price = ($products[$i]['price'] + $cart->attributes_price($products[$i]['id']));
//eof

and change
'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']),

to
'final_price' => $the_final_price,


Also fixed bug were I forgot to add a ')' to a line(thanks Mark)

Contains Complete instructions.

I tested this till checkout. Email was correct. Admin Orders was correct and invice was correct.


"Actual Attribute Price 1.3.3"

01/16/2005 by crashwave

Someone emailed me saying file was not uploaded correctly.
Here it is again


"Actual Attribute Price 1.3.2"

01/15/2005 by crashwave

I forgot to add changes to display the correct price in shopping_cart product rows.
Thanks for the email informing me of this.


"Actual Attribute Price 1.3.2"

01/10/2005 by crashwave

This has all the changes that need to be done. NO FILES TO ADD.

changes price to attrinute price if prefix ''

allows 'o'

NOW WORKS WHEN ADDING MORE THAN ONE OF THE SAME PRODUCT TO CART :)


NOT MINE

01/10/2005 by crashwave

DON"T ADD MY SHOPPING_CART.PHP IN THE FILE TO YOUR DIRECTORY I JUST ADDED IT FOR COMPARISON.
I have several other changes in it that will not work on oscommerce.
All the changes that need to be added are in the txt file


SORRY

01/10/2005 by crashwave

SORRY
I forgot to remove two lines from the older versions I added

YOU DO NOT NEED ANY OTHER FILES OR CHANGES OTHER SHOPPING_CART.php

remove or comment these lines in function attributes_price($products_id) {
in classes/shopping_cart.php

// elseif (($attribute_price['price_prefix'] == '') && ($attribute_price['options_values_price'] != '0')) {
// $attributes_price += tep_adjust_price($attribute_price['options_values_price'],$products_price); }


Full package?

01/10/2005 by Darren Power

Can someone please get a full working package up here for this? I've tried myself to action everyones updates and am getting muddled as I'm no developer...

Cheers.


Great Contribution

01/10/2005 by Daren Burbridge

What a great contribution Internet business opportunities


Advanced "Actual Attribute Price 1.3"

01/10/2005 by CrashWave

OK This works
worked for me on several sites
Allows attribute price to replace product price when added to cart.
Allows '0' values (might be usefull to some)

For now you can see it at
http://www.dailywholesale.com/product_info.php?products_id=34

works on loaded too


Bug fix with '-' and '+' price_prefix.

01/04/2005 by Artem Yeleyko

Fixed bug with incorrect final_price when the price_prefix are '-' or '+'.
Fixed bugs when there are more than one attribute for product.
(note: if there are more than one price_prefix of attribute empty ('') for product then it will use just first options_values_price).
Order total now calculate correct totals.
5.01.2005
Artem Yeleyko postmaster@lviv.ws


Actual Attribute Price v1.2.2

06/15/2004 by Nick Le Mouton

Fixed bug with special price/product price. If a product had a special price then an incorrect price was calculated on the shopping cart page.


Actual Attribute Price v1.2.1

03/03/2004 by Ali Rashid

Fixed a Bug in shopping_cart.php which shows up in totals against each item when attributes have price =0 (Showed up as 0 or -ve sometimes)
Works now even with no prefix and 0 price.Works with attributes with no price changes like Color etc.


Actual Attribute Price v1.2

01/23/2004 by Thomas Bell

23/01/2004 - fixed bug in shopping_cart.php which caused subtotal on shopping cart to display incorrectly
on items using actual attribute mod When tax is added to the product price.


V1.1

12/16/2003 by Christopher Caruso

Sorry - my update didn't pan out either. We're stuck on this one.


Actual Attribute Price V1.1 missing docs

12/16/2003 by Christopher Caruso

Added the much needed missing categories_lookup.php file found on the authors website in order to make this script work. Also, modified the script to function with v2.2 MS2/CVS important data omitted from the previous release. Good job to the author, we needed something like this.


Actual Attribute Price V1.0a

12/10/2003 by Jason West

Changes:
---------------------------
12/10/2003 - found bug in shopping_cart.php that caused attributes with no price and no price prefix to be displayed as negitive numbers in the cart.


Actual Attribute Price V1.1

12/10/2003 by Joe Kushner

fixed the problem with the items with no attributes showing negative prices


Actual Attribute Price V1.0

12/09/2003 by Jason West

This contribution is designed for those of us who would rather use a product attributes actual price rather than use a calculator to figure out the option price.

Example:
--------

Tire A
Price: $84.99

Options: Size 1
Size 2 ($89.99)
Size 3 ($95.99)
Size 4 ($109.99)

Versus
-------

Tire B
Price: $84.99

Options: Size 1
Size 2 ($5.00)
Size 3 ($11.00)
Size 4 ($25.00)

As you can plainly see, it is much easier for a customer to figure out the cost of Tire A Size 4 than it would be for Tire B Size 4.

Installation:
-------------
1. Copy my updated code from:
includes/classes/shopping_cart.php
Includes/functions/general.php

(code is marked by "AAP V1.0")
2. Your are done! Now wasn't that easy?

Using AAP:
----------
It's very simple. When creating a product
attribute, leave the price prefix empty and
insert the price you want to sell the product
for with that attribute. (i.e. Tire A Size 4)

I hope you find this usefull, I know I did.


As experienced osCommerce Experts, we are glad to help you to install this addon. The process is as follow:
  • You placed an order of this addon or other addons, checkout and receive an email notification of order status
  • Or you can contact us directly using email form, asking us to install this addon for you
  • Once you and we have agreed to start, please send us FTP access by email
  • You will be updated of the installation status
  • You may ask for customization jobs of this addon

You Risk Nothing: No Upfront Payment Required

Our NO RISK POLICY is clear. You pay only for the successful completion of the installation. If you are not satisfied or we are unsuccessful, your site will be returned to its previous working state and you pay nothing! NOT A PENNY!
Once you are satisfied with our help, you can pay us through Paypal.

OUR NO RISK GUARANTEE 1. No upfront payment is required 2. You only pay on successful completion 3. Money Back Guarantee within 90 Days ! You don't get guarantee like this any where else . . . You Don't Risk One Peny!
Add to Cart:



Copyright © 2006-2012 www.oscexp.com