Loaded Commerce Community

Banner


Board index » Web Design and Development » Contribution Announcements

All times are UTC - 5 hours




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Actual Attribute Price
PostPosted: Mon Jan 10, 2005 3:32 am 
Offline
CRE Talented
User avatar

Joined: Mon Sep 13, 2004 12:00 am
Posts: 327
Location: USA
Sorry I just saw the poll on this
http://www.creloaded.com/modules.php?na ... pic&t=2542

I had this done a while ago. This is not from the contribution on osc as that does not work (I tried it after I did this one)
I added it to osc contributions as advanced actual attribute price 1.3 (2March05 now 1.4)
http://www.oscommerce.com/community/contributions,1716

Why advanced?
1- It works see here
http://www.dailywholesale.com/product_i ... ucts_id=34
2- allows for zero values

will add to creloaded downloads too

Please tell me if anyone has a problem with this. I have tested on 2 sites on the same server.


Last edited by crashwave on Wed Mar 02, 2005 10:47 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 10, 2005 1:37 pm 
Offline
CRE Talented
User avatar

Joined: Mon Sep 13, 2004 12:00 am
Posts: 327
Location: USA
SORRY
I forgot to remove two lines from the osc contribution I had added

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); }


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 10, 2005 2:54 pm 
Offline
CRE Talented
User avatar

Joined: Mon Sep 13, 2004 12:00 am
Posts: 327
Location: USA
http://www.dailywholesale.com/creloaded ... s_1.4.html


Last edited by crashwave on Wed Mar 02, 2005 10:48 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Update
PostPosted: Sun Jan 16, 2005 12:30 am 
Offline
CRE Talented
User avatar

Joined: Mon Sep 13, 2004 12:00 am
Posts: 327
Location: USA
I updated the file in the downloads and contribution page.
I had forgotten to add the change to show the changed price of the product in the shopping cart it was adding the price. the subtotla showed correctly but the product price was incorrect.


Top
 Profile  
 
 Post subject: Re: Actual Attribute Price
PostPosted: Sun Jan 16, 2005 4:06 pm 
Offline
CRE Legend

Joined: Sun Nov 09, 2003 1:00 am
Posts: 7301
Location: Baconton, GA USA
I'm not sure if that download will catch. I thought I had those turned off. As we are having trouble with them, and working on the code as we speak.

David

_________________
My CRE Loaded FAQ List
CRE Loaded Hosting


Top
 Profile  
 
 Post subject: Re: Actual Attribute Price
PostPosted: Sun Jan 16, 2005 5:48 pm 
Offline
CRE Talented
User avatar

Joined: Mon Sep 13, 2004 12:00 am
Posts: 327
Location: USA
Thanks David

Found a bug. Thanks to maxi maximilian for pointing out the checkout bug.
Checkout price was not showing new attribute changes. I didn't know there was a FINAL final price that wasn't the same as cart finale price. anyway here is the new link

use link below


Last edited by crashwave on Wed Jan 19, 2005 7:20 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Actual Attribute Price
PostPosted: Wed Mar 02, 2005 10:45 am 
Offline
CRE Talented
User avatar

Joined: Mon Sep 13, 2004 12:00 am
Posts: 327
Location: USA
Complete working instructions
http://www.dailywholesale.com/creloaded ... s_1.4.html

_________________
$10/hr for OSC/CRE Dev


Top
 Profile  
 
 Post subject: Re: Actual Attribute Price
PostPosted: Wed Jul 26, 2006 4:43 pm 
Offline
CRE Newbie
User avatar

Joined: Sun Mar 05, 2006 1:00 am
Posts: 9
Hi i'm running on Creloaded 6.2.05.

I followed your instructions but got stuck at part 3 where you have to edit product_info.php which in my case was product_info.tpl.php located in '/catalog/templates/content'

I could not find the line "if ($products_options['options_values_price'] != '0') {"

