SilverCart Forum

We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?

You can help us helping you by providing detailed error messages, screenshots and logfile entries.

SebastianRamon

Page: 1 , 2
Topic Variants and field modifiers not working? 4783 Views

Variants and field modifiers not working?

16 August 2012 at 12:05am

Hi,

I am enjoying trying out the new version of SilverCart but have hit a snag when experimenting with variants. I would like to add a variation that adds a cost for printing positions (the more printing positions are used, the more expensive the product).

I have assigned a field modifier to the the Characteristic:

I would like to increase the price by 40c (I have also tried changing this to .4). Everything works okay, apart from choosing this variant doesn't do anything to the price!

What am I doing wrong?

Graeme

Re: Variants and field modifiers not working?

16 August 2012 at 5:01am

This may or may not be related. When I am logged in as Admin and browse products and add them to the cart, the prices are net (i.e., taxes are added on separately). However, if I log out, then the prices are displayed as gross (i.e., including taxes)—including in the cart. I have set the prices to be net.

I have deleted silverstripe-cache, restarted Apache/MySQL, rebuilt the database, etc.—all to no avail.

Graeme

Re: Variants and field modifiers not working?

16 August 2012 at 10:12am

Hi graememck,

to answer your second question first - if you are logged on as an admin, you are in a different member group as those who are not logged in. Whether prices are gross or net can be maintained via Security and then by selecting the desired group.

As for the first question, Sascha will look into it and check if it's a bug or a feature ;-)

Cheers
Ramon

Re: Variants and field modifiers not working?

16 August 2012 at 11:06am Last edited: 16 August 2012 11:22am

Hi Ramon/Sascha,

A bit more information. I am trying to add two variations: one for printing positions, the other for printing colours. The more printing positions, the more expensive the product becomes; similarly with printing colours.

On another installation I managed to get one variation with field modifier to work (the first one). However, adding a second variation (printing colours) didn't work (the first variation continued to work). So maybe it has to do with having more than one variation?

Also, another question: If I wanted to add setup costs to a product that was independent of the product quantity what would be the best way of going about this? It would be similar to shipping but one wrinkle is that it would be linked to the number of colours/positions—the more colours and positions the more the setup charge.

Graeme

Re: Variants and field modifiers not working?

16 August 2012 at 12:40pm

Hi Graeme,

1) regarding the net prices not showing when you're not logged in:

you can set the default price type in the backend under menu "Configuration:General configuration" => "Prices" => "Default price type".

Setting this to "net" worked for me.

2) The field modifiers for prices didn't work on net prices.

This was a bug and has just been fixed and published - just download version 1.0.1 of the product variants module from "http://www.silvercart.org/downloads/silvercart-1-3-0-custom-download/" and copy it over your existing module installation.

3) Multiple field modifiers

I created the collections you described with the patched version and everything worked fine. Could you check if it works for you now, too?

4) Adding variants with costs regardless of quantity

This isn't implemented yet and unfortunately I can't think of a workaround.
You would have to change line 105 in "silvercart_product_variants/code/plugins/SilvercartProductVariantShoppingCartPositionPlugin.php" to achieve this globally.

If you want to order us to implement this feature just send me an email to "skoehler [at] pixeltricks [dot] de" to arrange the details.

All the best,
Sascha

Re: Variants and field modifiers not working?

16 August 2012 at 10:55pm

Hi Sascha,

Yes, that works properly. One very minor bug is that the rounding is not working properly. The Paypal base price is 8.395; I have added two variants totally 1.00 so the final price should be 9.40 (rounded up) whereas it shows as 9.39. I am not, however, going to complain about this!

As to the custom implementation, I am very interested in contracting you to do this. I do want to, however, experiment a bit more as there may be other things I will get you to do at the same time.

Again, thanks for all your time and help.

Graeme

Re: Variants and field modifiers not working?

16 August 2012 at 11:49pm

Hi Sascha,

Another issue I have discovered. If I choose the variants from the Home page then they are not carried over to the cart whereas if I go the Product page (choosing Show details) and choose the variants they do appear.

Not a “show stopper” but I thought you might be interested.

Graeme

Re: Variants and field modifiers not working?

17 August 2012 at 12:33pm

Hi Graeme,

thanks for testing the module properly, we really need such feedback :)

There's a new version 1.0.2 available for download which fixes both the price rounding problem as well as the add to cart issue.

Let me know if they work for you.

Cheers,
Sascha