Skip to content

Create Order through Custom Code in Commerce [Drupal CMS]

function make_new_commerce_order($uid, $productID, $qty, $bc_order_id) { $cuser = user_load(array(‘uid’ => $uid)); $order = commerce_order_new($uid, ‘pending’); //Set order Number $order->order_number = $bc_order_id; $order->mail = $cuser->mail; // Save the order so its ID is assigned. commerce_order_save($order); // create an UC order for this user/product/qunatity $order_wrapper = entity_metadata_wrapper(‘commerce_order’, $order); //add products to order by ids array $product = …

Change Allowed Value in list in Drupal 7

<?php /** * Implements hook_permission(). */ function dynallowed_permission() { return array( ‘administer dynallowed’ => array( ‘title’ => t(‘Alter Field List Allowed Values Function’), ‘description’ => t(‘This give field administrators access to alter the options list source for fields.’), ), ); } function dynallowed_form_field_ui_field_settings_form_alter(&$form, &$form_state){ dynallowed_form_field_ui_field_edit_form_alter($form, $form_state); } function dynallowed_form_field_ui_field_edit_form_alter(&$form, &$form_state) { if (user_access(‘administer dynallowed’)) { …

Create Order through Custom Code in Commerce [drupal cms]

function make_new_commerce_order($uid, $productID, $qty, $bc_order_id) { $cuser = user_load(array(‘uid’ => $uid)); $order = commerce_order_new($uid, ‘pending’); //Set order Number $order->order_number = $bc_order_id; $order->mail = $cuser->mail; // Save the order so its ID is assigned. commerce_order_save($order); // create an UC order for this user/product/qunatity $order_wrapper = entity_metadata_wrapper(‘commerce_order’, $order); //add products to order by ids array $product = …

JP Articles Slider

Description JP Articles Slider (Joomla Articles Slider Extensions – Module) helps to slide your articles from Joomla! categories support joomla 3.x in showing your specific articles. The module build-in powerful admin panel. You can define number of items to display, column(s) follow bootstrap 3.3.4 , show controls button or not, show indicators or not, enable …

UserGroup Mapper for Jomsocial

Description We DO NOT have any backlinks in this software; this is a JED faulty ! Problem Jomsocial has it’s own user profile system and registration process. But this system does not allow you to set the registrants in different Joomla usergroups. Meaning that you can not take advantage of the core ACL functionality of …

MyCopyright

Description This simple module shows your copyright information to where you want. (e.g. footer) The configuration is easy and you need only a few of clicks. Language English  German   Features: Display the correct years dependent on the sitelaunch (e.g. only 2015 or 2013 – 2015) Every year, automatically updated Show/ Hide the copyrighttext or -symbol Specify the sitename …