A client of ours would like to be able to see the full price in the drop down, not just the +/- change on the price, I have amended the module for this.

From line 127 to 142 I have amended accordingly:

           else {
				$price = $option->price; 
				//Removed below line as this updates the prices dynamically, 
				//however this is not needed as prices already set.
				
				
				// - $product->attributes[$aid]->options[$selected_oid]->price;
            }

            // Rebuild option text
            $oid_text = '';
            if ($price != 0) {
              $oid_text = ', ';
              if ($price > 0) {
                $oid_text .= uc_price($price+$form['node']['#value']->cost, $context); //Will show price as (Val), $(cost+attribute)
              }                                                     
              else {                                                
                $oid_text .= uc_price($price+$form['node']['#value']->cost, $context); //Will show price as (Val), $(cost-attribute)
              }                                                       
            }                                                         
			else {                                                    
				$oid_text = ', ';                                     
				$oid_text .= uc_price($price+$form['node']['#value']->cost, $context); //Will show price as (Val), $(cost)
			}
            $options[$option->oid] = $option->name . $oid_text;

This does remove the initial functionality of this module to show the +/- changes, however is there a way to have this option built in, so that in the admin page I can say "Show full price" or "Show changed price"

Hope this makes sense,

thanks,

-Dan.

Comments

overbythere’s picture

StatusFileSize
new2.18 KB

Attached patch file, wasn't sure how to do it before.

overbythere’s picture

yoroy’s picture

Issue tags: +Usability

I would agree that this way of putting it is the more useful way to present it. Consider rewording the label from "Size" to "Size and price".

overbythere’s picture

StatusFileSize
new2.85 KB

Attached updated diff file to include title changes from "Attribute" to "Attribute + Price" as seen here: http://cl.ly/4VpQ