Joomla Virtuemart – Ultimate Dynamic Images Hack for Categories Images


This is the only hack you need to have for the category images. This hack will take care of the image while upload or do it dynamically from the frontend, putting a settings on the backend. Since this is an ultimate hack, it construct with several files and line of code to complete this hack: so please stay close attention.

Files we are going to work with

  • administrator/components/com_virtuemart/classes/imageTools.class.php
  • administrator/components/com_virtuemart/classes/ps_config.php
  • administrator/components/com_virtuemart/classes/ps_product_category.php
  • administrator/components/com_virtuemart/languages/admin/english.php
  • administrator/components/com_virtuemart/html/admin.show_cfg.php
  • components/com_virtuemart/themes/default/templates/common/categoryChildlist.tpl.php

What this hack does

  • Extra Admin Panel for Category images Controlling
  • Configurable Dynamic Category Image (Seperate from original dynamic thumbnail)
  • Configurable Full Category Image resize upon upload
  • One simple click to enable dynamic category thumb
  • Dynamic Category Full Image resize upon upload


imageTools.class.php

Open up the imageTools.class.php file, it is located under administrator/components/com_virtuemart/classes/imageTools.class.php

original code

$d["image_commands"][] = array( 'command' => 'move_uploaded_file',
									'param1' => $temp_file,
									'param2' => $path.$to_file
							);
$d["image_commands"][] = array( 'command' => 'unlink',
								'param1' => $temp_file
							);

if( empty( $d[$field_name] )) {	
	/* Return new image file name */
	$d[$field_name] = $to_file;
}

replace with

if("full image" == $image_type && '1' == PSHOP_CAT_UPLOADING_FULL_IMG_RESIZE_ENABLE) {
	$fullresizedfileout = $path.$to_file;
	$vmLogger->debug( 'full image file name = '.$path.$to_file );
	$vmLogger->debug( 'temp full image file name = '.$temp_file );
	if( !file_exists( dirname( $fullresizedfileout ))) {
		mkdir( dirname( $fullresizedfileout ));
		$vmLogger->debug('Created Directory '.dirname( $fullresizedfileout ));
	}
	$resizedFullImage = new Img2Thumb( $temp_file, PSHOP_CAT_UPLOADING_FULL_IMG_WIDTH, PSHOP_CAT_UPLOADING_FULL_IMG_HEIGHT, $fullresizedfileout, 0, 255, 255, 255 );
	$fullresizedname = basename( $fullresizedfileout );
	$vmLogger->debug( 'Finished creating the resized full image '.$fullresizedname.' when uploading' );
} else {
	// Command to move uploaded file into destination directory
	$d["image_commands"][] = array( 'command' => 'move_uploaded_file',
										'param1' => $temp_file,
										'param2' => $path.$to_file
	);
}
// end of modified by DesignerSandbox

$d["image_commands"][] = array( 'command' => 'unlink',
								'param1' => $temp_file
							);

if( empty( $d[$field_name] )) {
	/* Return new image file name */
	$d[$field_name] = $to_file;
}

ps_config.php

Open up the ps_config.php file, it is located under administrator/components/com_virtuemart/classes/ps_config.php

look for the code

"PSHOP_IMG_HEIGHT" => "conf_PSHOP_IMG_HEIGHT",

add the following after

// added by DesignerSandbox
// width and height for resizing category full image
"PSHOP_CAT_FULL_IMG_RESIZE_ENABLE" => "conf_PSHOP_CAT_FULL_IMG_RESIZE_ENABLE",
"PSHOP_CAT_FULL_IMG_WIDTH" => "conf_PSHOP_CAT_FULL_IMG_WIDTH",
"PSHOP_CAT_FULL_IMG_HEIGHT" => "conf_PSHOP_CAT_FULL_IMG_HEIGHT",
// width and height for resizing category full image when uploading
"PSHOP_CAT_UPLOADING_FULL_IMG_RESIZE_ENABLE" => "conf_PSHOP_CAT_UPLOADING_FULL_IMG_RESIZE_ENABLE",
"PSHOP_CAT_UPLOADING_FULL_IMG_WIDTH" => "conf_PSHOP_CAT_UPLOADING_FULL_IMG_WIDTH",
"PSHOP_CAT_UPLOADING_FULL_IMG_HEIGHT" => "conf_PSHOP_CAT_UPLOADING_FULL_IMG_HEIGHT",
// end of added by DesignerSandbox

