Latest Forum Posts
Home arrow Forum
Design Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Product Types Modification (0 viewing) 
Go to bottom Post Reply Favoured: 0
TOPIC: Product Types Modification
#822
B16Enk (User)
Crumbling in Cambridgeshire
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Gender: Male roger.enkel@gmail.com Location: Cambridge, UK Birthdate: 1960-10-25
Product Types Modification 1 Year, 1 Month ago  
This thread discusses the Content article: Product Types Modification

Hi

First off thank you for the informative posts you have made here, and at the VirtueMart forums, without people like you I for one would still be in the dark ages!

I'm trying my best to get the product_type mod working, but my brain hasn't quite caught up yet!

Firstly is this possible:

I am in the process of setting up Virtuemart for a Herbal Supply company, some products are Vegan Approved, some are Vegetarian approved and some are both.
There are also some products that are not suited for pregnant women.

Does the Product Type Modification lend itself to this, or will it just list a static set of product types?

Examples of what I aiming to do are here (on the old pre Virtuemart site):
http://www.herbsofgrace.co.uk/ayurvedic-products/rumalaya.html
http://www.herbsofgrace.co.uk/blended-herbs/anti-spasmodic.html

Many thanks in anticipation. (Great photography BTW).
 
  The administrator has disabled public write access.
#823
macallf (Admin)
Administrator
Admin
Posts: 653
graph
User Online Now Click here to see the profile of this user
Re:Product Types Modification 1 Year, 1 Month ago  
Product_types in a simplified term are a way to extend the DB with new fields.

These fields can be filled with anything whatsoever per product. So you can have different values for each product.

So you could have fields such as vegan, vegetarian, pregnancy.

Then for each product set the appropriate values of yes or no. The label could be set as Vegan Approved, for vegan.

using my mod you could then have {herbal:vegan_label} {herbal:vegan} (where herbal is the product type name)

This would then output on your web page

Vegan approved Yes

I hope that explains.
 
 
Mark
  The administrator has disabled public write access.
#824
B16Enk (User)
Crumbling in Cambridgeshire
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Gender: Male roger.enkel@gmail.com Location: Cambridge, UK Birthdate: 1960-10-25
Re:Product Types Modification 1 Year, 1 Month ago  
Wow fast response Macalf!
You touched on the subject of custom fly pages, and the means to output these new fields.

I gather, correctly I hope, that the original {product_type} tag needs to be replaced with tags that match the new fields, after applying your Mod.
This is a great Mod, and extends Virtuemart perfectly in line with my needs.

I think I now understand, thank you once again
 
  The administrator has disabled public write access.
#825
B16Enk (User)
Crumbling in Cambridgeshire
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Gender: Male roger.enkel@gmail.com Location: Cambridge, UK Birthdate: 1960-10-25
Re:Product Types Modification 1 Year, 1 Month ago  
OK now I realise I don't understand, and am probably being a little dense here.
In my defence this is my first foray into Virtuemart, and I'm probably being a little over ambitious wanting to customise it from the get go.

The original fly page has {product_type}, post your modification that now shows as plain text in the product display in the shop.

I have created a product type 'herbal'
I have created a parameter named 'vegan' and the label is 'vegan'
Parameter type = 'text'
Possible values = 'Yes;No'
Default value = 'Yes'

Would you be so kind as to tell me what I should replace {product_type} with please?
 
  The administrator has disabled public write access.
#826
macallf (Admin)
Administrator
Admin
Posts: 653
graph
User Online Now Click here to see the profile of this user
Re:Product Types Modification 1 Year, 1 Month ago  
It's easy to follow once you know how

Replace {product_type} with

{herbal:vegan} that will display the field, to display the label associated with that field you would use

{herbal:vegan_label}

This is case sensitive so if the field was Vegan you would use {herbal:Vegan}
 
 
Mark
  The administrator has disabled public write access.
#827
B16Enk (User)
Crumbling in Cambridgeshire
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Gender: Male roger.enkel@gmail.com Location: Cambridge, UK Birthdate: 1960-10-25
Re:Product Types Modification 1 Year, 1 Month ago  
macallf wrote:
It's easy to follow once you know how

How right you are!

Thanks Mark, that explained it perfectly even to my tired ol' eyes, and it is now working perfectly.
What a cracking mod Sir, thank you.

A small appreciation on it's way to you via paypal. Thanks again.

Rog.
 
  The administrator has disabled public write access.
#829
visaudio (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:Product Types Modification 1 Year, 1 Month ago  
Would it be possible to also use this hack or possibly implement the product type hack on the browse page if the necessary code/variables were added to the shop_browse_queries and shop.browse.php files?

This is an awesome mod by the way. Thanks!
 
  The administrator has disabled public write access.
#999
visaudio (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:Product Types Modification 1 Year ago  
Just wanting to bring this to the surface again, as I'm sure many people other than me would at least be interested in what would be necessary to use this hack on the browse page.

Is it possible? Thanks.

Bryan
 
  The administrator has disabled public write access.
#1001
macallf (Admin)
Administrator
Admin
Posts: 653
graph
User Online Now Click here to see the profile of this user
Re:Product Types Modification 1 Year ago  
 
 
Mark
  The administrator has disabled public write access.
#1183
monkeytail (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:Product Types Modification 10 Months, 3 Weeks ago  
First: thanks for your effort by making this great mod. Your version of the product type functionality was just what I needed.

As mentioned in your instructions: I switched the .php file and changed the snippets of code.

For testing purpose I made up this product type:

Parameter Type: Testing
Parameter Name: test
Parameter Label: Test

Parameter Type: Short Text


I added the Testing product type to a dummy product with the input of: This is a 123 test...

To output the value and label on to the VM productspecification page I wrote down this two template names in my flypage.php:
{Testing:Test} {Testing:test}

I assumed the outputted result would be this:
Test This is a 123 test...

The actual output is this:
{Testing:Test} This is a 123 test...

Where do I go wrong?

Thanks in advanced
 
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop