Virtuemart Expert Blog
Content Plugins in all Virtuemart Themes
Written by Thomas Kahl   
Thursday, 22 July 2010 23:28

This is a small tip about how to use Joomla! content plugins in all Virtuemart themes. This will only work in Joomla 1.5.

Open a theme file in which you want to execute plugins – for example the basket_b2c.html.php.

<?php
... comment 
ob_start(); 
?>
<table width="100%">
... theme code for the basket ...
</table>
{snippet 1}
<?php 
$output=ob_get_contents();
ob_end_clean();
echo JHTML::_('content.prepare',$output);
?>

What we are doing here is to store all the output of the theme into the $output variable using ob_get_contents() within the ob_start() and ob_end_clean() block. After that, we use the Joomla! function to run all “onPrepareContent” plugins with the buffered $output and echo this in the theme. In this example we have added a plugin placeholder for the Snippets plugin “{snippet 1}”. This will be replaced with the data the plugin returns.

Another example: you could for example replace the Virtuemart image tags with the RokBox-plugin: echo "{rokbox album=|Product| thumbcount=|3|}images/stories/products/$product_id/*{/rokbox}"; In this example the RokBox plugin would create max. three thumbnails of the images stored in the given path. In the path we have included the product-id variable. This way it is very easy to manage product images just by uploading them to a given folder.

This is another way to avoid a lot of hacks in Virtuemart. you can use this in (as far as i know) every theme. With this trick, you can write plugins that can dynamically replace data or extend the features of the themes.

You should keep in mind that output buffering and the use of plugins may have impact on your server load. So - always think about where you use this trick. If you use it on the browse page and you display 50 products, the plugins are executed 50 times!

 
You are responsible!
Written by Thomas Kahl   
Friday, 11 June 2010 12:04

closedshopthe “Joomlablogger” has just released an interesting blog post about who is responsible for errors on a webpage or loss of data. All that has been said there is even more important on an ecommerce site! Don’t forget – you are working with customer information! It is nice that today, it takes just some hours to set up Joomla, Virtuemart and some extensions and you have an onlineshop up and running – without any technical (and maybe legal) knowledge.

On the one hand side, you have to care for the data your customers gave you in faith about the security of your site. On the other hand, it is your business. Imagine what happens if your webshop goes away and all data is lost. OK, you can blame this “ugly” guy who wrote the module you have just installed and which might have been the problem. But what does this help? Nothing. Your shop still is gone.

Honestly – when did you create AND check the last backup of your site? Your hosters backup doesn’t count – there are enough examples where you cannot rely on your hosters backups. So, when did YOU create and check your backup?

There are even more questions you should answer honestly:

  • when did you check your access-logs?
  • when did you check your error-logs?
  • when did you change Admin- / (S)FTP- and Database Passwords?
  • do you monitor strange actions on your server?
  • how do you care for your servers security?

There are a lot of tools available that make this job easier. But the shopowner has to be aware of the risks. If he is not, he is part of the risk.

 
J And Beyond is over…
Written by Thomas Kahl   
Thursday, 03 June 2010 14:30

jab_bag… and it was a great success and a wonderful conference. It was a pleasure to meet a lot of interesting people from the Joomla Community in the real world.

From a Virtuemart point of view it was also very good. We had a lot of discussion about Virtuemart and it showed how important Virtuemart is for the Joomla Ecommerce. A lot of people knew about our VMX version and we received 100% positive feedback (as we already have received in a lot of mails – thank you for that btw.).

We have offered a dicussion on the conference about “Joomla Ecommerce” and we didn’t limit it to Virtuemart. A lot of people joined the discussion and – suprise – it turned out to be a 100% Virtuemart audience. We covered a lot of different questions about what to expect from a Joomla Ecommerce System, what the future will bring and what the shopowners  and –builders missed in the past. I personally was very lucky that the guest of the discussion are all confident with Virtuemart and don’t see a reason to change their shopping cart system.

Of course there are always things that could be better – and one important thing is of course the lack of updates in the last 12 months which we want to make better with VMX. We have written down a short list of answers to different questions that may not only be interesting for Virtuemart. We leave the answers uncommented at the moment, but surely will see what we can add to Virtuemart or VMX in the near future!

What do you expect from an ecommerce system:

  • Easy for shopowners to use
  • Easy for customers to use (frontend)
  • Wide range of payment providers (API)
  • Easy to connect with ERP-Systems
  • Multilingual
  • Cover a wide range of tax systems
  • Flexible SEO
  • Flexible customisation and Layout
  • Easy to use batch jobs for different tasks

Joomla specific:Photo by Radek Suski (Sobi)

  • No need for Joomla 1.0.x compatibility
  • Layout should integrate in Joomla template

Virtuemart specific – what could be better:

  • Ease of use of the Virtuemart administration
    An idea in the discussion was to configure the pages that are shown to have less options for the shopowner once the shop is configured correctly
  • Store the status of views and selections in the backend
    it is a bit annoying in Virtuemart that when you filter the product list for example, edit a product and come back to the list, that the filter is lost. It would also be helpful when the last opened tab in an edit screen would be opened again. Some of these things are already made better in VMX (filters stay active until you reset them)
  • More flexible price calculation
  • Easier handling of child products and images
  • Theme installer

This is just a short overview about the discussion as i have written down the arguments and what is still have in mind. There was a lot more and i would thank the guests of the discussion for this interesting 90 minutes.

 
Resize images on the fly
Written by Thomas Kahl   
Friday, 28 May 2010 17:45

Maybe it is an additional feature or just a correct working image-resizer in Virtuemart. But we have also extended it a bit for Virtuemart VMX…

Normally, Virtuemart only uses the image-dimensions you have configured in the Virtuemart configuration. But often the images are needed in different sizes. Now you can do it without problems – and the best thing: the resize script is only called once per image. After the resized image is once created, our improved script recognizes this and directly creates a URL with the image filename. This is slightly better for SEO but it is better for the local cache or most browsers.

How to use it

you might know the image_tag function from some templates. Just add some parameters to resize the images individually for each theme. This is what you can find in a default browse-template:

