Closed (fixed)
Project:
e-Commerce
Version:
master
Component:
flexicharge
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
8 Sep 2006 at 03:49 UTC
Updated:
30 Nov 2006 at 10:59 UTC
Jump to comment: Most recent file
This patch will enable me to tag flexicharge as 4.7. Basically it is two changes
1) cart_checkoutapi()
There is more control over the generation of subtotals lines (and little things like suppressing a subtotal if it is right before the total. Also, it allows hook_checkoutapi implementers to use callbacks so that calculations can be made based on other things in the cart.
2) store_calc_gross()
Because the invoice total is calculated separately here, we mirror the way cart_checkoutapi calculates the total.
My fingers crossed!
| Comment | File | Size | Author |
|---|---|---|---|
| #31 | flexicharge.setup.clean.2.jpg | 24.01 KB | dkashen |
| #29 | flexicharge.setup.clean.jpg | 30.56 KB | dkashen |
| #28 | flexicharge.setup.jpg | 18.43 KB | dkashen |
| #19 | threshold.inc | 4.03 KB | sime |
| #16 | pre_flexicharge.patch.txt | 3.76 KB | neclimdul |
Comments
Comment #1
simeflexicharge currently in HEAD can be installed and used on top of this patch.
However, there is a bug preventing the charges saving to ec_transaction_misc on review page submit. But I assume the problem is in flexicharge.
Comment #2
simeYes, and marking needs review.
Comment #3
hendrakieran commentedi'm not sure if the following can be considered as flexicharge, but what i'm looking for is to be able to automatically increase the price by certain constant amount with the decrease in stock (with an option to reset the counter on daily basis).
For example, on Sep 12, I have 50 units of item XYZ, with the initial price of $19.95, I'd like to increase the price by 5cents for every next order till end of the day, so the 1st customer will pay $20, the next one gets it at $20.05, and so on. And if I set it to reset after a day, on Sep 13, if there is something left in the stock, they initial price will be set as $19.95 again.
The rational behind this is to give some kind of incentive for customers place an order early.
Possible? or am i not making any sense ;)
Comment #4
simeThis makes sense. The idea of flexicharge is to implement a nice framework for interacting with the cart. So at the point of calculating the cost, a "provider" .inc file (in the "providers" directory) could query the transaction table for previous sales that day and then provide a price accordingly.
You still need to work out the logic, but once there are a few charge providers created, people should be able to model new charges on existing onces, tweaking the calculations as required.
Comment #5
hendrakieran commentedsime, thanks for the quick response!
i have yet to use this flexicharge module , so may I have the advantage of asking you whether the charging model i mentioned above can be implemented immediately? What kind of modification is required?
Thanks in advance.
Comment #6
simeNo it can't. Both because flexicharge itself is reliant on the cart patch in this thread, and also because the charges so far are only a basic number of simple charges (+/-% etc).
Comment #7
redinkdesign commentedI just attempted to apply this patch which resulted in this message..
patch -p0 < flexicharge_store_cart.patch
patching file cart/cart.module
Hunk #1 FAILED at 707.
1 out of 1 hunk FAILED -- saving rejects to file cart/cart.module.rej
patching file store/store.module
Hunk #1 succeeded at 2508 (offset -3 lines).
Contents of cart.module.reg
My cart.module and store.module versions...
cart.module,v 1.133.2.6 2006/09/09 03:18:14
store.module,v 1.125.2.13 2006/09/09 03:18:14
Comment #8
redinkdesign commentedI just attempted to apply this patch which resulted in the following message:
I'm using
cart.module,v 1.133.2.6 2006/09/09 03:18:14
store.module,v 1.125.2.13 2006/09/09 03:18:14
Comment #9
simePatch updated to latest 4.7
Comment #10
redinkdesign commentedMaybe it's just me..but cart.module still wont patch...any ideas if I'm doing something wrong?
Comment #11
simeHmm, this time the file versions don't seem to be to blame. So cart failed and store was OK?
For reference you are still using cart version 1.133.2.6 . Also, are you using CVS on command line?
I have had some issues with eclipse the last couple of days, so I am right now installing the latest version.
Comment #12
redinkdesign commentedHey, I'm using command line
patch -p0 < patch filestore.module patches fine, but cart.module doesnt...
as for the version #'s
cart.module,v 1.133.2.6 2006/09/09
store.module,v 1.125.2.13 2006/09/09 03:18:14
1 of 3 chunks failed...
Can you just post up your modified cart.module file?
Comment #13
simeThere is cart
Comment #14
simeHere is another attempt at a unified patch. Hopefully I've sorted out the issues.
Comment #15
chueewowee commentedthis patch failed me with the cart.module in flexicharge2
Comment #16
neclimdulhopefully this works. hand patched the previous patch and diffed.
Comment #17
havoc commentedThe patch attached to #16 worked flawlessly on my 4.7 install.
woot!
Comment #18
havoc commentedoops forgot to update to "ready to be committed"
Comment #19
simesyswillim
Try this attached threshold.inc
You'll need to get the latest flexicharge module out as well.
Comment #20
simePatched 4.7, yay. http://drupal.org/cvs?commit=41163
Changing to cvs to get that patched when I'm happy with how it's going.
Comment #21
dkashen commentedHi,
I'm using drupal 4.7 and would like to try to setup flexicharge
for very much the same reasons that the author started it.
I know all the information is here, but some of it seems outdated.
Would someone please take a moment and layout the steps needed to install flexicharge ?
What to patch
and where to get the latest cvs version ?
Thanks,
Comment #22
dkashen commentedFor example,
I think in the ecommerce cvs distribution, both the store and cart
modules are newer:
$Id: cart.module,v 1.133.2.9 2006/09/25 13:52:52 sime Exp $
$Id: store.module,v 1.125.2.14 2006/09/25 13:52:52 sime Exp $
than the patches and cart.module presented in the above thread. All my attempts, have
generated confusing patch errors and other drupal error.
Thanks for any help,
Comment #23
simeYes, I will be doing some instructions soon.
Just briefly for now, use flexicharge from CVS with 4.7 E-commerce. As mentioned above, you now do not need to patch store and cart, that is done.
You then need to go to administer -> store -> settings -> flexicharge
Then take a product to the checkout review screen to see the results.
Comment #24
redinkdesign commentedMy subtotals dont reflect the flexicharge. I'm using site wide to test and I'm setting it at 15%. All I see is Site wide: 0.00.
Comment #25
dkashen commentedthanks for getting back.
after using the latest CVS version of ecommerce,
I placed the CVS flexicharge (comprised of)
flexicharge/flexicharge.info
flexicharge/flexicharge.install
flexicharge/flexicharge.module
in the contrib directory,
and chmod -R a+r (after getting a permission error).
Then I went, admin_modules and enabled flexicharge.
However, admin_store_settings doesn't show any flexicharge options.
Just these:
Store module dependencies
Module name Status
address Installed
parcel Installed
payment Installed
paypal Installed
product Installed
shipping Installed
cart Installed
tangible Installed
file Installed
I'm stuck.
Please help,
thank you,
Comment #26
simeok, when you go to administer > store > settings via the menu, now look at the actual menu, in the menu you should see a flexicharge link
Comment #27
simeI've just updated flexicharge module to fix a problem with saved transactions not storing the charge.
Comment #28
dkashen commentedHi,
I stepped through everything.
reinstalling ecommerce and flex from the latest CVS.
The only thing that said flexicharge was the checkbox option in
admin_modules (which I enabled).
Both the "actual menu" in the middle content block,
and the
administer > store > settings navigation block that's usually in a side bar
do not show anything with flexicharge.
I'll try another clean install of drupal, then ecommerce and flexicharge to see if that changes things.
Thank you,
Comment #29
dkashen commentedHi,
from a clean drupal install
with latest cvs and flexicharge modules (installed under the contrib directory)
I still don't see the admin_store_settings.
I've enclosed a snapshot of the admin navigation with the pertinent subcategories
expanded.
Thank you,
Comment #30
simeHmm
So are you able to go directly to:
http://example.com/?q=admin/store/settings/flexicharge
?
Comment #31
dkashen commentedHi,
I should have thought of that direct access.
anyway, from what I see (attached)
I'm still in nullsville.
Thanks for responding,
Comment #32
dkashen commentedoh,
and flexicharge is enabled in
admin_modules.
Comment #33
dkashen commenteda few debug points,
Fantastico is now installing 4.7.3 ,
so I decided to use that install instead of the manual one I've been doing.
There was a slight difference in the resulting
/files/.htaccess file
other than that. same steps. default install, CVS of ecommerce installed in
modules/ecommerce directory
and flexicharge installed at
modules/ecommerce/contrib/flexicharge
admin_modules is happy with both ecommerce and flexicharge.
I didn't see anything suspicious, but perhaps the above can rule something out.
THx.
Comment #34
simeIt seems odd to me that only flexicharge is not showing up. I don't really have any clues unless I am able to access the system directly.
Comment #35
simeI couldn't reply to your email because your inbox is full. But the answer is "yes I'd like to look"
Comment #36
mrmachine commentedok, i got to this thread via this thread: http://drupal.org/node/68363 which has as it's original attachment the shipbasic module, which i downloaded and installed on a drupal 4.7.3 site with latest ecommerce package ... it looked exactly like what i need - i'm building a site for my mum's shop, which is located in Australia, so the default ecommerce shipping modules are useless for us ... we just need something that allows us to set a shipping charge for each product, nothing fancy. but shipbasic never adds the charges to the review page.
i get the feeling that the shipbasic module was integrated/replaced with the flexicharge module, but if that's the case, i can't figure out how to just do something simple like just be able to add a shipping charge to each product without using the UPS and american stuff.
can someone tell me what modules/versions of modules i need to achieve something so basic to a shopping cart?
Comment #37
simehousekeeping, this will happen as a matter of course