{"action":"created","issue":{"url":"https://api.github.com/repos/jeking928/Dual-Pricing-2.1.5/issues/1","labels_url":"https://api.github.com/repos/jeking928/Dual-Pricing-2.1.5/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/jeking928/Dual-Pricing-2.1.5/issues/1/comments","events_url":"https://api.github.com/repos/jeking928/Dual-Pricing-2.1.5/issues/1/events","html_url":"https://github.com/jeking928/Dual-Pricing-2.1.5/issues/1","id":55375425,"number":1,"title":"Attribute wholesale pricing does not work past the first level","user":{"login":"jeking928","id":8162029,"avatar_url":"https://avatars.githubusercontent.com/u/8162029?v=3","gravatar_id":"","url":"https://api.github.com/users/jeking928","html_url":"https://github.com/jeking928","followers_url":"https://api.github.com/users/jeking928/followers","following_url":"https://api.github.com/users/jeking928/following{/other_user}","gists_url":"https://api.github.com/users/jeking928/gists{/gist_id}","starred_url":"https://api.github.com/users/jeking928/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeking928/subscriptions","organizations_url":"https://api.github.com/users/jeking928/orgs","repos_url":"https://api.github.com/users/jeking928/repos","events_url":"https://api.github.com/users/jeking928/events{/privacy}","received_events_url":"https://api.github.com/users/jeking928/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jeking928/Dual-Pricing-2.1.5/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/jeking928/Dual-Pricing-2.1.5/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-24T15:58:57Z","updated_at":"2015-02-05T03:20:57Z","closed_at":null,"body":"Reported in the forum (link below), pricing beyond the first level for attributes does not work correctly.  Additional pricing levels display correctly on the product page but adding to cart always results in the first level pricing being applied.\r\n\r\nhttp://www.zen-cart.com/showthread.php?35450-DUAL-Pricing-v2&p=1270594#post1270594"},"comment":{"url":"https://api.github.com/repos/jeking928/Dual-Pricing-2.1.5/issues/comments/72987798","html_url":"https://github.com/jeking928/Dual-Pricing-2.1.5/issues/1#issuecomment-72987798","issue_url":"https://api.github.com/repos/jeking928/Dual-Pricing-2.1.5/issues/1","id":72987798,"user":{"login":"mrJingGuo","id":2160472,"avatar_url":"https://avatars.githubusercontent.com/u/2160472?v=3","gravatar_id":"","url":"https://api.github.com/users/mrJingGuo","html_url":"https://github.com/mrJingGuo","followers_url":"https://api.github.com/users/mrJingGuo/followers","following_url":"https://api.github.com/users/mrJingGuo/following{/other_user}","gists_url":"https://api.github.com/users/mrJingGuo/gists{/gist_id}","starred_url":"https://api.github.com/users/mrJingGuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrJingGuo/subscriptions","organizations_url":"https://api.github.com/users/mrJingGuo/orgs","repos_url":"https://api.github.com/users/mrJingGuo/repos","events_url":"https://api.github.com/users/mrJingGuo/events{/privacy}","received_events_url":"https://api.github.com/users/mrJingGuo/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T03:20:57Z","updated_at":"2015-02-05T03:20:57Z","body":"There are about 3 or 4 \"$options_value_price\" codes need to be replace.)\r\n\r\nFind\r\n\r\n```php \r\nif ($customer_check->fields['customers_whole'] != \"0\") {\r\n\t\t\t$i = $customer_check->fields['customers_whole'];\r\n\t\t\t$i--;\t\t\t\r\n\t\t\t$options_value_price = (float)$attribute_price->fields['options_values_price_w'];\t\r\n               } else {\r\n\t\t  $options_value_price = $attribute_price->fields['options_values_price'];\r\n\t\t}\r\n}\r\n```\r\nreplace with: \r\n```php \r\nif ($customer_check->fields['customers_whole'] != \"0\") {\r\n\t\t\t$i = $customer_check->fields['customers_whole'];\r\n\t\t\t$i--;\t\t\t\r\n\t\t\t// Jing fix the bug\r\n\t\t\t//$options_value_price = (float)$attribute_price->fields['options_values_price_w'];\r\n\t\t\t$option_price_array = $attribute_price->fields['options_values_price_w'];\r\n\t\t\t$optionprice = explode(\",\",$option_price_array);\r\n\t\t\t$options_values_price = (float)$optionprice[$i];\r\n\t\t\t\r\n\t\t\tif ($options_values_price==''){\r\n\t\t\t$options_values_price = (float)$optionprice[0];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t  $options_value_price = $attribute_price->fields['options_values_price'];\r\n\t\t}\r\n```\r\n\r\nI think there is only one of \"$new_attributes_price \" code need to be fix\r\n\r\n```php\r\nif ($customer_check->fields['customers_whole'] != \"0\") { \r\n\t\t\t  \r\n\t\t\t  // Jing Fix the bug\r\n              //$new_attributes_price = zen_get_discount_calc($product->fields['products_id'], $attribute_price->fields['products_attributes_id'], $attribute_price->fields['options_values_price_w'], $qty); \r\n\t\t\t  \r\n\t\t\t  $option_price_array = $attribute_price->fields['options_values_price_w'];\r\n\t\t\t  $optionprice = explode(\",\",$option_price_array);\r\n\t\t\t  $options_values_price = (float)$optionprice[$i];\r\n\t\t\t\t\r\n\t\t\t  if ($options_values_price==''){\r\n\t\t\t\t$options_values_price = (float)$optionprice[0];\r\n\t\t\t  }\r\n\t\t\t \r\n\t\t\t $new_attributes_price = zen_get_discount_calc($product->fields['products_id'], $attribute_price->fields['products_attributes_id'], $options_values_price, $qty); \r\n}\r\n```"}}