10 replies [Last post]
nakes's picture
Offline
Joined: 09/11/2007
Juice: 3
Was this information Helpful?

Hi all.

I've only just discovered this very good, easy to use and customize ecommerce platform, ubercart.

I'm attempting to customize the shopping cart to function as a quotation cart instead of a shopping cart, the difference being no payment or checkout is required just a request of quotation (RFQ). The RFQ would be sent to the shop owner who will respond the customer with a quotation for the required products.

I've managed to customize it to the extent where a product can be selected and added to the quotation cart (renamed to quotation cart by renaming the block title). However, it still displays the carts "Total" monetary value. I've tried to hide this by de-selecting in the "table display settings" but it still shows the "total" and Subtotal in the cart. Is there another way to ensure that these values are not displayed?

Also, on another issue. I need for customers to be able to specify in their "request for quotation" the size/s (3 different sizes) of the required products as well as custom text that they need to display on the products they need.

How can I further customize ubercart to get what I need from the quotation cart?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Quotation Cart

Letting the customer specify certain things about a product is what the Attributes module is all about. You can set up a Size attribute with three different options, and then apply them to any or all of your products. Since you aren't telling your customers how much things cost yet, you won't have to worry about the price of the options. For custom text, just create an attribute with out any options. This causes a text field to show up on the product page.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Quotation Cart

Lyle helped you with the attributes, I won't be quite so helpful because I'll point you toward Drupal theme development. Not sure how much experience you have with Drupal or PHP, but you can override parts of Drupal sites and module displays using theme functions. In this case, the cart blocks and view page have theme functions that you can override to totally change the display to your liking.

We need to get a tutorial up here soon about overriding theme functions. Smiling

popscythe's picture
Offline
Joined: 12/27/2007
Juice: 38
Re: Re: Quotation Cart

I'd very much like to see a tutorial on overriding theme functions as mentioned above.

Or at least have a little more information about where to start looking for this code. Anybody know?

psynaptic's picture
Offline
Early adopter... addicted to alphas.Not KulvikTheminator
Joined: 08/28/2007
Juice: 731
Re: Re: Re: Quotation Cart

All HTML output to the browser should be generated by a theme_ function in the module. You can get a list of theme functions by searching your installation for 'theme_'. When you've found the function that's generating the output you would like to override, simply copy the theme_ function to your template.php and rename it by replacing theme_ with yourthemename_. Then you can modify the function without messing with your core files.

najibx's picture
Offline
Joined: 11/09/2007
Juice: 24
more customization

Hello

i was able to theme the shopping cart block content by overiding
function MYTHEME_uc_cart_block_content(). Here I can remove Qty, Price, Total.

However, when viewing the cart page /cart, I want to remove the Qty, price and subtotal also. It is located in the
function uc_cart_view_table($form_state, $items) ()

Also in the Viewing cart content, before checking out, defined in
function uc_cart_checkout_pane() {

But this is not themeable function. How do I go about there?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: more customization

You may have to do something I've done before which is to simply copy the code out of the cart module into a custom module, rename the cart pane and fiddle with it yourself. Some of the table stuff can be altered out using the table display settings, but it sounds like you want to make such a drastic change that you could just do your own cart display and remove the default one altogether.

najibx's picture
Offline
Joined: 11/09/2007
Juice: 24
hmm

Looks like somebody has done it in http://www.ubercart.org/forum/development/952/shopping_cart_and_quote_cart didn't mentioned how it was done. I tried to replicate (rather than remove original cart) but I have to remove certain functions as it was already defined in uc_cart_checkout_pane.inc

Both original cart and new Quote cart are enable. But item never get added into my quote cart
I am running multisite (sharing codes), which my other sites might be using the uc_cart.

Why isn't the other two (or releted) functions made themeable? It would offer more flexibility?

Guest (not verified)
Guest's picture
Same problem

I have the same question, how do I disable any actual payment methods and just have a request for quotation only in ubercart?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Same problem

Essentially, you should just never enable the Payment module and change the text for the submit buttons on the checkout pages from "Review Order" and "Submit Order" to "Review Quotation" and "Submit Quotation". Something like that should do you just fine.

popscythe's picture
Offline
Joined: 12/27/2007
Juice: 38
Re: Quotation Cart

One thousand internets to this person!

You're a titanic juggernaut of helpfulness.

Thanks.