[Discontinued] Company Enhancements MOD

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

if i can ask: it'd be nice if we might associate an image to a product, and if we could define several customizable fields for each property of the objects (like weight, height, etc.)

plus, of course, search engine :)







ok, i admit - i'm terrible! :)
Completeness is reached through subtraction, not through addition
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Terrible Man wrote:if we could define several customizable fields for each property of the objects (like weight, height, etc.)
Do you mean fields that the users theirselves can label and fill? For example: Three "empty" fields, which you with your phpwcms would use for "height", "width" and "weight". But I would use the three fields for "Quantity", "Quality" and "Trinity"?

Or do you simply want to have additional "static" fields: "weight", "width", "height"?
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

i mean the first one. like, if we had different products, we might handle different customer needs: so, if we could generate (hypotetically) endless fields, we might as well give the highest possible grade of customization.

in my mind, there would be a simple + sign, wheras it's clicked, you can define a new field and its characteristics. I just wonder if we should "guide" the user with pre-determined options (like number, text, image divided into strict types) or leave it open without having to re-configure it for the smallest needs.....
Completeness is reached through subtraction, not through addition
ionrock
Posts: 279
Joined: Fri 20. Feb 2004, 17:04

Post by ionrock »

I made an inventory management system once and while it worked very well, people did not end up liking the flexibility that I added. I think that it would be good to define specific aspects that can be put together in combonation and then also have some basic examples or some default that many could use for their needs. I don't know if this suggestion is really any help but I figured it might be useful in that I think having a lot of flexibility is nice while at the same time most people use the default so I would act accordingly. I don't believe phpwcms is used my only developers so a regular user would most likely use the defaults. Good Luck with it!
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

I have been looking to implement a 'content part' based heavily on the QikTable scripts http://www.qiktable.com/

as with us all time is a killer though :(
if anyone else thinks this would be a powerfull and felxible tool please feel look into it's implementation too.
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

There are already the categories implemented in the actual version.

I would try to do it the following way:

The product-categories (that are free text by now) will be configurable, too. So there will be another menu-point "categories" in which you can create new categories, and in these create and edit category-specific details.
Example wrote:Category: Cars
- Color (red|blue|green|etc.)
- Creator (Toyota|Nissan|Honda|etc.)
- etc.

Category: Drinks
- Type (Coctail|longdrinks|alcohol-free|etc.)
- Quantity (2cl|300ml|etc.)
- Time needed (1 minute|5 minutes|neverending story|etc.)
- etc.
These category-details will be the source for the fields and labels other parts of the product-space. But this would not be just interesting for "products", but for other things, too.

But related to the prices, I only wanted to have price related information. For example discounts if you buy 5, 10, 20 pieces of a product, or maintenance contracts or something like this.

The properties of one product is one different thing... but I will put it on the todo list :).
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

excellent! we're all impatient to see!!! :)
Completeness is reached through subtraction, not through addition
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

I have updated the MOD to version 0.3.

You are now able to maintain positions and prices/free texts for the products. Imagine the following:

You have one product for which you have discounts when your customers buy 5, 10, 25, etc. pieces of this product. That's what the pricelist is for :). I did just not know a better name for it.

Beside this it is possible (at least in my company) not just to enter a certain amount/price, but also free text if the information is not expressable by numbers. The system will recognize if you enter a price/amount or free text and insert automatically a currency symbol. At the moment this is only the €-symbol, but in a later version this will be configurable.

The reason why I am making a difference between numbers and free text is, that in a even later version, you will be able to add taxes (in German "Mehrwertsteuer") to the price and automatically show up brutto/netto prices if this is your wish.

You can download the newest version in the first post of this thread.

For those who have already installed the version 0.2 of this MOD follows now the update instructions to upgrad to version 0.3

Code: Select all

#
#-----[ SQL ]------------------------------------------
#

ALTER TABLE `phpwcms_products_prices` CHANGE `amount` `value` BLOB 


#
#-----[ FIND ]------------------------------------------
#

	   case "products":	//Produktbearbeitung
	   					switch ($p) {
							case 0: include_once "./include/inc_module/mod_company/inc_tmpl/products.structlist.tmpl.php";	break; //Productlist
							case 1: include_once "./include/inc_module/mod_company/inc_tmpl/products.edit.tmpl.php";			break; //Productedit							
							case 2: include_once "./include/inc_module/mod_company/inc_tmpl/products.edit.tmpl.php";			break; //Productedit
							case 3: include_once "./include/inc_module/mod_company/inc_tmpl/products.prices.tmpl.php";		break; //Preise
							case 4: include_once "./include/inc_module/mod_company/inc_tmpl/products.releases.tmpl.php";		break; //Releases
							case 5: include_once "./include/inc_module/mod_company/inc_lib/products.delete.inc.php";		break; //Releases
						}
						break;
						
