Removing automatically inserted brackets from product variant section on product page

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 年 前
i am using product variants and radio buttons to create a selection option on the purchase page in the "order box". does anyone know how i can remove the brackets that are automatically displayed after the radio button

e.g in my case ---   [+£2.00] or [+£4.00] etc etc
14 年 前
try   ProductAttributes.ascx.cs

look for :

[+{0}]

it occurs in several places depending on the control
14 年 前
thanks for advice - not sure that i am doing it right - i can't seem to affect the eventual outcome. all i want to do is stop the incremental price from being displayed in the [  ] brackets, but nothing i do seems to have any effect
14 年 前
warrencowan wrote:
does anyone know how i can remove the brackets that are automatically displayed... [+£2.00]
hi warren, if i understand you, what you are after is to display eg

[+£2.00] as
+ £2.00

to do this, open modules / ProductAttributes.ascx.cs

and locate the three lines which contain  " [+{0}]"
eg    pvaValueName += string.Format(" [+{0}]", PriceHelper.FormatPrice(priceAdjustment, false, false));

change the value inside the quotes  remove / change the symbols
     [ ] +    
as you like   - the  {0}  must remain as that is it is where the value (eg £2.00)  is stored.

save - remember, you must recompile using visual studio (not possible in VWD)
14 年 前
this is really useful thank you - but i haven't explained my self properly

what i really want to do is not display [+£2.00] at all  - i would have been happy just to hide it using css rules but i can't find a way - that is why i am now looking at the code, which i am not that comfortable with.

any suggestions would be most appreciated
14 年 前
ProductAttributes.ascx control has a 'HidePrices' property. Use it (set to 'true')
14 年 前
is this in version 1.50 - iam using 1.40 at the moment?
14 年 前
@warren
ahhh ...


so this setting set to true, does this mean that someone could add an item to the cart which they think is 2.99 and it appears in the cart at eg 3.99

- that might be upsetting for the customer if / when they notice - it might also be a problem legally - which could leave a store owner wide open to chargebacks  - not to mention refunds - storeowner would also have to refund their original postage charge AND the cost of the customer returning items (even if you have a returns policy stating return terms )

use it carefully

The setting would be fine & usable if adding price varying attributes actually changed the product price next to the buy button
14 年 前
the actual price will be shown next to the attribute - this can be entered via the administration panel - so that they will know exactly what price they are paying, because it will be right by the radio button

i just want to hide the [+£xx.xx] sign because it looks so ungainly
14 年 前
Andrei wrote:
ProductAttributes.ascx control has a 'HidePrices' property. Use it (set to 'true')

I'm not able to tell you how to implement the hidePrices property :(

but look in the same place i spoke about earlier - this time try changing " [+{0}]"   to "  "  this does hide the price - i just tried it for you.
you need to recompile after making the change

BUT ... note, if you are displaying the price as part of the attributevalue name, and if you hide the price here, you will also need to hide it in the cart (test it and see what happens to understand why) - i still think editing is probably the best option  "  your custom text {0}"

Actually, when you first asked the question, i looked into it and tested it because i had one product which started at £0.00 and i did not like the way it displayed [+ xx] because the attributevalue price was the actual price, not + something so i simply edited it as i described above ( " -- {0}" )-  now the attribute value  on the page looks like  -- £4.99  screenshot
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.