Latest Forum Posts
Home arrow Forum
Design Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottom Post Reply Favoured: 0
TOPIC: Re:icons

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#942
macallf (Admin)
Administrator
Admin
Posts: 655
graph
User Online Now Click here to see the profile of this user
Re:icons 4 Years, 3 Months ago  
Glad I could help.

I will try to put up a more detailed tutorial on how to make a product_type extension (flypage!).

But this one is the most useful and can be set up for any use. Obviously you could change the file and change the png's to gif's or jpg's.

i.e. change

$icon = "icon_".$dba->f("parameter_label").".png";

to

$icon = "icon_".$dba->f("parameter_label").".jpg";

for using jpg files.

You can also remove this section

if ((time() - $db_prod->f("cdate")) < (14 * 86400)) { // 14 Days * (number of seconds in 24 hours)

$html1 .= mm_ToolTip("This is a new product", "Icon Description",IMAGEURL."product_type/icon_new.png");
}

This section will display an icon called icon_new.png if the product was created within the last 14 days. If you don't need this functionality just remove it.
 
 
Mark
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#946
B16Enk (User)
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Gender: Male
Re:icons 4 Years, 3 Months ago  
I don't know why I'm finding this so difficult to comprehend, and I apologise for that.

Further to my earlier posts regarding product types I know realise that this Icons mod is what I need.

However I'm having problems with the fly page extension concept.

What I'm aiming for is this:
I have a list of products, and they may have one or more of the following attributes:

Vegan
Vege
PET
Vcaps

I want to make it so selecting 'Yes' in the parameters turns on the icon.
I have created icons with png extension, named as per the attributes above, and they are in shop/product_type folder

I have the fly_type.php file in ../html/templates
I set Product Type Flypage to fly_type.php
I have applied the product type mod.
But it doesn't work, what am I missing? (besides the intelligence to work it out for myself ).
 
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#947
bulesz (User)
Senior Boarder
Posts: 52
graphgraph
User Offline Click here to see the profile of this user
Re:icons 4 Years, 3 Months ago  
I will make a reference guide, what I learned here But now I need some sleep..
Hang on!
 
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#948
B16Enk (User)
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Gender: Male
Re:icons 4 Years, 3 Months ago  
Thank you Bulesz
Have a good sleep! (perhaps that's what I need even though it's only 11:39 )
 
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#949
macallf (Admin)
Administrator
Admin
Posts: 655
graph
User Online Now Click here to see the profile of this user
Re:icons 4 Years, 3 Months ago  
If you are using my product_type modification you will need a tag in your flypage for your product type when using the custom flypages.

e.g. If your product_type is called classification then you would need this tag

{classification}

Also your images have to be /components/com_virtuemart/shop_image/product_type (Not in administrator/components/com_virtuemart/shop_image/product_type)

your post stated shop/product_type (Could have been a type, but I thought I would make it clear)
 
 
Mark
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#950
B16Enk (User)
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Gender: Male
Re:icons 4 Years, 3 Months ago  
Thanks Mark.

/public_html/joomla/components/com_virtuemart/shop_image/product_type is where I'd put the images, as you said I typo'd.

I added the product_type tag as {herbal} in flypage.php.
But the product shows only the tag {herbal} .

My fly_type.php contains:
Code: :

 <?php defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );  mm_showMyFileName__FILE__ ); //if ($standard) //    return; $html1 "";             $html1 .= "_CRLF_<div class=\"product_type_detail_icon\" >_CRLF_"; // SELECT parameter value of product $q2  "SELECT * FROM #__{vm}_product_type_".$dbag->f("product_type_id"); $q2 .= " WHERE product_id='$product_id'"; $dbp->query($q2); // SELECT parameter of Product Type $dba->query($q.$dbag->f("product_type_id")." ORDER BY parameter_list_order");             $db_prod = NEW ps_DB;             $pq "SELECT cdate FROM #__{vm}_product WHERE product_id='$product_id'";             $db_prod->query($pq);             if ((time() - $db_prod->f("cdate")) < (14 86400)) { // 14 Days *  (number of seconds in  24 hours)                                  $html1 .= mm_ToolTip("This is a new product""Icon Description",IMAGEURL."product_type/icon_new.png");             } while ($dba->next_record()) {                 $param_name $dbp->f($dba->f("parameter_name"));                                  $icon "icon_".$dba->f("parameter_label").".png";                 if($param_name != "no") {                     $parameter_description $dba->f("parameter_description");                     if (empty($parameter_description)) {                         $parameter_description "";                     }                     $html1 .= mm_ToolTip($parameter_description"Icon Description",IMAGEURL."product_type/".$icon);                      } }             $html1 .= "</div>_CRLF_";             return $html1;              ?>

 
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#953
bulesz (User)
Senior Boarder
Posts: 52
graphgraph
User Offline Click here to see the profile of this user
Re:icons 4 Years, 3 Months ago  
Wow! just came in my mind what does it mean the "icon_new.png" part in the extension!

Great! Again!

Thanks!
 
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#954
macallf (Admin)
Administrator
Admin
Posts: 655
graph
User Online Now Click here to see the profile of this user
Re:icons 4 Years, 3 Months ago  
bulez:

A simple but very useful little extension!

B16Enk:

If your product shows {herbal} then 1 of 2 things have happened.

1. Your product type is not called herbal! (This is case sensitive)
2. My product type mod is not actually installed. You can check this by using {product_type} in your flypage, if the icon appears then my mod is not in place.
 
 
Mark
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#955
B16Enk (User)
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Gender: Male
Re:icons 4 Years, 3 Months ago  
Mod is definitely applied.
Correct case and name for product type.

But...all this talk of flypage.....which flypage specifically does this tag need to be inserted in?

Hair + hand + pull

Yes I really am a raw noob at this
 
  The administrator has disabled public write access.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 653

Warning: array_walk() [function.array-walk]: The argument should be an array in /home/markfco/public_html/design/components/com_fireboard/class.fireboard.php on line 656
#956
bulesz (User)
Senior Boarder
Posts: 52
graphgraph
User Offline Click here to see the profile of this user
Re:icons 4 Years, 3 Months ago  
Hello Mark,

Here is my step by step guide about the parameters as icons.
If somebody has a question you shouldnt type it again and agian and again and again...

Product type parameters as icons on the product page

So this guide is made for Mark Callf's Product Types Modification to show the product type parameters as icons.

First make a new product type in the VM admin, call as "probetype" and set its flypage "fly_type_new" (Use the name in the form without the .php extension!)
Attach it to some products.

Second lets make some parameters for this product type (text based triggers), call them "parameter1" and "parameter2".
So we have now one product type with two parameters ("probetype/paremeter1" and "probetype/paremeter1") the values shoud be: "yes;no"

OK we have cleaned the backyard.. So now make the fancy things!

Insert in your product flypage the product type tag: {typename}, now in our example it should be {probetype} !

Copy the attached product type flypage to /admnistrator/components/com_virtuemart/html/templates/ !

After this, name the parameter icons to "icon_parametername.png", now here call them "icon_parameter1.png" and "icon_parameter2.png" !
Put them into this folder: /components/com_virtuemart/shop_image/product_type/ (Our firstime guests should make this folder: "product_type" in the "shop_image" !)

If you would use a "NEW" icon in the product page, just name it as "icon_new.png" and copy to the same place as the others. If your product was born in the last two weeks, the nice "NEW" icon will appear.

Now sit back and browse to your product...and for sure press F5 to refresh your page..

=========================

I hope I didnt forget anything and could help your work!

Cheerz,

B.
 
 
Last Edit: 2007/11/02 04:49 By bulesz.
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop