Zen Cart Logo

Price per word

Locked

Views: 3,552

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
4 Sep 2007, 10:25 AM
#1
busymum avatar

busymum

New Zenner

Join Date:
Sep 2007
Posts:
96
Plugin Contributions:
0

Price per word

I have set up text attributes so that a buyer can add a personlised message. It shows Line 1: 7p per word. It all looks fine, but when I input 3 words, the total cost show up as £3.23 instead of £3.16 (£2.95 is cost of card plus 3 words at 7p per word). Why is it adding 4 words instead of 3 words when I input 3 words? Did I miss something when I set up the attribute? Any help is much appreciated, thanks.

4 Sep 2007, 10:53 AM
#2
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Price per word

Any spaces?

4 Sep 2007, 12:52 PM
#3
busymum avatar

busymum

New Zenner

Join Date:
Sep 2007
Posts:
96
Plugin Contributions:
0

Re: Price per word

There is a space between each word. Is that what you mean?

4 Sep 2007, 2:38 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Price per word

There is a fix on per word coming in v1.3.8 for when the TEXTAREA is being used ...

Have you an URL to this product that we can peek at? :smile:

4 Sep 2007, 2:47 PM
#5
busymum avatar

busymum

New Zenner

Join Date:
Sep 2007
Posts:
96
Plugin Contributions:
0

Re: Price per word

http://www.prettybeautiful.co.uk/index.php?main_page=product_info&cPath=2&products_id=183

I've put in 1 free word and that sorts out the price. But if they input 3 they are charged for 4 but with 1 word free they are charged correctly. But the buyer will think they are supposed to only get charged for 2 words. So it's a fix for the actual price but it's confusing for the buyer. Any ideas?

4 Sep 2007, 2:54 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Price per word

Do you have the Product price as 2.95 AND marked as Priced by Attribute?

If so, change Priced by Attribute to NO

Also check the Configuration ... Attributes Settings ...

Text Pricing - Spaces are Free
On Text pricing Spaces are Free

0= off 1= on

4 Sep 2007, 3:08 PM
#7
busymum avatar

busymum

New Zenner

Join Date:
Sep 2007
Posts:
96
Plugin Contributions:
0

Re: Price per word

Price is £2.95 and price by attribute is set to NO.

Also in attribute settings, on text pricing spaces are free is set to 1 so that spaces are free.

Is there a way to turn off the text under the Add line bit that 1 word is free but without turning off the function? That way the pricing is right and the buyer does not think they should have 1 word free.

4 Sep 2007, 3:29 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Price per word

I am trying to figure out why the error is there in the first place ...

I cannot reproduce this error in v1.3.7 nor in v1.3.7.1 ...

4 Sep 2007, 3:54 PM
#9
busymum avatar

busymum

New Zenner

Join Date:
Sep 2007
Posts:
96
Plugin Contributions:
0

Re: Price per word

Many thanks. It would be great to sort this problem out as this is a major feature on her shop. I can't figure out why it's charging for 4 words when I only input 3. Very strange. Thank you.

4 Sep 2007, 3:59 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Price per word

I'd say switch to Classic to test if this is a template issue but you are not using the templates and overrides system ...

NOTE: next upgrade all of your customizations and changes will be wiped out ... :eek:

4 Sep 2007, 4:03 PM
#11
busymum avatar

busymum

New Zenner

Join Date:
Sep 2007
Posts:
96
Plugin Contributions:
0

Re: Price per word

I've done too much work on the shop to wipe out all the design work and customisation of the shop. Too bad! Is there a way to make the actual text under the input box '1 free word' invisible? That would solve the problem.

5 Sep 2007, 8:46 AM
#12
busymum avatar

busymum

New Zenner

Join Date:
Sep 2007
Posts:
96
Plugin Contributions:
0

Re: Price per word

I have looked in attributes.php and found this code:

// calculate word charges
$tmp_word_cnt =0;
$tmp_word_cnt_string = $_SESSION['cart']->contents[$_GET['products_id']]['attributes_values'][$products_options_names->fields['products_options_id']];
$tmp_word_cnt = zen_get_word_count($tmp_word_cnt_string, $products_options->fields['attributes_price_words_free']);
$tmp_word_price = zen_get_word_count_price($tmp_word_cnt_string, $products_options->fields['attributes_price_words_free'], $products_options->fields['attributes_price_words']);

                  if ($products_options->fields['attributes_price_words'] != 0) {
                    $tmp_html .= TEXT_PER_WORD . $currencies->display_price($products_options->fields['attributes_price_words'], zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ($products_options->fields['attributes_price_words_free'] !=0 ? TEXT_WORDS_FREE . $products_options->fields['attributes_price_words_free'] : '');
                  }
                  if ($tmp_word_cnt != 0 and $tmp_word_price != 0) {
                    $tmp_word_price = $currencies->display_price($tmp_word_price, zen_get_tax_rate($product_info->fields['products_tax_class_id']));
                    $tmp_html = $tmp_html . '<br />' . TEXT_CHARGES_WORD . ' ' . $tmp_word_cnt . ' = ' . $tmp_word_price;
                  }

Do you think there is something in there that is making the calculation wrong? It is calculation one more word than is actually input into the text box.

5 Sep 2007, 8:53 AM
#13
busymum avatar

busymum

New Zenner

Join Date:
Sep 2007
Posts:
96
Plugin Contributions:
0

Re: Price per word

Never mind, I figured it out! I was putting (+0.07) after the text box which automatically adds 7p before you input any words. I've take that out now and it calculates it perfectly.