Home Webpage Help
Saturday, May 19 2012
VirtueMart Tips PDF  | Print |  Email
User Rating: / 0
PoorBest 
Written by Mike Pritchard   
Monday, 14 December 2009 12:42
This was my first venture into shopping carts, and it was a steep learning curve for me. Lots of new concepts.
Below are some tips, most of which were very hard to find online help for.


Tweaks:

In Admin Config
Global: turn off Enable the Cookie Check? until you are done working on the site
...
Site: in "Select the theme for your Shop" click "Configuration" for more settings. (there you can set it so the customer can buy nothing from the product list (browse) page)
...
To be sure that the quantity shows 1 and not 0:
IN display options choose List: Display Child Description only.
...
To Not show Featured items on front page of virtue mart, on the backend, in the component, go to the product, choose Product Status and uncheck (or check) "On Special"
...
All product images need to be the same size to look good, probably 110x110
...
To change how many items show per row go to Admin Config Site and set there, but also is set in individual categories
Products / List Categories click on Category and scroll to bottom
There you can also change how the page is layed out. Many versions already to choose from, start with the name browse.
Those files are in components/com_virtuemart/themes/default/templates/browse
browse3 and 5 are good, can tweak those files
...
When displaying products with attributes (small, medium, large) you can do it two ways.
You can create a separate product for each item, that gives you stock control (Called "Items", and is for counting on your online inventory)
or just define the attributes for each product.  "Items" would make it very difficult for dabase imports.
http://virtuemart.net/documentation/User_Manual/Product_Attributes.html
...
To edit the template layout of Item pages you must edit flypage-ask.tpl.php in \components\com_virtuemart\themes\default\templates\product_details\
...
to hide "Recently Viewed Products" goto
\components\com_virtuemart\themes\default\templates\product_details\ and open flypage.tpl.php
In that file you will find a variable named $recent_products which you need to hide.
That works but it still shows sometimes, soooo
inside: components/com_virtuemart/themes/default/templates/common/
edit recent.tpl.php and take out most of the info in that file.
...
To eliminate " «« Start « Prev 1 Next » End »» " on default Browse pages that have just 1 page of results, make a copy of, then edit this file:
components/com_virtuemart/themes/default/templates/browse/includes/browse_pagenav.tpl.php
Find this line:
writePagesLinks( $search_string ); ?>
and replace with these lines:
limitstart+1 == 1) && ($pagenav->limitstart + $pagenav->limit >= $pagenav->total) )) {
	$pagenav->writePagesLinks( $search_string );
};
?>

But if you take out the entire code it will get rid of the nav completely.
...
If the product has any attributes you can't order it from the front browse page.
This was a design decsion by Virtuemart and would be very difficult to modify
...
in product list area you can click by a product and then click "list prices" then New and add a discounted price for certain shoppers (gold card members for example) or a discount for purchasing more
...
add to cart image is here: components/com_virtuemart/themes/default/images/add-to-cart_blue.gif
...
added back button code taken from one of the other files to flypage.tpl.php in just the right place.
...
change color around box in Item order selection in theme.css (which is inside themes/default) in vmCartContainer and two other places (get code of current color, and do a search in that file for all entries)
...
when adding new articles to sell (ones that do not have Items)
under "Display Options" choose List: Display Child Description, that way the order box looks nice and the quantity begins with 1
...
To line products up nicely on the browse page, create a new div in your browse php
Located here: components/com_virtuemart/themes/default/templates/browse/
that sets the height of the parts that need to be adjusted.
i used <div style="height:34px;"> for the title and price, because all the products on that page had no descriptions and all had the same size image. That gave a 3 row title+price on my heavily edited browse_3.php
when you set this up for real you will need to make lots of dupes of the browse_ files for each section.
...


CREDIT CARD INFO:

When you buy SSL may need to wait for DNS to propogate.
...
Shared security at siteground works:
https://siteground158.com/~sitegroundprofilename (the viewer has to do exception in webpage when you hit it though) you don't have to signup for anything, just use https at your dns computer name. (this is good for testing purposes only, you need to buy SSL)
...
Need online Merchant account to accept credit cards. Using an offline processor for online purchases is risky and probably a violation of the terms.
...
To test: signup with https://www.sandbox.paypal.com then:
change the URL in the PayPal payment module. You can find this in the configuration tab, and at the bottom, under "Payment Extra Info" If you are testing with the PayPal Sandbox then you need to change the default URL (the real PayPal site) to the Sandbox URL:-

$url = "https://www.sandbox.paypal.com/cgi-bin/webscr";
from: https://www.paypal.com/cgi-bin/webscr.
AND leave the setting at top at: Use html-form based
AND enter the paypal email address you got at sandbox (that is referred to above)
...
Then test with the buyer account you set up at sandbox. You can go all the way through the process without having to login at Paypal (during the payment process) if you set it up right.
But you have to be logged in to the paypal sandbox account you set up.
...

EXPORTING AND IMPORTING DB FILES:

There is an addon component for handling csv imports and exports, it costs $30 per year. But this can be done also via phpmyadmin and a few tables. (this is for if you want to add lots of products at once, or edit a lot of products at once)
...
You will go to phpmyadmin, to the database and click on each table individually. Click on Export and choose MS Excell and choose with header row.
Insert a row between the header row and the ones below it (this way you can use both the header row as a guide, and the rows below.)
When you are done delete out all the other rows, including the header row and save as a csv file. (if one of the columns is text formatted numbers you need to be sure you format the cells that way, you will see the note in the excel doc if it is)
Open the csv in Notepad and be sure the header rows are gone and that there are no extra rows at the bottom.
Then import back into the table as a csv file.
...
If you do not create any "items" that is, product with children (attributes are okay)
then here are the tables you need to edit:
#1. product_category xref - Puts each product_id into a category_id and  then in product_list it puts the item in list order
#2. category - creates unique id for each category, name, description , thumbnail image, whether the category is published, cdate and mdate, the browsepage, products per row, flypage and list order
#3. product - where most of info about products are stored
#4. product_price - where price is stored
....
In database table for product, correct child_options is N,N,N,N,N,N,,,
that will insure you have 1 selected in the order box.
...
To do database addition of products you would need to create all thumbnails and full sized images and put them in: components/com_virtuemart/shop_image/product/
then place the name of the image in the product table.
...
Can use http://www.unixtimestamp.com/index.php to create correct date for cdate and mdate database entries (but you can copy and old one if you don't care if the dates are exact).
...

SHIPPING:

Shipping Rates checks zip codes and countries mailing to. It will be based on the geographic location of your store.
You need different shipping rates for express shipping.
You need to edit the shipping rates that come with the program to make them up-to-date.
...
You can set up your own Shipper with your own rates.
You can set up shipping based on total price.
You can set up shipping based on books (but that would affect all products)
...
You can modify the shipping rates, and you need to add your handling charge to each rate as it will only choose one rate to ship with.
...
You can change the order of checkout so that shipping costs come up just after they log in. (in Admin/Configuration/Checkout)
It would be a good idea to put the shipping costs on a side custom module.
....
Adding in the shipping cost to the price of the product will only work if the shipping cost does not get less as the amount ordered goes up.