[Vtigercrm-developers] bundles of bundles customizations

Tim Mohrbach preexo at googlemail.com
Wed Aug 26 01:38:38 GMT 2015


Sounds interesting, looking forward to see a demo! When will the demo be
available?

A couple of questions...
- What do you mean with quantity? Isn't that a feature of vtiger already?
- I did the price calculations with a workflow and a custom function, did
you do it any other way?
- What do you mean by notifications of product bundles?
- Can you tell me how you got the "Select Product" button back on the UI in
products that already belong to a bundle? Would be great if you could share
what you achieved.

Best regards
Tim

2015-08-25 22:35 GMT+08:00 Matteo Baranzoni <info at greenbitweb.com>:

> we extend bundle with some extra features:
> - quantity
> - price calculation
> - nidification bundle of product bundle.
> - popup for bundle product
>
> Demo will be ready in few days.
>
>
> 2015-08-25 11:55 GMT+02:00 Preexo <preexo at googlemail.com>:
>
>> We need bundles of bundles. Anyone got an idea how to activate the
>> "Select Product" button in the bundle tab of a product that is already part
>> of bundle?
>>
>> I did some changes to achieve the bundles of bundles:
>> - include\utils\EditViewUtils.php replace line 215-234 with this:
>>
>> 		$subprodid_str='';
>> 		$subprodname_str='';
>> 		$subProductArray = array();
>> 		$subProductPrepArray = array();
>> 		getSubProducts($i, $focus->id, $focus->mode, $seid, $subProductPrepArray, 0);
>> 		$j = 0;
>> 		foreach($subProductPrepArray as $subproduct){
>> 		    $sprod_id = $subproduct[0];
>> 		    $pArray['name'] = getProductName($sprod_id);
>> 		    $pArray['level'] = str_repeat("-", $subproduct[1]);
>> 		    $subProductArray[] = $pArray;
>> 			$sprod_name = $pArray['name'];
>> 			$str_sep = "";
>> 			if($j>0){
>> 			    $str_sep = ":";
>> 			}
>> 			if($subproduct[1] == 1){
>> 			    $subprodid_str .= $str_sep.$sprod_id;
>> 			}
>> 			if(isset($sprod_name)){
>> 				$subprodname_str .= $str_sep." ".str_repeat("-", $subproduct[1])." ".$sprod_name;
>> 			}
>> 			$j++;
>> 		}
>>
>>
>> - include\utils\EditViewUtils.php add this function to code
>>
>> function getSubProducts($rowConstant, $parentId, $focusMode, $seId, &$subProductArray, $level){
>>     global $adb;
>>     if(empty($focusMode) && $seId!=''){
>>         $sub_prod_query = $adb->pquery("SELECT crmid as prod_id from vtiger_seproductsrel WHERE productid=? AND setype='Products'",array($parentId));
>>     } else {
>>         $sub_prod_query = $adb->pquery("SELECT productid as prod_id from vtiger_inventorysubproductrel WHERE id=? AND sequence_no=?",array($parentId,$rowConstant));
>>     }
>>     $subProductCount = $adb->num_rows($sub_prod_query);
>>     if($subProductCount>0){
>>         $level++;
>>         $focusMode = array();
>>         $seId = '1';
>>         for($j=0;$j<$subProductCount;$j++){
>>             $sprod_id = $adb->query_result($sub_prod_query,$j,'prod_id');
>>             $subsub_prod_query = $adb->pquery("SELECT crmid as prod_id from vtiger_seproductsrel WHERE productid=? AND setype='Products'",array($sprod_id));
>>             $subsubProductCount = $adb->num_rows($subsub_prod_query);
>>             if($subsubProductCount>0){
>>                 getSubProducts($rowConstant, $sprod_id, $focusMode, $seId, $subProductArray, $level);
>>             }
>>             $subProductArray[] = array($sprod_id,$level);
>>         }
>>     }
>> }
>>
>>
>> - layouts\vlayout\modules\Inventory\LineItemsDetail.tpl replace line 63 -
>> 65 with this:
>>
>> {if !empty($SUB_PRODUCT_NAME.name)}
>>   {$SUB_PRODUCT_NAME.level}   <em>{$SUB_PRODUCT_NAME.name}</em>
>> {/if}
>>
>>
>> Now I just need to activate the "Select Product" button in the bundle tab
>> all the time and then I'm pretty much done, any idea on this would be so
>> helpful!
>> Thanks in advance, best regards
>>
>> --
>> View this message in context:
>> http://vtiger-crm.2324883.n4.nabble.com/bundles-of-bundles-customizations-tp17160.html
>> Sent from the vtigercrm-developers mailing list archive at Nabble.com.
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150826/cac58d2f/attachment-0001.html>


More information about the vtigercrm-developers mailing list