I edited every other thing as mentioned on your guide except the product info section and when i try it, the price did not display correctly.

I have 2 options running on the attributes, one of which was valued 0.

Please advise
Thanks

Sorry I think I posted on the wrong area please put my post back in place thanks but my error is related. My guess is that in Creloaded 6.2.05 there is no longer that option in "product info".

Cheers


Top
 Profile  
 
 Post subject: Re: Actual Attribute Price
PostPosted: Tue Jul 24, 2007 12:47 pm 
Offline
CRE Addict
User avatar

Joined: Sat Feb 04, 2006 1:00 am
Posts: 264
Ampex wrote:
Hi i'm running on Creloaded 6.2.05.

I followed your instructions but got stuck at part 3 where you have to edit product_info.php which in my case was product_info.tpl.php located in '/catalog/templates/content'

I could not find the line "if ($products_options['options_values_price'] != '0') {"

I edited every other thing as mentioned on your guide except the product info section and when i try it, the price did not display correctly.

I have 2 options running on the attributes, one of which was valued 0.

Please advise
Thanks

Sorry I think I posted on the wrong area please put my post back in place thanks but my error is related. My guess is that in Creloaded 6.2.05 there is no longer that option in "product info".

Cheers
I agree, same issue here too, there is no line in product_info that says:

($products_options['options_values_price'] != '0') {"

_________________
Handmade natural body creams, mineral makeup, skin care, moisturizers & tons more!
http://www.LureBeauty.com


Top
 Profile  
 
 Post subject: Re: Actual Attribute Price
PostPosted: Mon Aug 06, 2007 11:39 am 
Offline
CRE Freak
User avatar

Joined: Mon Aug 06, 2007 12:00 am
Posts: 39
I am looking fo the same mod too. Anyone know of a fix for this?


Top
 Profile  
 
 Post subject: Re: Actual Attribute Price
PostPosted: Wed Aug 08, 2007 1:05 pm 
Offline
CRE Addict
User avatar

Joined: Sat Feb 04, 2006 1:00 am
Posts: 264
Moosh wrote:
I am looking fo the same mod too. Anyone know of a fix for this?
I guess no one has this contribution perfected? I wish I knew more about configuring php :(

_________________
Handmade natural body creams, mineral makeup, skin care, moisturizers & tons more!
http://www.LureBeauty.com


Top
 Profile  
 
 Post subject: Re: Actual Attribute Price
PostPosted: Wed Aug 15, 2007 10:58 am 
Offline
CRE Newbie
User avatar

Joined: Sat May 13, 2006 12:00 am
Posts: 4
Location: Bristol
Hi,

Does anyone know if this can be downloaded anywhere else as the site has been suspended!?

Or can someone send me a copy?

Thanks,

Chris


Top
 Profile  
 
 Post subject: Re: Actual Attribute Price
PostPosted: Wed Aug 15, 2007 5:13 pm 
Offline
CRE Newbie
User avatar

Joined: Sat May 13, 2006 12:00 am
Posts: 4
Location: Bristol
I managed to get the one i installed into OSC MS2 working with my 6.2 pro (patch 10).

I haven't had a chance to test sub-products with this yet though.

Insert includes/functions/gneral.php

[php]/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// BOF AAP V1.0
// actual attribute price adjustment (used with no price prefix only)
function tep_adjust_price($attribute, $price) {
global $currencies;

$adjustment = ($attribute-$price);
return $adjustment;
}
//EOF AAP V1.0
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
[/php]

Replace admin/attributes.php line 29 from:

[php]
$price_prefix = (tep_not_null($HTTP_POST_VARS['values_price_prefix'][$option_id][$value_id]) && (tep_db_prepare_input($HTTP_POST_VARS['values_price_prefix'][$option_id][$value_id]) == '-')) ? '-' : '+';
[/php]

to:

[php]
$price_prefix = $HTTP_POST_VARS['values_price_prefix'][$option_id][$value_id];
[/php]

Replace includes/classes/shopping_cart.php line 326-330, 334-338, 343-347 from:

[php]
if ($attribute_price['price_prefix'] == '+') {
$this->total += $qty * tep_add_tax($attribute_price['price'], $products_tax);
} else {
$this->total -= $qty * tep_add_tax($attribute_price['price'], $products_tax);
}
[/php]

to:

[php]
if ($attribute_price['price_prefix'] == '+') {
$this->total += $qty * tep_add_tax($attribute_price['price'], $products_tax);
} elseif ($attribute_price['price_prefix'] == '-') {
$this->total -= $qty * tep_add_tax($attribute_price['price'], $products_tax);
} else {
if ($attribute_price['price'] > '0') {
$this->total += $qty * tep_add_tax(tep_adjust_price($attribute_price['price'], $products_price), $products_tax);
}
}
[/php]

Insert the following just before [php]if ( !is_array($value) ) {[/php] on line 372:

[php]
$products_query = tep_db_query("select products_price from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
$products_stuff = tep_db_fetch_array($products_query);
$products_price = $products_stuff['products_price'];
[/php]

Replace lines 375-379, 383-387, 392-396 from:

[php]
if ($attribute_price['price_prefix'] == '+') {
$attributes_price += $attribute_price['price'];
} else {
$attributes_price -= $attribute_price['price'];
}
[/php]

to:

[php]
if ($attribute_price['price_prefix'] == '+') {
$attributes_price += $attribute_price['price'];
} elseif ($attribute_price['price_prefix'] == '-') {
$attributes_price -= $attribute_price['price'];
} else {
$attributes_price += tep_adjust_price($attribute_price['price'], $products_price);
}
[/php]

I used this contribution for OSc as the basis for these changes:

Actual Attribute Price V1.0 - Released 12/9/2003
------------------------------------------------
Copyright (c) 2003 Jason West
http://www.moto-works.com
Released under the GNU General Public License


Top
 Profile  
 
 Post subject: Re: Actual Attribute Price
PostPosted: Sun Sep 09, 2007 8:00 pm 
Offline
CRE Newbie
User avatar

Joined: Sat Sep 01, 2007 10:11 pm
Posts: 4
Wow, that was great, rickcj. Worked like a charm. For those doing this, just remember to remove the plus or minus sign (in the Admin backend) if you want the actual value. Leave that field blank. Thanks again!


Top
 Profile  
 
 Post subject: Re: Actual Attribute Price
PostPosted: Thu Sep 20, 2007 4:40 pm 
Offline
CRE Addict
User avatar

Joined: Sat Feb 04, 2006 1:00 am
Posts: 264
Thanks for this! I tried this but it made my right column disappear ; and when i try to add to cart, it goes to a blank page.

Also regarding this part , I have this line in more than one place, and 372 is not one of them ... Do you have more of the code that might help?

Insert the following just before PHP:
if ( !is_array($value) ) {
on line 372:

PHP:
$products_query = tep_db_query("select products_price from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); $products_stuff = tep_db_fetch_array($products_query); $products_price = $products_stuff['products_price'];

_________________
Handmade natural body creams, mineral makeup, skin care, moisturizers & tons more!
http://www.LureBeauty.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

Board index » Web Design and Development » Contribution Announcements

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
It is currently Mon May 21, 2012 8:46 pm
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Login

Forums Latest Activity

Top Listing

1. Cart2Cart - Shopping...
    Category: Shopping Cart Database Conversion Scripts
    
2. Points & Rewards PLUS!...
    Category: Add-Ons
    
3. Configuration Server...
    Category: Fixes
    
4. Credit Card with CCV
    Category: Payment Modules
    
5. CC7333_ATS
    Category: Templates
    
Show more...

© CRE Loaded is a product of Chain Reaction Ecommerce, Inc. Usage & Privacy Policy