ps_product_category.php

Open up the ps_product_category.php file, it is located under administrator/components/com_virtuemart/classes/ps_product_category.php

original code

function get_child_list($category_id) {
	global $sess, $ps_product, $VM_LANG;
	$ps_vendor_id = $_SESSION["ps_vendor_id"];
	$db = new ps_DB;
	$childs = array();
	
	$q = "SELECT category_id, category_thumb_image, category_child_id,category_name FROM #__{vm}_category,#__{vm}_category_xref ";
	$q .= "WHERE #__{vm}_category_xref.category_parent_id='$category_id' ";
	$q .= "AND #__{vm}_category.category_id=#__{vm}_category_xref.category_child_id ";
	$q .= "AND #__{vm}_category.vendor_id='$ps_vendor_id' ";
	$q .= "AND #__{vm}_category.category_publish='Y' ";
	$q .= "ORDER BY #__{vm}_category.list_order, #__{vm}_category.category_name ASC";
	$db->setQuery($q);
	$db->query();

	while( $db->next_record() ) {
		$childs[] = array (
						'category_name' =>  $db->f("category_name"),
						'category_id' => $db->f("category_id"),
						'category_thumb_image' => $db->f("category_thumb_image"),
						'number_of_products' => ps_product_category::products_in_category( $db->f("category_id")),
					);
	}
	return $childs;
}

replace it with

// modified by DesignerSandbox
function get_child_list($category_id) {
	global $sess, $ps_product, $VM_LANG;
	$ps_vendor_id = $_SESSION["ps_vendor_id"];
	$db = new ps_DB;
	$childs = array();

	// modified by DesignerSandbox
	// show the resized full image if this function is enabled in admin panel
	// original codes
	// $q = "SELECT category_id, category_thumb_image, category_child_id,category_name FROM #__{vm}_category,#__{vm}_category_xref ";
	// emd of original codes
	$q = "SELECT category_id, category_full_image, category_thumb_image, category_child_id,category_name FROM #__{vm}_category,#__{vm}_category_xref ";
	// end of modified by DesignerSandbox
	$q .= "WHERE #__{vm}_category_xref.category_parent_id='$category_id' ";
	$q .= "AND #__{vm}_category.category_id=#__{vm}_category_xref.category_child_id ";
	$q .= "AND #__{vm}_category.vendor_id='$ps_vendor_id' ";
	$q .= "AND #__{vm}_category.category_publish='Y' ";
	$q .= "ORDER BY #__{vm}_category.list_order, #__{vm}_category.category_name ASC";
	$db->setQuery($q);
	$db->query();

	while( $db->next_record() ) {
		$childs[] = array (
						'category_name' =>  $db->f("category_name"),
						'category_id' => $db->f("category_id"),
						'category_thumb_image' => $db->f("category_thumb_image"),
						// added by DesignerSandbox
						// show the resized full image if this function is enabled in admin panel
						'category_full_image' => $db->f("category_full_image"),
						// end of added by DesignerSandbox
						'number_of_products' => ps_product_category::products_in_category( $db->f("category_id")),
					);
	}
	return $childs;
}

english.php

Open up the english.php file, it is located under administrator/components/com_virtuemart/languages/admin/english.php

look for the code

	'PHPSHOP_ADMIN_CFG_THUMBNAIL_HEIGHT_TIP' => 'The target <strong>height</strong> of the resized Thumbnail Image.',

add the following after

