Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

deeman001

Archived
  • Posts

    17
  • Joined

  • Last visited

Posts posted by deeman001

  1. Sorry - you wanted that from includes/classes/shopping_cart.php, right?

     

    This is what I have:

    function attributes_price($products_id, $prod_price) {
    $attributes_price = 0;
    
    if (isset($this->contents[$products_id]['attributes'])) {
    reset($this->contents[$products_id]['attributes']);
    while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {
    $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");
    $attribute_price = tep_db_fetch_array($attribute_price_query);
    if ($attribute_price['price_prefix'] == '+') {
    $attributes_price += $attribute_price['options_values_price'];
    } elseif ($attribute_price['price_prefix'] == '-') {
    $attributes_price -= $attribute_price['options_values_price'];
    } elseif ($attribute_price['price_prefix'] == '') {
    $attributes_price += $attribute_price['options_values_price'] - $prod_price;
    }
    }
    }
    
    return $attributes_price;
    }

     

    Barbara,

    What is the prefix (-,+ or '') for the attribute that you are having trouble with?

  2. I just found this line in my shopping_cart.php... Does it need to be changed?

     

    'final_price' => ($products_price + $this->attributes_price($products_id)), (line 492)

     

    Don't change that line, keep it the way it is.

     

    I'd like to see your the code for your function. Can you send me the code snippet for the function that looks like this:

    function attributes_price($products_id, $prod_price) {

  3. hi Darren...

     

    Thanks for the fix, unfortunatly it didn't work for me... I think I followed everything correctly...

    When I add something to the shopping cart, I get this error:

     

    Warning: Missing argument 2 for attributes_price() in /.../catalog/includes/classes/shopping_cart.php on line 376

     

    Line 376 in my shopping_cart.php is:

     

    function attributes_price($products_id, $prod_price) {

     

    Any ideas?

     

    Thanks,

    ~Barbara~

     

    Barbara,

     

    Do a find(search) on your code for:

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

     

    Only update the files that ARE NOT in the ADMIN section of the site, since I did not update the similar function in the admin files.

     

    Replace the lines of code you find from your above search, with this line:

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

     

    Let me know what happens.

    darren

  4. Thank you, Amber! :)

    My store is open starting today. I am still using the +/-. I'll try and figure it out next week. If you solve the problem before I do, please, keep me posted.

     

    hugs,

    Simone

     

     

    I was able to fix the problem of the attribute item being added to the product price in the product details and totals of checkout_confirmation.php for the ActualAttributesPrices_refreshed contrib.

     

    I updated two files.

     

    /////////// FIRST FILE UPDATED ///////////////

    In the first file I updated the function "attributes_price()" in catalog\includes\classes\shopping_cart.php at approx line 293 (see my code at the bottom of this post):

     

    Updates to the function:

    My new function now accepts a second variable (product price $prod_price) which is then subtracted from the attribute price if the price_prefix == '' **code below

     

    This is what step 2 of the AAP_Install.txt instructions for the ActualAttributesPrices_refreshed contrib said to do but it didn't work for me so (DONT DO THIS):

    /catalog/includes/classes/shopping_cart.php

    -- two -------------------------------------------------------------------------

    Same file:

    DELETE:

     

    function attributes_price($products_id) {

    $attributes_price = 0;

     

    if (isset($this->contents[$products_id]['attributes'])) {

    reset($this->contents[$products_id]['attributes']);

    while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {

    $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" .

     

    (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");

    $attribute_price = tep_db_fetch_array($attribute_price_query);

    if ($attribute_price['price_prefix'] == '+') {

    $attributes_price += $attribute_price['options_values_price'];

    } else {

    $attributes_price -= $attribute_price['options_values_price'];

    }

    }

    }

     

    return $attributes_price;

    }

     

    ADD:

     

    //PHPMOM.COM AAP

    function attributes_price($products_id) {

    $attributes_price = 0;

     

    if (isset($this->contents[$products_id]['attributes'])) {

    reset($this->contents[$products_id]['attributes']);

    while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {

    $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" .

     

    (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");

    $attribute_price = tep_db_fetch_array($attribute_price_query);

    if ($attribute_price['price_prefix'] == '+') {

    $attributes_price += $attribute_price['options_values_price'];

    } elseif ($attribute_price['price_prefix'] == '-') {

    $attributes_price -= $attribute_price['options_values_price'];

    }

    else

    $attributes_price+= $attribute_price['options_values_price'];

    }

    }

     

    return $attributes_price;

    }

    -- three -----------------------------------------------------------------------

     

    DO THIS TO catalog\includes\classes\shopping_cart.php

    This is the new code I used to replace the instructions above:

    //PHPMOM.COM AAP

    function attributes_price($products_id, $prod_price) {

    $attributes_price = 0;

     

    if (isset($this->contents[$products_id]['attributes'])) {

    reset($this->contents[$products_id]['attributes']);

    while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {

    $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");

    $attribute_price = tep_db_fetch_array($attribute_price_query);

    if ($attribute_price['price_prefix'] == '+') {

    $attributes_price += $attribute_price['options_values_price'];

    } elseif ($attribute_price['price_prefix'] == '-') {

    $attributes_price -= $attribute_price['options_values_price'];

    } elseif ($attribute_price['price_prefix'] == '') {

    $attributes_price += $attribute_price['options_values_price'] - $prod_price;

    }

    }

    }

     

    return $attributes_price;

    }

     

    /////////// SECOND FILE UPDATED ///////////////

    I made 1 update to the array in catalog\includes\classes\order.php:

    My update to the array now passes a second variable (product price $prod_price) into the updated function **code below

     

    There were no instructions in the original install document for this

     

    DO THIS TO catalog\includes\classes\order.php

    This is the updated line of code I used for the second file catalog\includes\classes\order.php:

    SEARCH FOR THIS

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

     

    REPLACE WITH THIS

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

    It seems to work fine for me now. Let me know if you find any bugs.

    Darren

  5. I've been tracking this issue all the way from 2003, but can't find a solution.

     

    Does anyone know of a solution to this problem?

     

    There are two payment options, a Credit Card (Authorize.net) and a gift voucher balance. The gift voucher balance is greater than the total, so I check the box that says "Tick to use Gift Voucher account balance" and I then click continue. A Credit Card error is returned that says "The first four digits of the number entered are: If that number is correct, we do not accept that type of credit card.

    If it is wrong, please try again."

     

    I get the Credit Card error because I didn't enter a CC number, but I am paying the total with my Voucher balance and not the Credit Card.

     

    Any Help would be appreciated.

  6. I hope someone else has had this problem, because I haven't been able to find any posts about it.

     

    My problem is that all Gift Vouchers show up with a $0 in the cart, during checkout and in the subsequent emails.  I originally installed CCGV v5.13d and then today maticulously went line by line using the new "Credit Class & Gift Voucher v5.14" package.

     

    When I setup the "GIFT_25" product within a "Gift Certificate" Category, the admin tool displays the product and price correctly:

    gv_25.gif

    Price: $25.00

    Quantity: 1000

     

    Though when I attempt to purchase the $25 Gift Voucher the cart displays an amount of $0.  It lets me checkout but the email it sends me says:

    ...

    ----------------------------------------------------------------------------------------

    Congratulations, You have received a Gift Certificate worth 0

    ----------------------------------------------------------------------------------------

    ...

     

    I've checked all of the DB tables and they show the correct $25.00 value.

     

    Any suggestions or thoughts on how I can get this working?

    I unistalled and reinstalled the CCVG contribution and found that I had missed several code blocks. This issue was resolved after performing this action.

  7. The French of which you speak is located in the .sql file that is uploaded into the db. 

     

    I don't know much about editing those files, but if your translations are correct, I will try it

     

    Thanks

    Collectables

     

    Here is how you fix it.

    1. Get the Rigadin's Full Package 5.13 dated, April 22, 2005.

    2. Open the "catalog\includes\modules\order_total\ot_gv.php" file.

    3. Copy the function and code for "function install (...)" (approx line# 321)

    4. Replace the french "function install ()" lines on your web server file "catalog\includes\modules\order_total\ot_gv.php" with the ones copied from version 5.13.

     

    There is also a SQL fix for the French Database config data.

    1. Search for "CCGV v5.14 addon with French - English SQL fix" author aarondwyer dated 28 Jul 2005

    2. Run the SQL query against your database or manually update the data with the appropriate cell information.

     

    Hope this helps, deeman.

  8. I hope someone else has had this problem, because I haven't been able to find any posts about it.

     

    My problem is that all Gift Vouchers show up with a $0 in the cart, during checkout and in the subsequent emails. I originally installed CCGV v5.13d and then today maticulously went line by line using the new "Credit Class & Gift Voucher v5.14" package.

     

    When I setup the "GIFT_25" product within a "Gift Certificate" Category, the admin tool displays the product and price correctly:

    gv_25.gif

    Price: $25.00

    Quantity: 1000

     

    Though when I attempt to purchase the $25 Gift Voucher the cart displays an amount of $0. It lets me checkout but the email it sends me says:

    ...

    ----------------------------------------------------------------------------------------

    Congratulations, You have received a Gift Certificate worth 0

    ----------------------------------------------------------------------------------------

    ...

     

    I've checked all of the DB tables and they show the correct $25.00 value.

     

    Any suggestions or thoughts on how I can get this working?

  9. Keenanj, I will begin a OC - BP2.0 integration later this month. Would you share the solution to your question with me? I would appreciate your insight. thanks.

     

    Does anyone have the bluepay module working with a bluepay 2.0 account?

     

    I am testing the bluepay  module with BP 2.0 account.  I am using 2.2 MS-2

     

    I use a shared ssl cert and am getting the login page after the order submit.  bp gets the transaction osc does not.

     

    Many people seemed to have the same issue has it been worked throught yet?

×
×
  • Create New...