Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / product attributes price modifiers affectec by other data

product attributes price modifiers affectec by other data

Locked

Views: 1,219

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
29 Jun 2006, 9:49 PM
#1
sanguisdesign avatar

sanguisdesign

Inactive

Join Date:
May 2005
Location:
Western MA, USA
Posts:
588
Plugin Contributions:
1

product attributes price modifiers affectec by other data

hello again,
working on yet anoth crazy mod for ZC and need a little advice.
my main problem is that I cant seem to locate the form processing code for the 'add to cart'. I know it is w/i the product_info stuff somewhere but I have been grepping for the actionad and cant find it.

what I am trying to do. my products have attribte that have to run through a complex eqaution to get the the final price.
one school says do it live using AJAX, I could calulate an attrbute value in a hidden field as well as have it update. the value live on the site before they hit add to cart, and then have the cart add to cart w/ that price. if that is the what shoukd I call the field?.
the other otion is to the the math after I hit the add to cart button. where can I find it.

JOsh

1 Jul 2006, 7:21 AM
#2
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Re: product attributes price modifiers affectec by other data

the processes performed when adding an item to the cart function start with includes/main_cart_actions.php at line 41, which calls the function actionAddProduct() in includes/classes/shopping_cart.php

You should note that adding a product to the cart doesn't necessarily fix the price: the price is recalculated when the cart is restored after logging in, when viewing the shopping cart page, and when proceediing to checkout. Those calculations are performed (eventually) by the function calculate() in includes/classes/shopping_cart.php

If you do decide to edit that file, be aware that it is a core file and there is no override capability for it.

6 Jul 2006, 7:45 PM
#3
sanguisdesign avatar

sanguisdesign

Inactive

Join Date:
May 2005
Location:
Western MA, USA
Posts:
588
Plugin Contributions:
1

Re: product attributes price modifiers affectec by other data

bunyip,
I cant find these files, and it is prob be caseu I did not mention that the cart I am working on is 1.2.7
any more advise for me oh wise one?

JOsh