// added by DesignerSandbox
// width and height for resizing category full image
'PHPSHOP_ADMIN_CFG_DYNAMIC_CAT_FULL_RESIZING' => 'Enable Showing Resized Category Full Image?',
'PHPSHOP_ADMIN_CFG_DYNAMIC_CAT_FULL_RESIZING_TIP' => 'If checked, you enable dynamic Image Resizing. This means that all Category Full Images are resized to fit the Sizes you provide below,
using PHP\'s GD2 functions (you can check if you have GD2 support by browsing to "System" -> "System Info" -> "PHP Info" -> gd.
The Category Full Image quality is much better than Images which were "resized" by the browser. The newly generated Images are put into the directory /shop_image/category/resized. If the Image has already been resized, this copy will be send to the browser, so no image is resized again and again.',
'PHPSHOP_ADMIN_CFG_CAT_FULL_WIDTH' => 'Category Full Image Width',
'PHPSHOP_ADMIN_CFG_CAT_FULL_WIDTH_TIP' => 'The target <strong>width</strong> of the resized Category Full Image.',
'PHPSHOP_ADMIN_CFG_CAT_FULL_HEIGHT' => 'Category Full Image Height',
'PHPSHOP_ADMIN_CFG_CAT_FULL_HEIGHT_TIP' => 'The target <strong>height</strong> of the resized Category Full Image.',
// end of added by DesignerSandbox
// added by DesignerSandbox
// width and height for resizing category full image when uploading
'PHPSHOP_ADMIN_CFG_DYNAMIC_CAT_UPLOADING_FULL_RESIZING' => 'Enable Resizing Category Full Image when uploading?',
'PHPSHOP_ADMIN_CFG_DYNAMIC_CAT_UPLOADING_FULL_RESIZING_TIP' => 'If checked, you enable dynamic Image Resizing when uploading. This means that all Category Full Images are resized to fit the Sizes you provide below,
using PHP\'s GD2 functions (you can check if you have GD2 support by browsing to "System" -> "System Info" -> "PHP Info" -> gd.
The Category Full Image quality is much better than Images which were "resized" by the browser. The newly generated Images are put into the directory /shop_image/category/resized. If the Image has already been resized, this copy will be send to the browser, so no image is resized again and again.',
'PHPSHOP_ADMIN_CFG_CAT_UPLOADING_FULL_WIDTH' => 'Category Full Image Width when uploading',
'PHPSHOP_ADMIN_CFG_CAT_UPLOADING_FULL_WIDTH_TIP' => 'The target <strong>width</strong> of the resized Category Full Image.',
'PHPSHOP_ADMIN_CFG_CAT_UPLOADING_FULL_HEIGHT' => 'Category Full Image Height when uploading',
'PHPSHOP_ADMIN_CFG_CAT_UPLOADING_FULL_HEIGHT_TIP' => 'The target <strong>height</strong> of the resized Category Full Image.',
// end of added by DesignerSandbox

admin.show_cfg.php

Open up the english.php file, it is located under administrator/components/com_virtuemart/html/admin.show_cfg.php

original code

<?php
}
else {
	echo '<strong>Dynamic Image Resizing is not available. The GD library seems to be missing.</strong>';
	echo '<input type="hidden" name="conf_PSHOP_IMG_RESIZE_ENABLE" value="0" />';
	echo '<input type="hidden" name="conf_PSHOP_IMG_WIDTH" value="'. PSHOP_IMG_WIDTH .'" />';
	echo '<input type="hidden" name="conf_PSHOP_IMG_HEIGHT" value="'. PSHOP_IMG_HEIGHT .'" />';
}
?>

Replace it with the below code

<?php
    // added by DesignerSandbox
    // width and height for resizing category full image in front page
