Change brackets
-
Hi,
Is it possible to change the brackets into <div>’s ? I’m happy to change the source as I will never be updating wordpress or the plugin after!
Thanks.
https://ww.wp.xz.cn/plugins/wordpress-simple-paypal-shopping-cart/
-
Hi stevenatsalt can you explain what you mean by changing the brackets into <div>’s?
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, option3Hope that makes sense.
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
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.
Can you share your URL.
Thank you
Yeah course. This is a testing site.
http://readysalteddev.co.uk/deli/?page_id=454
The shop page.
and
http://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, CollectionDifferent colour title to description and such.
Also worth noting each sandwich has different length titles.
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
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 elementif (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?
I am not really sure how to do that.
The topic ‘Change brackets’ is closed to new replies.