Top Left Text cha

Web & App Development

If you read the documentation on creating a custom product details template for Virtuemart 3.x (and Joomla 3.x of course), you might find it sounding complicated.  But it is not at all... at least not if you're used to creating template overrides for other modules and components.

  1. First, copy the default template that's probably currently being used at [front end] \components\com_virtuemart\views\productdetails\tmpl\default.php.  Open default.php and copy the contents into another folder (call it what you want).  I called mine tjohns.php.
  2. Then, in your template folder, create the file path if it's not created already for other overrides you may have made: [front end] \templates\[your template]\html\com_virtuemart\productdetails\tjohns.php (instead of tjohns.php, it would be whatever you called the file).
  3. In the Virtuemart administration, go to 'configuration' > 'templates' tab.  You'll see that the field, 'product layout' is set to 'default'.  You can now select the template that you put in your templates folder.  In my case, I now have an option for 'tjohns'.
  4. Take the new template file you added to your template - and edit away!

I haven't tried so I can't say this will work 100%... but you should also be able to do the same thing with the category layout and cart pages.
Comment (0) Hits: 11120
When Virtuemart 3 came out, they kept calling the same template in the Joomla admin - which Joomla removed from the default install.  

You'll need to change a few lines in /administrator/components/com_virtuemart/helpers/vmjsapi.php (around line 164) to:

//Todo load BE standard template first
$file = '/administrator/templates/isis/css/template.css';

(just change 'bluestork' to 'isis')
Comment (0) Hits: 4027
Yes,  another Virtuemart bug.  I've been fixing Virtuemart bugs since V1.0.  It's always came PACKED with bugs.  But that's okay because it's taught me a lot of lessons... and made me very comfortable working with the templates and VM code.  Could be worse... could be working with WordPress+WooCommerce - the worst e-commerce solution known to man.

EDIT: times have changed.  WordPress+WooCommerce is now my favorite CMS e-commerce extension/plugin.  It's difficult to make 'pretty', but the functionality is solid (compared to Virtuemart and many others).  I no longer use Virtuemart except on old stores where it's already been implemented.

Anyway, you have to get the latest version.  Then when you go to install v3.0.6.4 (the latest at the time of writing this), there's a bug in the installer!!!   It just tries installing for 5 minutes or so, then goes to a 404 page.  Crappy, but it works.  If you go to 'manage' in the installation manager, you'll see that the version is now v.  And the save button works now.  I don't know if it's necessary, but I also installed v3.0.6.4 of the aio (all in one) package - just in case.  Hopefully this doesn't create more bugs.

EDIT: once again, don't use Joomla for e-commerce.  Use WordPress+WooCommerce... or if you must, Shopify might be okay.  The absolute best may actually be Magento.  But Magento is EXTREMELY overpriced and not affordable for small businesses usually.  And it's a pain to host yourself because they don't want you to (they want to host it, thus collecting even more money making it even more expensive - a shame).
Comment (0) Hits: 2607
Okay... this component is severely lacking documentation - or they've made changes/updates to the component and don't bother to update the documentation.  They make a great component, but documentation isn't a strong point of the software.

Adding size, for example:

Create a custom group of type: String

They tell you to create one called 'cart variant', but there is no such thing.

Here's the only thing you need to know here, but they make no effort in telling you this... nor is there any possible way to know this that I can see.  You have to put 'addtocart' in the text field 'Layout position'.  How is someone supposed to know that?  I must be Psychic.

You also have to check 'cart attribute' and 'cart input'.  Makes no sense if it doesn't affect price, but for some reason, you have to check those.

Then you have to go to the individual product and click on the 'custom fields' tab.  I don't consider this a custom field... I consider it a cart attribute.  But the programmers at VM are somewhat backwards in language and functionality sometimes.

Under 'custom field type', select the custom field you just created.  

In the 'value' enter the size, color, etc. like 'small'.  And you can leave the price as is or add to it if it will cost more.

Then do it again... select the custom field in the drop down and another one will appear.  Enter 'medium'.  Do it again and enter 'large'.

After saving you will see it works but looks horrible with that long string of text next to your sizes (or colors) that says 'no additional charge'.  You'll need to go into the language file at C:\xampp\htdocs\tjohns\flexyfit\components\com_virtuemart\language\en-GB\en-GB.com_virtuemart.ini and remove 'No additional charge' from line 81 so it says: COM_VIRTUEMART_CART_PRICE_FREE=""

Or you can do a language override as Andrea pointed out (remove No additional charge)

Comment (5) Hits: 9800