?>
        <tr>
            <td class="labelcell">
                <label for="conf_PSHOP_CAT_FULL_IMG_RESIZE_ENABLE"><?php echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_DYNAMIC_CAT_FULL_RESIZING') ?></label></td>
            <td>
                <input type="checkbox" name="conf_PSHOP_CAT_FULL_IMG_RESIZE_ENABLE" id="conf_PSHOP_CAT_FULL_IMG_RESIZE_ENABLE" class="inputbox" <?php if (PSHOP_CAT_FULL_IMG_RESIZE_ENABLE == '1') echo "checked=\"checked\""; ?> value="1" />
            </td>
            <td width="55%"><?php echo vmToolTip( $VM_LANG->_('PHPSHOP_ADMIN_CFG_DYNAMIC_CAT_FULL_RESIZING_TIP') ) ?></td>
        </tr>
	    <tr>
	        <td class="labelcell"><?php echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_CAT_FULL_WIDTH') ?></td>
	        <td>
	            <input type="text" name="conf_PSHOP_CAT_FULL_IMG_WIDTH" class="inputbox" value="<?php echo PSHOP_CAT_FULL_IMG_WIDTH ?>" />
	        </td>
	        <td><?php echo vmToolTip( $VM_LANG->_('PHPSHOP_ADMIN_CFG_CAT_FULL_WIDTH_TIP') ) ?></td>
	    </tr>
	    <tr>
	        <td class="labelcell"><?php echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_CAT_FULL_HEIGHT') ?></td>
	        <td>
	            <input type="text" name="conf_PSHOP_CAT_FULL_IMG_HEIGHT" class="inputbox" value="<?php echo PSHOP_CAT_FULL_IMG_HEIGHT ?>" />
	        </td>
	        <td><?php echo vmToolTip( $VM_LANG->_('PHPSHOP_ADMIN_CFG_CAT_FULL_HEIGHT_TIP') ) ?></td>
	    </tr>
<?php
    // end of added by DesignerSandbox
?>
<?php
    // added by DesignerSandbox
    // width and height for resizing category full image when uploading
?>
        <tr>
            <td class="labelcell">
                <label for="conf_PSHOP_CAT_UPLOADING_FULL_IMG_RESIZE_ENABLE"><?php echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_DYNAMIC_CAT_UPLOADING_FULL_RESIZING') ?></label></td>
            <td>
                <input type="checkbox" name="conf_PSHOP_CAT_UPLOADING_FULL_IMG_RESIZE_ENABLE" id="conf_PSHOP_CAT_UPLOADING_FULL_IMG_RESIZE_ENABLE" class="inputbox" <?php if (PSHOP_CAT_UPLOADING_FULL_IMG_RESIZE_ENABLE == '1') echo "checked=\"checked\""; ?> value="1" />
            </td>
            <td width="55%"><?php echo vmToolTip( $VM_LANG->_('PHPSHOP_ADMIN_CFG_DYNAMIC_CAT_UPLOADING_FULL_RESIZING_TIP') ) ?></td>
        </tr>
	    <tr>
	        <td class="labelcell"><?php echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_CAT_UPLOADING_FULL_WIDTH') ?></td>
	        <td>
	            <input type="text" name="conf_PSHOP_CAT_UPLOADING_FULL_IMG_WIDTH" class="inputbox" value="<?php echo PSHOP_CAT_UPLOADING_FULL_IMG_WIDTH ?>" />
	        </td>
	        <td><?php echo vmToolTip( $VM_LANG->_('PHPSHOP_ADMIN_CFG_CAT_UPLOADING_FULL_WIDTH_TIP') ) ?></td>
	    </tr>
	    <tr>
	        <td class="labelcell"><?php echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_CAT_UPLOADING_FULL_HEIGHT') ?></td>
	        <td>
	            <input type="text" name="conf_PSHOP_CAT_UPLOADING_FULL_IMG_HEIGHT" class="inputbox" value="<?php echo PSHOP_CAT_UPLOADING_FULL_IMG_HEIGHT ?>" />
	        </td>
	        <td><?php echo vmToolTip( $VM_LANG->_('PHPSHOP_ADMIN_CFG_CAT_UPLOADING_FULL_HEIGHT_TIP') ) ?></td>
	    </tr>
