Jump to content

Dropdown Menu In Step 4


Guest comptime

Recommended Posts

Guest comptime

I'm looking for a way to get rid of the dropdown menu for shipping in step 4. This menu here is very annoying due to the fact that I only have one choice for shipping, where as many people think I have more than one. Please let me know what I can do to get rid of it. Thanks

Link to comment
Share on other sites

I think the reason is because the answer isn't straight forward.

/includes/content/cart.inc.php handles the shipping logic.

Inside step 4, the code creates a HTML <select> command (line 560), and then iterates through each enabled shipping module. (line 579 on CC3.0.17)

Each shipping module is called in-turn.

The shipping modules builds the <option> part of the drop-down code.

This is output to {VAL_SHIPPING} in the cart.tpl file on the skin.

So.. back to your question..

Clone your only shipping option (calling it something else you'll need to do this for the /admin/modules/shipping and the /modules/shipping files).

Get it to create a <hidden> form item, and also the readable text (so people know how much they're paying).

Tweak cart.inc.php, so it doesn't create any <select> tags.

I suppose the other way, would be to regex the $shippingPrice variable in cart.inc.php. ie remove the <select> and <option> tags, and rebuild it using hidden tags.

Not too much work, but probably too much to be discussed here - if you ask in www.cubecartforums.org you may find someone able to code it for you.

Regards,

Jason

Link to comment
Share on other sites

Can you give me an example of what that line of code should look like

Please see the free mod. I didn't use regex in the end, today has been far too hectic for that :-)

However, it strips out the <select> and <option> tags and rebuilds a hidden form item and does what you need.

Jason

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...