Author Topic: View/Print a complete Price List  (Read 178800 times)

Pisu

  • Contributing Developer
  • Full Member
  • *
  • Posts: 451
  • ..still looking for..
    • Blog di Stefano Bagnatica
View/Print a complete Price List
« on: October 25, 2007, 14:47:47 pm »
Hi, I have done a small add-on for VirtueMart, that make possibile for the user to view, print, or download in PDF the Complete Price List, divided by categories. It works also on Joomla 1.5 and VirtueMart 1.1.

The package I'm attaching is ready for unpacking in the website root folder. It do not overwrite any file, and do not modify any other feature of VirtueMart.

Once unpacked, create a new menu item, whereever you what, with this link:
index.php?option=com_virtuemart&page=shop.pricelist

Between lines 8 and 18 of file shop.pricelist.php, you can set some options:
$onlyregistered = true --> allow access only to registered customers
$displaymanuf = true --> display a column with the manufacturer name
$productlinks = true --> make the products names clickable, with links to product details page
$discountcolumn = true --> display a column with the discounted price


Translations: italian, english (by thepisu), dutch (by huub), swedish (by Jerker Lundin), russian (by beagler), french (by psychotik_noise), german (by Bolle), czech (by MinstrelJT), serbian (by dsmarket), spanish (by grafika & leetorrens), polish (by Rzast), slovenian (by Siclaw), hungarian (by Csurulya Laszlo), romenian utf-8 (by Csurulya Laszlo), greek utf-8 (by okouliko)


Package updated, available on VMItalia download area:
http://www.vmitalia.net/index.php?option=com_docman&task=doc_download&gid=35&Itemid=58
Pisu - Team VMItalia (Supporto Italiano VirtueMart)
www.stefanobagnatica.it | www.vmitalia.net

huub

  • Jr. Member
  • **
  • Posts: 62
Re: View/Print a complete Price List
« Reply #1 on: October 25, 2007, 15:45:55 pm »
WOW, this is fantastic!!

I was the first to download it and had it working within 1 min. :)

One question .....

Would it be possible to show the prices with taxes included? now it shows prices excl. taxes. another solution would be two columns with both prices.

I also noticed (but this is ok) that it doesn't take into account reduced prices from special products.

Thanks for an amazing piece of work.

huub

  • Jr. Member
  • **
  • Posts: 62
Re: View/Print a complete Price List
« Reply #2 on: October 25, 2007, 16:00:02 pm »
One more thing in noticed .....

In shop.pricelist.php there is still hardcoded the title ("Listino completo").

I've also added the dutch language file.

[attachment cleanup by admin]

Pisu

  • Contributing Developer
  • Full Member
  • *
  • Posts: 451
  • ..still looking for..
    • Blog di Stefano Bagnatica
Re: View/Print a complete Price List
« Reply #3 on: October 25, 2007, 18:48:11 pm »
Gr
In shop.pricelist.php there is still hardcoded the title ("Listino completo").
I've also added the dutch language file.

Great, I modified the package adding your language file, and translation for the title (it's attached in the first post)!

You're right I'll work on adding tax to prices...  I developed this for a customer that sold primarly to companies, so they wanted net price...

Here some screenshots.

[attachment cleanup by admin]
Pisu - Team VMItalia (Supporto Italiano VirtueMart)
www.stefanobagnatica.it | www.vmitalia.net

huub

  • Jr. Member
  • **
  • Posts: 62
Re: View/Print a complete Price List
« Reply #4 on: October 25, 2007, 19:01:54 pm »
Thanks for adding the dutch language file.

Another handy idea might be to have he list ordered for each category on sku or productname.

Pisu

  • Contributing Developer
  • Full Member
  • *
  • Posts: 451
  • ..still looking for..
    • Blog di Stefano Bagnatica
Re: View/Print a complete Price List
« Reply #5 on: October 26, 2007, 11:54:52 am »
Hi, I'm attaching an updated package that add the tax to prices! In detail:

If the current user's shopper group is set for not showing taxes (example Wholesale), the prices are net (without tax), just like before.
It the current user's shopper group is set for showing tax (common case), the text "including tax" is added in column header, and prices are displayed including tax!

@huub: please check the dutch translation of "including tax"... I used an online tool for this...

For ordering, you can manually change it, editing the "shop.pricelist.php" file, searching for "ORDER BY p.product_sku" and replacing with "ORDER BY p.product_name" (twice).

Updated package in the first post
Pisu - Team VMItalia (Supporto Italiano VirtueMart)
www.stefanobagnatica.it | www.vmitalia.net

huub

  • Jr. Member
  • **
  • Posts: 62
Re: View/Print a complete Price List
« Reply #6 on: October 26, 2007, 12:05:22 pm »
This is getting better and better.

It was already fantastic and now it is amazing .....what will be next?! :)

