7 replies [Last post]
noira@drupal.org's picture
Offline
Joined: 01/01/2009
Juice: 73
Was this information Helpful?

Hello,

I have figured out I need a certain workflow for my e-shop, which I'll shortly describe, - I'd love to hear some comments from UC developers on what is the right way to implement it (if it's possible, at all).

1/ Each product is assigned a particular "category" according to how long does it take me to order them on demand, e.g. candles from a certain U.S. manufacturer take up to 14 days to arrive when I order them, whereas local product can be re-stocked within 3 days. So we have about 5 different categories: 14 days, 10 days, 1 week etc.

3/ Products have stock turned on.

2/ At the product page the customer should see either

* a note which says "In stock" (preferably "X pcs in stock")
* a note which says "On demand, this product takes X days to ship from supplier".

I can't possibly do this manually (i.e.HTML) with every single product, so I am looking for a more systematic solution. I was thinking CCK.

Also, I'm quite fed up I have to click "edit" each product once more in order to switch on the stock module and enter in stock levels. Appreciate the possibility to change settings per item, but.. is there any way how to manage stock more efficiently? This way, it's 100% more efficient to offer my customers a PDF table with current stock for download, which is, uhm, not a very modern way to do it.

Al
Al's picture
Offline
Bug FinderGetting busy with the Ubercode.Internationalizationizer
Joined: 02/14/2008
Juice: 249
Hey noira, for messages if a

Hey noira,

for messages if a product is out of stock you will need Computed Field, there should be enough documentation around how to use it. Just in brief:

  • Find the UC core function to check stock level
  • Get the taxonomy terms of this node (14 days, 10 days,...)
  • According to the above results prepare the messages which Computed Field will display for you.

The "more efficient way" to administer stock levels - well - I wrote long time ago a Stock bulk editor, but this is still UC1.x. I want to change a couple of things, so not just port it. But as soon as the VAT issue is done I will come to it. Vydrž Eye-wink

noira@drupal.org's picture
Offline
Joined: 01/01/2009
Juice: 73
Al wrote:Hey noira, for
Al wrote:

Hey noira,

for messages if a product is out of stock you will need Computed Field, there should be enough documentation around how to use it. Just in brief:

  • Find the UC core function to check stock level
  • Get the taxonomy terms of this node (14 days, 10 days,...)
  • According to the above results prepare the messages which Computed Field will display for you.

Sounds workable... I will try to get somebody with PHP knowledge to write that piece of code for me. I don't even know the syntax Smiling

Al
Al's picture
Offline
Bug FinderGetting busy with the Ubercode.Internationalizationizer
Joined: 02/14/2008
Juice: 249
Re: Al wrote:Hey noira, for

If you like to work with views you could also try Editable Fields and create your own stock editor view.

noira@drupal.org's picture
Offline
Joined: 01/01/2009
Juice: 73
Re: Re: Al wrote:Hey noira, for

But there's no field defined for stock, I checked my currect product views and I am only offered: SKU, list price, add to cart, weight etc.

Al
Al's picture
Offline
Bug FinderGetting busy with the Ubercode.Internationalizationizer
Joined: 02/14/2008
Juice: 249
Re: Re: Re: Al wrote:Hey noira, for

You are right, sorry. And even if stock would support views, support for editable fields seems to be dropped for UC2.x...

I tried today sth with computed fields and there is also an issue about recalculating on every node load even if you don't allow to save to the database. Please give me some time, I will think about what to do with it.

Matthaeus's picture
Offline
Joined: 11/10/2009
Juice: 2
Views Bulk Operations

Noira,

I'm not sure if you still have this problem, but for your sake as well as the sake of people googling for answers, here's my take. I have attached two very simple custom-written modules to address the issues you're facing.

The first one, uc_stocknode, adds a stock field to the $node object which is made available to the theme. You will need to do some custom theming to make this work, as the module does not affect the default display. You may also be able to use this module with computed fields, although I neither tested nor investigated this configuration.

The second module, bulk_stock, provides a stock update action. Install the Views Bulk Operations module and edit the admin_content view it provides. You will want to configure the Bulk Operations style within this view to include the "Set stock levels (bulk_stock_update)" operation. In my setup, I have also added a SKU field, a Content: Image field, and a Taxonomy: All terms field to this view as well as several other tweaks to make the view more usable (exposing some taxonomy filters, setting more fields as sortable, and increasing the items per page to 200).

Both of these modules are quick-and-dirty and will be cleaned up before I submit them to drupal contrib, so, as always, use them at your own risk. I have done some limited testing with drupal 6.14 and ubercart 6.x-2.0.

Hope this helps someone.

AttachmentSize
uc_stocknode.zip 605 bytes
bulk_stock.zip 940 bytes
bwv
bwv's picture
Offline
Uber DonorBug FinderEarly adopter... addicted to alphas.Spreading the word - Ubercart for president.
Joined: 08/07/2007
Juice: 417
Re: Views Bulk Operations

Your two modules are precisely what I need, but they do not appear to work. All fields are exposed in the bulk operation view, but when I submit the request to update all levels, nothing is changed. I am using US 6.x-2.4. Do you have any suggestions? Thank you so much, david