Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $product = new Cart66Product();
- $setting = new Cart66Setting();
- $products = $product->getModels( 'where id>0', 'order by name' );
- if ( !empty( $products ) ) {
- foreach( $products as $p )
- $select_product = array('name' => $p->name, 'value' => $p->itemNumber);
- }
- $meta_boxes[] = array(
- 'id' => 'panier_metabox',
- 'title' => 'Product Settings',
- 'pages' => array('post'), // post type
- 'context' => 'normal',
- 'priority' => 'high',
- 'show_names' => true, // Show field names on the left
- 'fields' => array(
- array(
- 'name' => 'Select a product',
- 'desc' => 'You must add your product within the Cart66 "Products" menu before you can select a product from the dropdown.',
- 'id' => $prefix . '_item_number',
- 'type' => 'select',
- 'options' => array(
- $select_product
- )
- ),
Add Comment
Please, Sign In to add comment