Prices inc. Vat/Tax

Posts: 42
Joined: 08/08/2007

Hi everyone I need help here as my online shop have the prices inc.vat so can anyone help me when we create a product. In product information where we put sell price there I want a options that I can tick in to tell customers that the price is inc.vat or exc.vat or a empty box in which I will be able to write inc.vat/tax which will any customer can see next to price that its inc.vat/tax or exc.vat/tax.

can anyone help me in this Ihave attach an example how I want.

hopefully most of us want the same thing for there stores

Thanks in advance

AttachmentSize
inc.vat1_.JPG42.13 KB
--

www.taggedcheap.co.uk The cheapest price shop

Posts: 339
Joined: 08/28/2007
Early adopter... addicted to alphas.Not KulvikTheminator

Hi, a quick work around would be to create a CCK text check boxes/radio buttons field within which you add Inc. VAT and Exc. VAT as the allowable values. If you haven't already I would suggest creating your own node-product.tpl.php file in your theme folder so you can display it where you would like on the product/teaser/preview pages.

Posts: 42
Joined: 08/08/2007

Thanks for your reply but I dont have any knowledge of codes so I was thinking if anyone can help me to make a code

--

www.taggedcheap.co.uk The cheapest price shop

Posts: 339
Joined: 08/28/2007
Early adopter... addicted to alphas.Not KulvikTheminator

You can create a CCK field with no code at all. Just edit the content type and add a field.

Install contemplate and/or devel modules. They will give you all the code you need to place in your node-product.tpl.php.

Posts: 42
Joined: 08/08/2007

still looking for help

--

www.taggedcheap.co.uk The cheapest price shop

Posts: 339
Joined: 08/28/2007
Early adopter... addicted to alphas.Not KulvikTheminator

I'm going to install a fresh ubercart alpha7d for testing so can post further instructions for you. I'm a bit busy right now but will get on to it later. Will post back here.

Posts: 339
Joined: 08/28/2007
Early adopter... addicted to alphas.Not KulvikTheminator

Ok. Here is a quick tutorial on how to add custom fields to your product and how to display them to your users:

  1. Enable CCK, Contemplate and CCK’s Text and Option Widgets modules.
  2. Go to Administer >> Content management >> Content types and edit the product type.
  3. Click the Add field tab.
  4. Add a new Text > Check boxes/radio buttons field.
  5. In the Allowed values list add:
    Inc. VAT
    Exc. VAT
  6. Now either create a new product or edit an existing one to see your new field displayed on the create/edit product page.
  7. Add the field to your product so we can theme it later.
  8. Go to Administer >> Content management >> Content types and edit the product type.
  9. Click the Display fields tab.
  10. Select for the Label option associated with your new text field.
  11. Go to the product page for which you have activated the text field.
  12. Click the Dev render tab.
  13. Scroll down the page to field_nameofyourfield_field and you will see that there is an array containing your text. This is a handy way to see in what format you data is being handed to the theme. If you know what you’re doing this will be all you need to theme your content types.
  14. Go to Administer >> Content management >> Content templates and create a template for Products. Expand the body fieldset and click Affect body output.
  15. Scroll down the Body Variables pane and find the variables needed for your content type. You can copy them into a textfile with labels so you know exactly what each bit of code will display. Note: you will need to get all the variables that you wish to display on your product page.
  16. Copy the file node.tpl.php in your theme dir and rename it to node-product.tpl.php. Look at the file and see how it works.
  17. Replace the <?php print $content; ?> with the variables you got from step 15. Remember that you might need to add the correct HTML and CSS depending on which variables you picked.

This little tutorial applies to any content types created with CCK. Not just Ubercart products. Hope it helps.

Posts: 42
Joined: 08/08/2007

Thankx for all your help but still no luck I havetried everything you said when I select option it shows in discription not next to price dont know what to do know.

--

www.taggedcheap.co.uk The cheapest price shop

Posts: 339
Joined: 08/28/2007
Early adopter... addicted to alphas.Not KulvikTheminator

Did you change the <?php print $content; ?> line for your variables you got from step 15?

Posts: 42
Joined: 08/08/2007

yes whatever you said I have done that but Sad

--

www.taggedcheap.co.uk The cheapest price shop

Posts: 339
Joined: 08/28/2007
Early adopter... addicted to alphas.Not KulvikTheminator

Maybe you need to have the option widgets on the create product page to be next to price. That is not possible with the method above but should suffice without having to create a module or, dare I say it, hacking Ubercore.

The method I have given above is very versatile and can be used to place the value (in this case 'Inc. VAT/Exc. VAT') at any place on the page the users see.