Author Topic: Options - sale  (Read 3734 times)

Offline Reggy

  • Newbie
  • *
  • Posts: 12
  • Karma: +1/-0
    • View Profile
Options - sale
« on: September 01, 2018, 01:27:09 PM »
Hi,

I know i can't make sale for some product option, only for product, so when I sale from e.g. -200 (1 349 to 1 149) when i pick cheapest option (1 149) old and new price is correct, but when I pick more expensive option (+150) it is show new price correct, but old price is not changing.

I know the code with new price in product/product.tpl is:
Quote
<span class="total-price"></span>

and javascript fot that is

Quote
function display_total_price() {

      $.ajax({
         type: 'POST',
         url: '<?php echo $calc_total_url;?>',
         dataType: 'json',
         data: $("#product").serialize(),

         success: function (data) {
            if (data.total) {
               $('.total-price-holder').show();
               $('.total-price-holder').css('visibility', 'visible');
               $('.total-price').html(data.total);
            }
         }
      });

   }

But I am amateur and javascript is not my friend, does somebody know hot to edit to changing old price of product option also?

Or is it some extension where I can edit sale of product option with % or something like that?

I am still learning and testing. - AbanteCart Version 1.2.13

Sorry for bad english :( here is example screen:
Thank you for answer


Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile
Re: Options - sale
« Reply #1 on: September 03, 2018, 12:50:26 AM »
Hello.
What is "old" price? On the product page with options we have a "base price" - price entered in product and "total price" - calculated price with selected options and quantity.
When you select another option changed only "total price".

Offline Reggy

  • Newbie
  • *
  • Posts: 12
  • Karma: +1/-0
    • View Profile
Re: Options - sale
« Reply #2 on: September 12, 2018, 09:41:41 AM »
Thank you for answer i need something like total Price + sale price, but it Is in JS. And the solution can be total price + sale price. It must be easy for somebody who understand of this code. Or $calc_total_url + 200 can some work?

 

Powered by SMFPacks Social Login Mod