Needs work
Project:
e-Commerce
Version:
6.x-4.x-dev
Component:
product
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Apr 2010 at 10:13 UTC
Updated:
25 Jun 2013 at 11:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
gordon commentedI would loved to be able to do this, but this only figure for the price is the starting price. You this can be altered on the fly with the help of charges so you can add tax, levies and even discounts directly to the final product price even before you start manipulating them in the transaction.
There are kludges that you could do but they would only work on a small number of products and if you just directly sorted the products by price this will end up very confusing for the customer where products could end up out of order.
Also before you ask adding the final price to the database is not really an option because this can be altered based upon any number of things and the final price could be different between customers based upon any number of modifications to the charge.
Comment #2
markdamo commentedI don't have any additional changes/discounts to add to the product pricing so kludges may work for me. It just seems strange that a function of 'Sort by Price' which you can do on most ecommerce sites is not available in the Drupal ecommerce module. Thanks for the info anyway.
Comment #3
xen commentedSuggestion: make the price available under the name 'base price' and make it clear that it's the price before all the magic. It works for simple shops, and those doing funny things with prices will just have to deal with it.
(I should make a patch.. Yes.. I'll put it on my todo)
Comment #4
rubblemasta commentedJust come across the same roadblock recently myself, coincidence that this is a fresh discussion. I'm new to Drupal so I doubt that I've addressed this in the recommended way but my changes seem to be in line with what a patch would do rather than an override of some kind. Without further ado...
I modified ec_product.views.inc, more specifically the $data['ec_product']['price'] array:
Cleared my cache and it seems to work. The product_list view lets me add a sort criteria "Product: Price". Is there anything I've missed or any better way of doing this?
Comment #5
gordon commented@Xen, that is a great idea, If you want to submit a price and I will commit it.
Comment #6
gordon commented@runbblemasta this is ok, but the reason I didn't do this is because results will vary, and may give unexpected outcomes depending on how you configure additional charges. The suggestion of having a base price which gives the raw price will work great.
Comment #7
xen commentedAdded in a base_price field.
Comment #9
gordon commentedSubmit it again against the dev branch so the testing is run.
Comment #10
gordon commented#7: 763238.patch queued for re-testing.
Comment #11
gordon commentedThis handler this going to display the adjusted price and not the base price.
This is going to need a new display handler which just works on the field.
Powered by Dreditor.
Comment #12
xen commentedThought it was to quick.
Comment #14
carlhinton commentedI implemented this on my site, works a treat
Comment #15
xen commented