<?php
    // end of added by DesignerSandbox
?>
	    <?php
    }
    else {
    	echo '<strong>Dynamic Image Resizing is not available. The GD library seems to be missing.</strong>';
    	echo '<input type="hidden" name="conf_PSHOP_IMG_RESIZE_ENABLE" value="0" />';
    	echo '<input type="hidden" name="conf_PSHOP_IMG_WIDTH" value="'. PSHOP_IMG_WIDTH .'" />';
    	echo '<input type="hidden" name="conf_PSHOP_IMG_HEIGHT" value="'. PSHOP_IMG_HEIGHT .'" />';
        // added by DesignerSandbox
        // width and height for resizing category full image
        echo '<input type="hidden" name="conf_PSHOP_CAT_FULL_IMG_RESIZE_ENABLE" value="0" />';
    	echo '<input type="hidden" name="conf_PSHOP_CAT_FULL_IMG_WIDTH" value="'. PSHOP_CAT_FULL_IMG_WIDTH .'" />';
        echo '<input type="hidden" name="conf_PSHOP_CAT_FULL_IMG_HEIGHT" value="'. PSHOP_CAT_FULL_IMG_HEIGHT .'" />';
        // end of added by DesignerSandbox
        // added by DesignerSandbox
        // width and height for resizing category full image when uploading
        echo '<input type="hidden" name="conf_PSHOP_CAT_UPLOADING_FULL_IMG_RESIZE_ENABLE" value="0" />';
        echo '<input type="hidden" name="conf_PSHOP_CAT_UPLOADING_FULL_IMG_WIDTH" value="'. PSHOP_CAT_UPLOADING_FULL_IMG_WIDTH .'" />';
        echo '<input type="hidden" name="conf_PSHOP_CAT_UPLOADING_FULL_IMG_HEIGHT" value="'. PSHOP_CAT_UPLOADING_FULL_IMG_HEIGHT .'" />';
    	// end of added by DesignerSandbox
    }
    ?>

categoryChildlist.tpl.php

Open up the english.php file, it is located under administrator/components/com_virtuemart/html/categoryChildlist.tpl.php

original code

<a title="<?php echo $category["category_name"] ?>" href="<?php $sess->purl(URL."index.php?option=com_virtuemart&amp;page=shop.browse&amp;category_id=".$category["category_id"]) ?>"> 
<?php
if ( $category["category_thumb_image"] ) {
    echo ps_product::image_tag( $category["category_thumb_image"], "alt=\"".$category["category_name"]."\"", 0, "category");
    echo "<br /><br/>\n";
}
echo $category["category_name"];
echo $category['number_of_products'];
?>
</a><br/>

replace it with the following code

<a class="category" title="<?php echo $category["category_name"] ?>" href="<?php $sess->purl(URL."index.php?option=com_virtuemart&amp;page=shop.browse&amp;category_id=".$category["category_id"]) ?>">
<?php
if ( $category["category_thumb_image"] ) {
    // modified by DesignerSandbox
    // show the resized full image if this function is enabled in admin panel
    // original codes
    // echo ps_product::image_tag( $category["category_thumb_image"], "alt=\"".$category["category_name"]."\"", 0, "category");
    // end of original codes
    if ('1' == PSHOP_CAT_FULL_IMG_RESIZE_ENABLE) {
        $tmpCategoryThumbImage = $mosConfig_live_site."/components/com_virtuemart/show_image_in_imgtag.php?filename=".urlencode($category["category_full_image"])."&amp;newxsize=".PSHOP_CAT_FULL_IMG_WIDTH."&amp;newysize=".PSHOP_CAT_FULL_IMG_HEIGHT."&amp;fileout=";;
        echo ps_product::image_tag( $tmpCategoryThumbImage, "alt=\"".$category["category_name"]."\"", 0, "category");
    } else {
        if ('1' == PSHOP_IMG_RESIZE_ENABLE) {
            $tmpCategoryThumbImage = $mosConfig_live_site."/components/com_virtuemart/show_image_in_imgtag.php?filename=".urlencode($category["category_full_image"])."&amp;newxsize=".PSHOP_IMG_WIDTH."&amp;newysize=".PSHOP_IMG_HEIGHT."&amp;fileout=";;
            echo ps_product::image_tag( $tmpCategoryThumbImage, "alt=\"".$category["category_name"]."\"", 0, "category");
        } else {
            echo ps_product::image_tag( $category["category_thumb_image"], "alt=\"".$category["category_name"]."\"", 0, "category");
        }
    }
    // end of modified by DesignerSandbox
    echo "<br /><br/>\n";
}
echo $category["category_name"];
echo $category['number_of_products'];
?>
</a><br/>


