Post by nikogit » Sat Apr 19, 2014 3:51 pm

Hi, I have OpenCart 1.5.6
Inside the product page, a javascript count.js is attached to the text area

Code: Select all

counter = function() {
    var value = $('#bob').val();
    if (value.length == 0) {
        $('#wordCount').html(o);
        return;
    }
var wordCount = value.split(/\s+/)
                     .filter(function(v){ return v.length>2 })
                     .length;
    $('#wordCount').html(wordCount);
};
$(document).ready(function() {
    $('#count').click(counter);
    $('#bob').change(counter);
    $('#bob').keydown(counter);
    $('#bob').keypress(counter);
    $('#bob').keyup(counter);
    $('#bob').blur(counter);
    $('#bob').focus(counter);
});
I want the price to dynamically change depending on the output So for example i want the price to become for example

Code: Select all

price = price * wordcount;
So that the price changes depending on the amount of words that are entered into the textbox

Can someone please help me do that, my php knowlege is minimal, and im not sure where, in what file, can i make that happen, and how.

Thank you

Newbie

Posts

Joined
Sat Apr 19, 2014 3:48 pm
Who is online

Users browsing this forum: No registered users and 84 guests