echo ps_product::image_tag( $product_thumb_image, 'class="browseProductImage" 
border="0" title="'.$product_name.'" alt="'.$product_name .'"' )

This loads and displays the default resized image for the product. Replace it with this:

echo ps_product::image_tag(basename($product_full_image), 'class="browseProductImage" 
border="0" title="'.$product_name.'" 
alt="'.$product_name .'"',1,'product',250,300 )

and you will receive a new thumb-image with the max-dimension of 250x300 rendered from the full image (for better quality). Notice: the function “basename” is needed, because sometimes the image variable holds the full URL of the local image.

This can be used in all themes where you want to display images. A good way for example to show very small thumbs in the cart.

 
Joomla Modules within Virtuemart VMX
Written by Thomas Kahl   
Friday, 28 May 2010 11:46

To extend the layout-options for Virtuemart and make it easy for you to use, we have added several module positions within Virtuemart. Until now, it was quite difficult to display modules only on special Virtuemart pages. You had to add Menuitems and assign them to modulepositions. This was OK as long as you didn’t want to place modules on special categories or products. In this case, you had to handle a lot of menuitems and had to change them each time something in Virtuemart changed.

From now on – with VMX – you can use predefined modulepositions! Just create any new module and add it to your Virtuemart. But this is not enough. With a simple line of code, you can add your own modulepositions to the Virtuemart themes.

The following Modulepositions are predefined

  • vm_index_top, vm_index_bottom
    Will be shown before and after the Shop-Index-Page
  • vm_browse_top, vm_browse_bottom, vm_browse_top_XX, vm_browse_bottom_XX
    Will be shown at the top and at the bottom of the browse-pages (category-pages). As cou can see, the positions are available two times – once with “XX”. This can be used to place modules only on special category-pages. Just replace the “XX” with a category-id (e.g. vm_browse_top_123) and the module will only show up on the browsepage of this specific category.
  • vm_flypage_top, vm_flypage_bottom, vm_flypage_top_XX, vm_flypage_bottom_XX, vm_flypage_top_featured, vm_flypage_bottom_featured
    Will be shown at the top and at the bottom of the productflypage. As above, replace the “XX” with a product-id to show it only on specific products. We have also added the “featured” option – you guess right – which will only be loaded if it is a featured product.
  • vm_checkout_top, vm_checkout_bottom, vm_checkout_top_X, vm_checkout_bottom_X
    Will be shown at the top or the bottom of the checkout-pages. The option “X” here represents the checkout-stage: 0 – Login / Register, 1 – Shippingaddress …
  • vm_register_top, vm_register_bottom
    Shown on the registration page
  • vm_cart_top, vm_cart_bottom
    shown on the cart page

There are more positions to come… Until then, just define your own! It is very easy – just add the following line to a theme-template of your choice:

$vm_mainframe->showModules("your_position_name");

If you need to check the existance of modules, you can also get the number of modules of a position:

$modulecount=$vm_mainframe->countModules("your_position_name");
 
Virtuemart Group on Joomla.org
Written by Thomas Kahl   
Thursday, 13 May 2010 01:35

virtuemartgroupToday the Joomla! Team has launched the new community site people.joomla.org. This is a great thing! One central place for the whole Joomla! community.

The good thing is, that all members can start groups. We took the chance and started a virtuemart group. We invite all Virtuemart users, developers, 3rd party developer and anybody else who is interested in Virtuemart to join this group.

Maybe it is possible to have an open communication and discussion about our favourite ecommerce system there and all the critics about the lack of communication are history…

Joomla Community Site: people.joomla.org
Virtuemart Group: http://people.joomla.org/groups/viewgroup/30-Virtuemart.html

 
Extended Virtuemart Discounts
Written by Thomas Kahl   
Wednesday, 28 April 2010 19:15

Virtuemart does not offer too much possibilites to create discounts. We have added a whole new discount structure to virtuemart!

Add discounts to Categories, Products and Shoppergroups. Everything can be combined and has a top down structure: e.g. add a discount to a category and every product in this category will have this discount - add a discount to one product in the category, then only this product will receive the special discount - all others will still have the category-discount.

Just take a look at the beta of the discounts-solution...

Take a look at what we have done with discounts:

 

 
Google Analytics Component for Joomla
Written by Thomas Kahl   
Monday, 19 April 2010 12:51

There is a nice component available for Joomla that displays the GA-Statistics right in your Joomla administration. This is really cool – but there is one thing that i really don’t like: the username and password for the google account are stored as plain text as a component parameter in #__component. So, everybody who has access to the database can read my username and password of my google account. As a user of different google services (such as Gmail), i really don’t want this.

I have thought about how to improve this. The best thing would be to create a new google-account just for the analytics. But that’s quite a lot of work if you have different sites.

Another solution could be not to store username and password in the database and enter it each time you want to see the statistics. So i have extended the component that it can use the information during a session. You can also clean the session-login if you are done. We have made a little video that shows how it works:

I have sent the code we have changed to the developer of this component. Maybe he is willing to add this feature. You can also download a patch file for the version 1.0.5 here. Just backup the admin-directory of the component and extract the patch-file to the root-directory of your Joomla-installation and overwrite existing files.

Attention: the patch is just tested by me. I am not responsible for errors, loss of data or any other problems that my result from the use of this patch. Use it on your own risk.

Link to the component on JED

Download the patch-file (ATTENTION: the patch is made for version 1.0.5! There is a version 1.0.6 available. The patch hasn't been tested with the newer version!)

[UPDATE] The developer has informed me that the new 1.0.7 release has session login built in now (next to other new features). So, you will only need this patch if you stay with version 1.0.5 for any reason.

 
Virtuemart Developer Portal has changed
Written by Thomas Kahl   
Monday, 08 March 2010 14:15

devportal

The Virtuemart 1.5 Team has recently changed the Developer Portal of Virtuemart. This has been done for many reasons – the main purpose was that the new portal software is easier to handle.

Unfortunately, all the existing links to the portal don’t work anymore because of the (unlucky) decision to use the same URL: dev.virtuemart.net.

There is a workaround for this: if you need something from the old portal, just replace the subdomain-name “dev” with “cb” (from CodeBeamer, the old portal software).

But there is a bigger problem with the change of the software: the online-update feature of Virtuemart 1.1.x doesn’t work anymore. This was forgotten by the 1.5-Team. Sadly, there is no workaround for this at the moment. Maybe the admins of dev.virtuemart.net  can set up a redirect in the system so that the URL Virtuemart uses for the online update points to the correct file.

 

Link to the “old” Developer Portal:

http://cb.virtuemart.net

 

Link to the new Files Directory:

http://dev.virtuemart.net/projects/virtuemart/files

The new Bugtracker:

http://dev.virtuemart.net/projects/virtuemart/issues

 
Showcase Product Attributes
Written by Thomas Kahl   
Saturday, 06 March 2010 19:15

You all know the product attributes of Virtuemart. A very useful feature to add options to a product. But the display is a bit boring... Normally you see the attribute groups you add in the product administration as a dropdown on the product flypage.

Take a look at what we have done with the attributes:

This is all done in the Virtuemart Themes without hacking the core code of Virtuemart!

 
Quicksand in Virtuemart
Written by Thomas Kahl   
Thursday, 04 March 2010 18:21

Maybe you have seen this cool website with a very stylish and cool jQuery plugin called "Quicksand". We liked it so much that we wanted to make this available in Virtuemart. Imagine the Virtuemart Browsepage would reorder like this...

Here it is! Watch yourself...

The files for the Virtuemart-Themes will be available from this site as soon as possible...

(If you like the template - it is available at Joomlart.com)

 
  • «
  •  Start 
  •  Prev 
  •  1 
  •  2 
  •  3 
  •  Next 
  •  End 
  • »


Page 1 of 3