Special thanks to Micheal Wai

Be a link sponsor for this page now

[sponsorbox]


Related Posts Plugin for WordPress, Blogger...

I hope you have enjoyed this post, be sure to subscribe to my rss feed by click the subscribe button at the top.

Good Luck!

Be Sure to Subscribe to our feed or follow us on twitter to get the latest updates/patches
End of Article, Thanks for reading.
You can leave a response, or trackback from your own site.

23 Responses to “Joomla Virtuemart – Ultimate Dynamic Images Hack for Categories Images”

  1. Jac says:

    Great solution!
    But that is still found useful hack for the category list (browse_page).
    What do you think?

    Greetings!

  2. Deebo says:

    so helpful.. thanks so much

  3. Julia says:

    Great idea! I hope you can help me. I do not see the 'layout' screen shots you show, and I have tried applying all your suggested changes but I see no difference – the 'Harps' category in harpsonline.com still shows no images and the admin category page still shows the same very few options.. I am new to Virtuemart so maybe I am looking in the wrong place. I use Virtuemart 1.1.4 (in Joomla 1.5.15). Is this a different version to the one you use?

  4. Julia says:

    Sorry, I DO have the layout screen you show above (ie. your 'after' shot). I was looking in the wrong place. (I have a lot to learn in Virtuemart!) Now…. my Harps category contains sub-categories, but no products. Will your hack enable me to display an image for each sub-category? Or a single image for the Harps category? The website ishttp://www.harpsonline.com.
    Thankyou!

  5. Julia says:

    Hi Designersandbox! I have your hack working well today. It is wonderful! Thankyou for your solution.

  6. Felix says:

    Thanks a lot :) !

    Some precisions:

    The last file, categoryChildlist.tpl.php, is located in /components/com_virtuemart/themes/default/templates/common

    Also, it seems like the first time we go into the Configuration > Site > Layout part of the VirtueMart control panel, there are constants written in the width and height text boxes (some text in capital letters). In order to enable the features that this hack allows, it is required to check the appropriate check boxes, but also enter a numerical value in the width and height text boxes.

    I hope this can speed up the implementation for future visitor :)

    Thanks again to whoever did this :) !

    • Richard says:

      hi felix, could you speed up my implementation of this nice hack even more. i'm not familiar to php, so how can i eleminate the problem in the control panel? where do i have to modify categoryChildlist.tpl.php?

      thanks to you and all the other folks who hack around

      • Richard says:

        hi felix, could you speed up my implementation of this nice hack even more. i'm not familiar to php, so how can i eleminate the problem in the control panel? where do i have to modify categoryChildlist.tpl.php?

        UHHHHH solved!

        on ps_config.php the change is additional. it says: add the following after, not replace.

        once again thanks to you all

  7. This is a really good hack, but I'm facing some problems when I try to upgrade from an older version to a latest one.

  8. jake says:

    hi sandbox,

    i gather that the hack above allows you to have a thumbnail for the browse page which is different in size to the thumbnail on the flypage?

    i have tried all sorts of combinations, checking and unchecking boxes, etc but no matter what i do, both thumbnails come out the same size

  9. eugen says:

    Warning: imagejpeg() [function.imagejpeg]: Unable to open '/var/www/vhosts/by-eight.com/httpdocs/components/com_virtuemart/shop_image/category/resized/testCategory_4c49f4533bad4_120x120.jpg' for writing: Permission denied in /var/www/vhosts/by-eight.com/httpdocs/administrator/components/com_virtuemart/classes/class.img2thumb.php on line 299

    Warning: getimagesize(/var/www/vhosts/by-eight.com/httpdocs/components/com_virtuemart/shop_image/category/resized/testCategory_4c49f4533bad4_120x120.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /var/www/vhosts/by-eight.com/httpdocs/administrator/components/com_virtuemart/classes/class.img2thumb.php on line 363

    Warning: imagejpeg() [function.imagejpeg]: Unable to open '/var/www/vhosts/by-eight.com/httpdocs/components/com_virtuemart/shop_image/category/resized/testCategory_4c49f45369c06_120x120.jpg' for writing: Permission denied in /var/www/vhosts/by-eight.com/httpdocs/administrator/components/com_virtuemart/classes/class.img2thumb.php on line 299
    Not really work by me:
    Warning: copy(/var/www/vhosts/by-eight.com/httpdocs/components/com_virtuemart/shop_image/category/resized/testCategory_4c49f4533bad4_120x120.jpg) [function.copy]: failed to open stream: No such file or directory in /var/www/vhosts/by-eight.com/httpdocs/administrator/components/com_virtuemart/classes/imageTools.class.php on line 347

  10. rolan says:

    this is awesome thanks so much- worked a treat!!

  11. Jonatan says:

    Can't get it to work. When i make new product the uploaded image for it doesn't get resized! Any ideas what it can be?

  12. Mon says:

    Thank you, it's really help..

  13. Joey London says:

    very helpful, thank you for this post!

  14. Almen says:

    hello
    i have php moudle i will like copy php virtuemart categories tree to module php
    how can connect for example
    Home laptop dvd……..?
    thank you

  15. karoshino says:

    I followed exactly the instructions.
    However, the category image won't change in size whatever I try.
    GD is enabled and I also see my CAT_FULL_IMG parameters in virtuemart.cfg.php .
    Perhaps this hack doesn't work with version 1.19 ?

  16. Shaun says:

    It worked on some sites for me, but doesn't seem to work on my last 2 sites – must be because of an upgrade. It won't let me save anything under the configuration. Each box just keeps saying "PSHOP_CAT_FULL_IMG_WIDTH" and variations. I put in a number, check the tickbox, click save or apply and come back to the screen and it hasn't saved anything. Everything else on this screen saves, just not the settings for this hack.

    Where is this info being saved? In the database? If so I'll put the width/height into the database itself if I have to, because saving it in config won't work. Joomla v1.5.22, VM v1.1.9. Any ideas?

  17. Shaun says:

    Sweet fixed it for anyone else who has this problem, I entered the figures directly into administrator/components/com_virtuemart/virtuemart.cfg.php

    This part here:
    define('PSHOP_CAT_FULL_IMG_RESIZE_ENABLE', '1');
    define('PSHOP_CAT_FULL_IMG_WIDTH', '170');
    define('PSHOP_CAT_FULL_IMG_HEIGHT', '199');
    define('PSHOP_CAT_UPLOADING_FULL_IMG_RESIZE_ENABLE', '');
    define('PSHOP_CAT_UPLOADING_FULL_IMG_WIDTH', '170');
    define('PSHOP_CAT_UPLOADING_FULL_IMG_HEIGHT', '199');

  18. Wilson says:

    Hi

    I did everything that you said to do and also got the image on theme that you have here.
    but now when I go to localhost I just have a white page and dont know why.

    Can you help me on this

Leave a Reply