logo

Buildweb - Joomla Tips & Tricks

 

If you are a developer yourself, or you like to fiddle with Joomla code you may find useful articles here.

Actually my main purpose is just to document all the stuff I find out about Joomla and keep track of useful code changes. So why not share it, if it is already documented?

How to access field values from SQL queries, example
Written by Gyula Kómár   
Wednesday, 12 October 2011 11:46
Comments

Below is a simple database example for Joomla, more precisely Virtuemart. It takes the first product in the shopping cart and uses its product_id to build a SQL query which then returns the product fields of that particular product, then extracts its product_name.

Read more...
 
How to change the default product list sort order in Virtuemart back-end
Written by Gyula Kómár   
Wednesday, 12 October 2011 11:25
Comments

If you go to the product list in Virtuemart, you can see that the default sort order of the products is alphabetical (not counting that the unpublished products go to the end of the list). When you fill-up a new store however my preferred order would be to see the last added products at the top of the list. Unfortunately Virtumart does not allow to change the order.

If you want to change this behavior you can easily change in the code, look for the part below and as you can see one line is commented out and a new line is inserted.

Read more...
 
How to make a Virtuemart product visible only on a given day
Written by Gyula Kómár   
Saturday, 08 October 2011 11:20
Comments

If you have a product that you only want to show on a given day, for example a daily menu, then here is an example how to do that.

In this example I use the Product URL field for this purpose. If the URL field of a product is filled out then it will be compared to the actual date. As you can see the date format in this example Y.m.d, so you have to use the same format in the URLs. Look for the part in the php where the ' WHERE ' clause is found and paste the code just before it.

Read more...
 
How to acces $order_total in list_rates() function
Written by Gyula Kómár   
Tuesday, 04 October 2011 16:33
Comments

If you want to modify the list_rate() function a shipping method in a way to depend on the $order_total, you have to modify the code as shown below. New global variable added $order_total and the $vars array receives its content.

Then you can modify the administrator/components/com_virtuemart/classes/shipping/standard_shipping.php for example to decide which shipping rates to list based on the total value of the order instead of the weight.

Read more...
 
« StartPrev1234NextEnd »

Page 1 of 4


Built by Build Web