Want to add a sku field (field_item_number_sku) to the cart (we have many similar items and it would make things tons easier to get orders that show our 4 digit sku).

What files would I have to modify to do this?

These files looked like the could do the trick, but don't want to start till I'm sure I'm not missing a piece.

basic_cart.cart.inc
basic_cart_cart_render_block.tpl.php
basic_cart.module

Thanks!

Comments

Alex Dicianu’s picture

Hi,
I've been thinking about this ... The sku is product based. You can add the sku to your products as a field without having to modify the basic cart code at all.

pjbarry21’s picture

Yeah, we already have the sku as a field. What I was hoping to do was to have the sku show in the cart, at checkout and be sent in the email that is generated. Right now, all that we see is the title, quantity and price. We're giving people the option to fax the email they receive in order to complete their order and it would make things faster if the sku would show up on the email next to the product (though, we can match up the order from the email to the system, it would be nice to have it both places). Do you think this is something that can be done relatively easily?

Alex Dicianu’s picture

I think the solution is to use the Rules module to send the emails. I will have to modify Basic Cart, give up the current mail system and use Rules instead. In the mean time you can use a custom hook to modify the email.

I will mark this as a feature request for the next release.

pjbarry21’s picture

Thanks! We're making it work as is. I made some other changes to make it easier to see order info and to be able to tag orders by what stage they're in (e.g., processed, awaiting payment, shipped, etc.), but if we need more specific info in the emails (it's also on my "wish list" but not quite needed at this point), I'll go through Rules to add the info that way and have Rules send the emails.

jenlampton’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

Adding field data to the cart is a custom development task for 2.0-rc1, so marking this issue closed (works as designed).

For more on Rules integration, see:
https://drupal.org/node/1930632