close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

few random questions

Thread began 2/12/2013 6:24 am by Christopher West | Last modified 2/13/2013 1:23 pm by Jason Byrnes | 444 views | 4 replies |

Christopher WestCommunity Expert

few random questions

Hi. Im just tidying my website. so just a few questions of the top of my head I need help with.

1. im using FLOAT to store numbers (percentages and pricing for my ecommerce site). on the product pages if I have a price of £1.80 stored in the database when displaying it shows as £1.8 so how can I change the code to display that ending zero:
<?php echo WA_eCart_DisplayMoney($DinkyCart, $DinkyCart->DisplayInfo("TotalPrice")); ?>

the same goes for percentages, in order to get the percentages calculation to work I have to store the percentage value as 0.10 but in the admin page it shows as 0.1% is there a quick way to shows this as just 10% (even though its required to be stored in the database as 0.10)?

2. On my checkout page I have a select box for shipping delivery types (standard, recorded, special delivery). The shipping system works fine, but I dont want to display a partcular delivery type in the select box (standard) If there a way of not displaying this option in the select box? its of course still required in the calculations and needs to be stored in the the database the same was as the other delivery types...i just dont want the customer to select it.

3. If I have some content stored in the database (for example lets say 2000 characters) but I only want to display the first 100 characters...how would I go about this?

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

1) Use the number format function to force the trailing 0 to display:
function.number-format.php

to show a decimal as a percentage, multiply it by 100, then concatenate the percentage sign:

php:
<?php echo((0.10*100)."%"); ?>



2) I dont fully understand the question you are asking. If you don't show the standard delivery option in the select list, it wont be able to be used as an option for shipping.

3) use the substr() function:
function.substr.php

Sign in to reply to this post

DarylBeta Tester

3) Try watching this video

Sign in to reply to this post

Christopher WestCommunity Expert

Originally Said By: designerwest
  2. On my checkout page I have a select box for shipping delivery types (standard, recorded, special delivery). The shipping system works fine, but I dont want to display a partcular delivery type in the select box (standard) If there a way of not displaying this option in the select box? its of course still required in the calculations and needs to be stored in the the database the same was as the other delivery types...i just dont want the customer to select it.  



Jason I totally explained myself wrong. The idea that I want to accomplish is having Standard, Recorded and Special Delivery all stored in the database, These are used for UK shipping rates based on weight also International is based on Standard shipping/weight. So for UK customers they can chose recorded or special delivery (standard delivery will ONLY be used for small items like gift vouchers or the cheapest items). Everything works in terms of the correct delivery price being calculated depending on country and weight...but it looks a bit messy if in the select box "standard delivery" is showing as an option when it wont apply to items thats shouldnt be send using that delivery method.

on a side note, I just realised the customer wont know they delivery charge until the checkout page posts to paypal. is there a way of displaying the delivery cost based on country and weight on the same page of the select boxes that the customer needs to select for shipping to be calculated?

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

both of these would require hand coding to accomplish.

you would need to code an if statement around the standard delivery option so it only displays if it needs to.

same for showing the shipping price, you would need to code the look up form to perform the look without posting to paypal, then have a final checkout button that sends the order to paypal.

we can help you implement these options in a premiere support appointment.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...