Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Removing "+" from Drop-down Menu

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Removing "+" from Drop-down Menu

Tagged: aesthetics, customize, modifying, shopping, variation control, variation control customization

  • This topic has 6 replies, 2 voices, and was last updated 15 years, 4 months ago by bhadaway.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • December 17, 2009 at 5:25 am #572
    bhadaway
    Member

    I want to change just one line of code without breaking the store;

    $tmp_txt = $pieces2[0].’ +’.$curr_sign.$pieces2[1];

    This is in the eStore_button_display_helper.php file. By simply removing the “+” removes it from the drop-down, but breaks the store; prices aren’t tallied up and checkout no longer works.

    So the question is how to make it so that “+” is NOT visible without breaking the store?

    Thanks

    December 17, 2009 at 8:10 am #16777
    amin007
    Participant

    You will have to modify the corresponding javascript that reads the “+” and tallies up the total.

    My question is if you want the price to tally up then wouldn’t it make more sense to have the “+” there so your customers can easily understand that choosing that option is not free.

    Note that it won’t put the “+” if an increment value is not specified for a variation.

    December 17, 2009 at 10:37 pm #16778
    bhadaway
    Member

    Normally I would agree, but I’m not using it like that. There is no base price with additional options type scenario. It’s just different options with their corresponding prices period. I just have the base price set to 0.00 and then the different options.

    It’s already working perfectly how I’d like it to, just visually I don’t want a + sign showing as this could confuse customers; “Plus what? Wait, how much does this really cost? Did I miss something?”

    I’m a CSS/XHTML guy, so could you please guide me with this:

    “You will have to modify the corresponding javascript that reads the “+” and tallies up the total.”

    I don’t imagine this could be too difficult of a modification?

    Thanks

    December 18, 2009 at 7:07 am #16779
    amin007
    Participant

    I completely understand… you will need to modify the javascript file called “eStore_read_form.js” which is located in the “lib” directory of the this plugin.

    Find the following function the file:

    function CheckTok (object1)

    you will need to change the logic here to take out the addition if there is a “+” token. I have it like that so later I can introduce the “-” token that allows you to subtract values for a selected variation.

    Once done you will need to minify this JavaScript file and give it the following name:

    eStore_read_form.min.1.js

    The plugin uses the minified version of the JavaScript files for performance reasons.

    after the JavaScript file is updated you can take out the “+” from the PHP file.

    just a warning though… when I release a new version and give you the update you will have to apply these changes manually on your installation again.

    December 18, 2009 at 4:40 pm #16780
    bhadaway
    Member

    Again, not a JavaScript guy and there are too many variables running through my head right now to take a risk assuming what I should do, so if you could please refer to the exact code I have here:

    function CheckTok (object1)

    {

    var j,tok,ary=new Array (); // where we parse

    ary = val.split (” “); // break apart

    val_1st_half = ary[0];

    for (j=0; j<ary.length; j++)

    {

    // look at all items

    // first we do single character tokens…

    if (ary[j].length < 2) continue;

    tok = ary[j].substring (0,1); // first character

    val = ary[j].substring (2); // get data

    if (tok == “+”)

    {

    //alert(val);

    amt = amt + val*1.0;

    }

    if (tok == “-“)

    {

    amt = amt – val*1.0;

    }

    }

    }

    And please provide the new code to replace this for my solution…

    December 19, 2009 at 2:59 am #16781
    amin007
    Participant

    Now that you are changing how the data is parsed you will have to rewrite the javascript logic a little bit. This is not just a matter of removing a character from some code. with that said, I think the following code should do it:

    function CheckTok (object1)

    {

    var j,tok,ary=new Array ();

    ary = val.split (” “);

    val_1st_half = ary[0];

    val = ary[1]; // get data

    amt = amt + val*1.0;

    }

    Please note that I haven’t tested this so there is no guarantee that this will work. It’s impossible for me to provide custom solutions to all of my customers. Also, don’t forget to take out the “+” character from the PHP file so it doesn’t add it there.

    December 22, 2009 at 10:43 pm #16782
    bhadaway
    Member

    Didn’t work, thanks for trying. I know this is above and beyond what should be expected from you from buying your plugin and I appreciate it.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