Page 1 of 2

Auto Update of Price when Product Options are Selected

Posted: Thu Jul 30, 2009 3:54 pm
by DaveBunny
Hi,

I'm looking for the price on product pages to change when product options are selected, currently the only way to see the grand total is to add to basket, I would like this to change automatically as soon as the product option is selected.

I did post this previously on here but this section of the forum seems to have been reset, can anyone that is also interested in this addition state their interest here.

Thanks

Dave

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Jul 30, 2009 9:24 pm
by karlpers
I think quoria was going to solve this issue, I know lots of users are interested in buyng this contribution.

Keep going!:)

Re: Auto Update of Price when Product Options are Selected

Posted: Fri Jul 31, 2009 12:16 am
by Qphoria
Ok.. I got it working mostly.. I still have to restore the currency symbol and formatting. But it works:
http://www.unbannable.com/ocstore/index ... duct_id=63

Re: Auto Update of Price when Product Options are Selected

Posted: Fri Jul 31, 2009 5:47 pm
by DaveBunny
Excellent, let me know when it's ready. Any idea on the price for this one?

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Sep 10, 2009 4:13 am
by Qphoria
This is finally available here:
http://www.unbannable.com/ocstore/modif ... ice_update
Includes demo

Re: Auto Update of Price when Product Options are Selected

Posted: Wed Sep 16, 2009 9:26 pm
by Qphoria
Moving options down for longer options topic moved to its own thread:
http://forum.opencart.com/viewtopic.php ... 14&start=0

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Dec 03, 2009 1:05 am
by onelouder
Nice feature, any future plans for adding more features? One thing i was looking for was depending on what option you choose in the first box, would change the options it gave you in the other box's below. For example if you had the first box as "Operating System" with a couple of other Operating Sytem choices, depending which one of those you choose the box's below would have different options in them.
For example "Ram, Hardrive" options would be different if you choose a different Operating System option.

Another one which is not that relevant yet would be the image changed if you selected a certian option in one of the box's

It would be cool to see that and i would be interested in purchasing it, if you ever get around to adding any of these features.

Anyways keep up the good work!

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Dec 03, 2009 1:19 am
by Qphoria
This script was designed as a frontend side manipulator. Thats all.

For what you are looking would actually be something that the server side code would need to support and then dhtml could be used to switch based on different inputs. But the option system is really difficult to modify the way it is built into the core, so that would be a huge job and would break with each new version.

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Jan 07, 2010 12:19 am
by lowlands
Hi,

I have bought the Auto Update Price mod but now the prices in my store are showing English Pounds in stead of Euro's.

Any suggestions?

Theo

Update: Now I am not quite sure. I replaced the product.tpl with the original file and I still get pounds.

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Jan 07, 2010 12:26 am
by Qphoria
Change currency selector to euro. It uses whatever currency is set on the catalog side

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Jan 07, 2010 1:21 am
by lowlands
Hi Q,

(See update of previous post)

That would be in Admin>>Configuration>>Settings>>Local?

Because that already says Euro.

I did delete English under Admin>>Configuration>>International>>Languages. I now only have Dutch standard. Could that have anything to do with this?

Theo

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Jan 07, 2010 2:58 am
by Qphoria
do you have a currency selector on the catalog side? Clear all cookies and refresh.

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Jan 07, 2010 3:38 am
by lowlands
Do you mean Catalogue>>Somewhere?? Because I can't find a currency selector there ???

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Jan 07, 2010 3:55 am
by Qphoria
on the home page, there is a currency changer module. Is that set to pound?

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Jan 07, 2010 7:36 am
by lowlands
Hi Q,

I had uninstalled that module because I only accept euro. But I reinstalled it and it only shows Euro. I did clear cookies and refresh but still the product (I only have one sofar) is priced in pounds.

However ... that is in FF. In IE I get Euro's ???

Now how is that?

UPDATE: Did some more fiddling and now I have Euro's all around. Thanks Q.

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Jan 14, 2010 4:31 pm
by lowlands
After this currency issue was fixed I reinstalled the contri again but:

- I can't get it to work, neither in FF nor in IE
- It plays tricks with the template in IE

http://www.bootbouwshop.nl/houten%20roeiriem

Here is the product.tpl code

Code: Select all

<?php include('catalog/view/javascript/updatepx/updatepx.inc.php'); ?>
<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content">
  <div class="top">
    <h1><?php echo $heading_title; ?></h1>
  </div>
  <div class="middle">
    <div style="width: 100%; margin-bottom: 30px;">
      <table style="width: 100%; border-collapse: collapse;">
        <tr>
          <td style="text-align: center; width: 250px; vertical-align: top;"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="thickbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" style="margin-bottom: 3px;" /></a><br />
            <span style="font-size: 11px;"><?php echo $text_enlarge; ?></span></td>
          <td style="padding-left: 15px; width: 296px; vertical-align: top;"><table width="100%">
              <?php if ($display_price) { ?>
              <tr>
                <td><b><?php echo $text_price; ?></b></td>
                <td><?php if (!$special) { ?>
                  <span id="price"><?php echo $price; ?></span>
                  <?php } else { ?>
                  <span style="text-decoration: line-through;"><?php echo $price; ?></span> <span style="color: #F00;"><span id="price"><?php echo $special; ?></span></span>
                  <?php } ?></td>
              </tr>
              <?php } ?>
etc.
Any suggestions?

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Jan 14, 2010 8:38 pm
by Qphoria
You will have to use the delimiter method when using so many numbers as the option name. There isn't enough info to trigger a proper breakpoint without using a customer delimiter. There should be info in the readme about it.

Basically I have the same problem on my site for the upgrades product. I had to add a # character to uniquely tell the code where the price begins. When there is text only like: Harddrive +$5.00 I can regex all the numbers and decimals leaving me 5.00
but when there are numbers like T1000 +$5.00. I try to split based on "+$" but since not all currencies have a left-side symbol, and + could also be part of a name.. its actually a very complex code I have in there attempting to handle all possibilities. But when the code can't figure it out, it has a backup system using the delimiter option.

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Jan 14, 2010 9:02 pm
by lowlands
Most of the numbers will be gone once I can start using your script for the SKU per option. Because this is how I have solved the SKU per option problem I have by including the SKU in the option description :)

But I will look into the delimiter solution anyway.

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Jan 14, 2010 10:54 pm
by lowlands
I tried the delimiter trick but it still doesn't work. What I saw on your site though is that there is a space between the $ character and the numbers. On my site there seems to be no space between € and numbers.

In IE the template still breaks after the edited product.tpl is uploaded. With the original product.tpl it is fine. How do I fix that?

Re: Auto Update of Price when Product Options are Selected

Posted: Thu Jan 14, 2010 11:29 pm
by Qphoria
You actually have a jquery error on something that is preventing it from working. Any chance you can setup a temp FTP account so I can take a look