Closed (fixed)
Project:
UC Multiprice
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2009 at 10:49 UTC
Updated:
20 Jun 2009 at 21:40 UTC
Hi,
When editing a product from a class, the "Product multi pricing" fieldgroup is displayed but seems unbale to save/load the prices entered per country.
Quicly looking at the code (datestamp = "1241451244"), at line 128, uc_multiprice_nodeapi check the type equality of the $node type to 'product'. But since classes use their own Content Type, the type is the product's class ID and not the default 'product' one. The fix is easy, just use the UberCart uc_product_is_product function.
Current code:
/**
* Implementation of hook_nodeapi().
*/
function uc_multiprice_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL){
if($node->type == 'product'){
switch ($op) {
Fixed code:
/**
* Implementation of hook_nodeapi().
*/
function uc_multiprice_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL){
if(uc_product_is_product($node)){
switch ($op) {
Comments
Comment #1
neochief commentedI fixed this here #484010: Major update [patch].