I've made a few little changes to the dutch language file.

Thanks again for your hard work, it is appreciated.

[attachment cleanup by admin]

Pisu

  • Contributing Developer
  • Full Member
  • *
  • Posts: 451
  • ..still looking for..
    • Blog di Stefano Bagnatica
Re: View/Print a complete Price List
« Reply #7 on: October 26, 2007, 12:37:44 pm »
Good, I updated the package! It's in the first post.
Pisu - Team VMItalia (Supporto Italiano VirtueMart)
www.stefanobagnatica.it | www.vmitalia.net

Jerker Lundin

  • Beginner
  • *
  • Posts: 16
Re: View/Print a complete Price List
« Reply #8 on: October 26, 2007, 13:24:07 pm »
This was a wonderful add on and so easy to use.

I saw that a pricelist is accessable to all evan if I have choosen to show prices only to registered customers.

Is there an easy way to check this?

I add a swedish translation

[attachment cleanup by admin]

trumpton

  • Jr. Member
  • **
  • Posts: 92
Re: View/Print a complete Price List
« Reply #9 on: October 26, 2007, 13:29:22 pm »
Add an ahref link to the Category ID and you have a site map?

masterme

  • Beginner
  • *
  • Posts: 8
    • cutting plotter and signsuplies
Re: View/Print a complete Price List
« Reply #10 on: October 26, 2007, 14:17:56 pm »
Wow  ! nice work  thx :D

wakasm

  • Beginner
  • *
  • Posts: 1
Re: View/Print a complete Price List
« Reply #11 on: October 26, 2007, 19:20:17 pm »
This looks great, but for some reason it only pulls my first category.

(example)

Home -> Online Store -> Category 1 -> SubCatA1
                                         Category 2 -> SubCatA2

For some reason it only shows the first Category 1 amd SubCatA1 but not Category 2 / SubcatA2

*Side Question*

Would it be possible to just pull up a specific Category - Say only Category 2?

Pisu

  • Contributing Developer
  • Full Member
  • *
  • Posts: 451
  • ..still looking for..
    • Blog di Stefano Bagnatica
Re: View/Print a complete Price List
« Reply #12 on: October 26, 2007, 22:25:06 pm »
I saw that a pricelist is accessable to all evan if I have choosen to show prices only to registered customers.

Try the modification attached in first post! Here I added also your translation.
At top of the file shop.pricelist.php, I've added the variable $onlyregistered, if set to "true" (in this package is), visitors not logged, that try to access the pricelist page, have only an advise message displayed. Note that this message has to be translated in dutch and swedish (look in language files).

Add an ahref link to the Category ID and you have a site map?

What do you mean???

For some reason it only shows the first Category 1 amd SubCatA1 but not Category 2 / SubcatA2

*Side Question*
Would it be possible to just pull up a specific Category - Say only Category 2?

For the first problem, I really don't know... It's all working to me, also with many categories and subcategories.
For the "side question", you can open the file shop.pricelist.php, and modify line 180 (or 184, if using new VM_PriceList_Reg pack), like this:
Code: [Select]
$query .= "WHERE #__{vm}_category.category_publish='Y' AND #__{vm}_category.category_id=2";

Change the "2" number with the ID of the category you want to display.
Pisu - Team VMItalia (Supporto Italiano VirtueMart)
www.stefanobagnatica.it | www.vmitalia.net

aravot

  • Peter
  • Quality&Testing Team
  • Hero Member
  • *
  • Posts: 2874
    • VirtueMart Extensions
Re: View/Print a complete Price List
« Reply #13 on: October 26, 2007, 22:49:26 pm »
What is Reg pack? If the same only updated why not update the first post attachment with the new file to avoid confusion.

Pisu

  • Contributing Developer
  • Full Member
  • *
  • Posts: 451
  • ..still looking for..
    • Blog di Stefano Bagnatica
Re: View/Print a complete Price List
« Reply #14 on: October 26, 2007, 23:08:28 pm »
What is Reg pack? If the same only updated why not update the first post attachment with the new file to avoid confusion.
It contains a modification, for enabling access only to registered customers. And I've not yet tested it...
Maybe later I'll put it in the first post!


Tested and package updated in the first post!
Pisu - Team VMItalia (Supporto Italiano VirtueMart)
www.stefanobagnatica.it | www.vmitalia.net