Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi stevenatsalt can you explain what you mean by changing the brackets into <div>’s?

    Thread Starter stevenatsalt

    (@stevenatsalt)

    Yes! Sorry, I probably should have explained that better.

    When the product is added to the shopping cart, the output puts it as:-

    ITEM (option1) (option2) (option3)

    I want to wrap these options in separate divs so I can style them.

    I want to have it really so I can have the output closer to:-

    ITEM
    option1, option2, option3

    Hope that makes sense.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Have you tried to view the shopping cart source code i.e. inspect elements through the browser and see if you can change some styles through css?

    The other option is probably the Pro version which has tons of options.

    Regards

    Thread Starter stevenatsalt

    (@stevenatsalt)

    I have, but unfortunately the output is all in one span, which means I can’t target the bracketed options separately. The brackets are added via Javascript and I tried changing it to divs, but they were removed on output which was odd.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Can you share your URL.

    Thank you

    Thread Starter stevenatsalt

    (@stevenatsalt)

    Yeah course. This is a testing site.

    https://readysalteddev.co.uk/deli/?page_id=454

    The shop page.

    and

    https://readysalteddev.co.uk/deli/?page_id=473

    The shopping cart page.

    I want to change the output of a sandwich, an example being

    Kamikaze Chicken (mini stotties wholemeal) (yes) (Collection)

    to

    Kamikaze Chicken
    mini stotties wholemeal, yes, Collection

    Different colour title to description and such.

    Also worth noting each sandwich has different length titles.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    I see what you mean, I am afraid that at the moment it is not possible to achieve what you require.

    One of the plugin developers might reply with a better solution if there is one.

    Regards

    Thread Starter stevenatsalt

    (@stevenatsalt)

    Not even by changing the source code?

    I see here:

    <script type=”text/javascript”>
    <!–
    //
    function ReadForm (obj1, tst)
    {
    // Read the user form
    var i,j,pos;
    val_total=””;val_combo=””;

    for (i=0; i<obj1.length; i++)
    {
    // run entire form
    obj = obj1.elements[i]; // a form element

    if (obj.type == “select-one”)
    { // just selects
    if (obj.name == “quantity” ||
    obj.name == “amount”) continue;
    pos = obj.selectedIndex; // which option selected
    val = obj.options[pos].value; // selected value
    val_combo = val_combo + ” (” + val + “)”;
    }
    }
    // Now summarize everything we have processed above
    val_total = obj1.product_tmp.value + val_combo;
    obj1.product.value = val_total;
    }
    //–>
    </script>’;

    That’s where the brackets are added, but when I try to change the line
    val_combo = val_combo + ” (” + val + “)”;
    to
    val_combo = val_combo + ” <div>” + val + “</div>”;
    They are taken out, and I can’t figure out why.

    No chance on any knowledge there?

    Plugin Author mra13

    (@mra13)

    I am not really sure how to do that.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Change brackets’ is closed to new replies.