#
#-----[ REPLACE WITH ]------------------------------------------
#						
						
	   case "products":	//Produktbearbeitung
	   					switch ($p) {
							case 0: include_once "./include/inc_module/mod_company/inc_tmpl/products.structlist.tmpl.php";	break; //Productlist
							case 1: include_once "./include/inc_module/mod_company/inc_tmpl/products.edit.tmpl.php";			break; //Productedit							
							case 2: include_once "./include/inc_module/mod_company/inc_tmpl/products.edit.tmpl.php";			break; //Productedit
							case 3:  //Preise
									switch(intval($_GET["s"]))
									{
										case 1: include_once "./include/inc_module/mod_company/inc_tmpl/products.prices.edit.tmpl.php";  break; //New Price
										case 2: include_once "./include/inc_module/mod_company/inc_tmpl/products.prices.edit.tmpl.php";  break; //Edit Price
										case 3: include_once "./include/inc_module/mod_company/inc_lib/products.prices.delete.inc.php"; break; // Delete price
										default: include_once "./include/inc_module/mod_company/inc_tmpl/products.prices.tmpl.php"; break; // List prices
									}
									break;
							case 4: include_once "./include/inc_module/mod_company/inc_tmpl/products.releases.tmpl.php";		break; //Releases
							case 5: include_once "./include/inc_module/mod_company/inc_lib/products.delete.inc.php";		break; //Releases
						}
						break;
In this case, the SQL-alterations do not affect your data, because the tables have been there but not been used. If in future there will be changes in the DB-structure, I will also provide update scripts.

I will always try to change at least as possible in the core code of phpwcms so that the changes you have to do are as least as possible. You will normally just have to extract the ZIP-File, upload everything and the changes should be there immediately.
Last edited by Jérôme on Sat 27. Mar 2004, 22:28, edited 1 time in total.
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

What I forgot to say: In one of the next releases I will try to implement the replacement tags so that you can use the information to display it on your website. At this moment you can "just" play in the backend. But you could already maintain your products list so that it will not be such a big step afterwards to display it on the frontend.
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

There must have been an error when I uploaded the actualized ZIP, because: it is not actualized. :? I will repeat it when I am back in my office, that is, saturday evening or monday morning. Sorry. :?
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

It was saturday evening ;). Everything works now, I tested it on my personal PowerBook.
snobba
Posts: 166
Joined: Sat 6. Mar 2004, 12:41
Location: Sweden
Contact:

Post by snobba »

Jerome,

I really think this is a great application! If I am able to put the content on the frontend with pictures my phpwcms is complete! I have a lot of customers that wants their products listed like this on the net...After all, they are out there to sell..Now many of them have .pdf that they are running..Easy for them to upgrade the list and easy to upload..

But your system looks really intresting! I think this is more important than many other of the applications for phpwcms. But that is just me, because I mainly designing for customers..Looking forward seeing more of this..

Thanks...

Greetings from Martin - Sweden
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Version 0.4 of the company mod is available.

I added several replacement tags and an include-file for the english terms of everything. I also actualized the screenshots.

You can find upgrade instruction in the actual ZIP-File or at the end of this post.

I think, the most interesting feature should be the PRICELIST tag which displays a table with all the values you have entered in the prices-section. The outlook of the table is completely changeable within the CSS-file included in inc_css.

Example
Image

Available Replacement Tags:
{PRODUCTS:CATEGORY:productname}
Displays the product category.

{PRODUCTS:SYSTEM_REQ:productname}
Displays the system requirements for a product. Intended for software.

{PRODUCTS:CONTACT_NAME:productname}
Displays the name of the person/team/whatever to contact in matters with this product.

{PRODUCTS:PRICELIST:productname}
Displays a table with all different positions and prices/values for this products. See example-screenshot
Update instructions from version 0.3 to 0.4

Code: Select all

###########################################################################################
## MOD Title: phpwcms Company Mod
## MOD Author: Jérôme < spam@jerome-gamez.de > (Jérôme Gamez) http://jerome-gamez.de/
##
## Update instructions from 0.3 -> 0.4
##
###########################################################################################

#
#-----[ OPEN ]------------------------------------------
#
include/inc_front/content.func.inc.php


#
#-----[ FIND ]------------------------------------------
#

?>


#
#-----[ BEFORE, ADD ]------------------------------------------
#

require_once ('./include/inc_module/mod_company/inc_front/company.func.inc.php');


#
#-----[ OPEN ]------------------------------------------
#

include/inc_conf/inc.conf.php


#
#-----[ FIND ]------------------------------------------
#

$phpwcms["templates"]         = "phpwcms_template";    //default: "phpwcms_template"


#
#-----[ AFTER, ADD ]------------------------------------------
# 

$phpwcms["modules"]           = "include/inc_module";     //default: "include/inc_module"


#
#-----[ OPEN ]------------------------------------------
#

index.php


#
#-----[ FIND ]------------------------------------------
#

<link rel="stylesheet" type="text/css" href="<?php echo ".".$phpwcms["templates"]."inc_css/".$block["css"] ?>">


#
#-----[ AFTER, ADD ]------------------------------------------
# 

<link rel="stylesheet" type="text/css" href="<?php echo "./".$phpwcms["modules"]; ?>/mod_company/inc_css/mod_company.css">




#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
User avatar
Paradroid
Posts: 176
Joined: Fri 19. Mar 2004, 13:14
Location: Wuppertal
Contact:

Post by Paradroid »

Very nice mod !

I will check it out as soon as possible :D

Thanks for your work.

Achim
User avatar
Fulvio Romanin
Posts: 394
Joined: Thu 4. Dec 2003, 11:12
Location: Udine, Italy
Contact:

Post by Fulvio Romanin »

applause to jerome
nice work, man, really....
Completeness is reached through subtraction, not through addition
Post Reply