Patch for tying stock level to option images

cybertoast - July 4, 2009 - 21:35
Project:Ubercart Option Images
Version:6.x-1.4
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

The node object currently loads option images in an array even if the option does not have any stock. I looked at how adjustments are managed and created a patch for uc_option_image.module to look at the stock level of an option and only provide those with a positive stock level (as appropriate) to the node object.

The attached patch also incorporates the fix for the image browse and preview options not showing up (!empty($file) from a previous fix).

Hopefully the stock tie-in is useful to someone.

AttachmentSize
uc_option_image.patch7.13 KB
 
 

Drupal is a registered trademark of Dries Buytaert.