close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

RuleLooperName("Shipping") not saving to eCart Store Summary in Database properly?

Thread began 1/29/2015 1:00 pm by Nathon Jones Web Design | Last modified 2/11/2015 11:16 am by Jason Byrnes | 1817 views | 6 replies |

Nathon Jones Web Design

RuleLooperName("Shipping") not saving to eCart Store Summary in Database properly?

On confirm.php we are saving the name of the shipping rule to one of the fields (LEDOrderShippingType) in our Order table via the eCart Store Summary in Database behaviour.

We have noticed that what it actually does is store the same thing every time, no matter what shipping rule is used. It is always:
Standard Delivery (Under £60.00/Under 1kg)

Thankfully the shipping cost is correct however customers have started to query this and, inspecting the code, I can't work out what it's not updating correctly. I attach confirm.php and provide FTP details privately below.

Thank you.
NJ

Sign in to reply to this post

Nathon Jones Web Design

FTP...

Sign in to reply to this post

Jason ByrnesWebAssist

I think you'll need to code a loop through the shipping rules to see which ones aren't 0, then create a session wit the rule names.

for example on a cart named eCart1:
<?php
$_SESSION['shipName'] = "";
if (!$eCart1->Rules_EOF("Shipping")) {
while (!$eCart1->Rules_EOF("Shipping")) {
if ($eCart1->RuleLooperValue("Shipping") > 0) {
$_SESSION['shipName'] .= "".$eCart1->RuleLooperName("Shipping")." ";
}
$eCart1->Rules_MoveNext("Shipping");
}
$eCart1->Rules_MoveFirst("Shipping");
}
?>

then on the bindings panel, clic the plus button, and select Session, name the new binding shipName and use that binding in the store order summary

Sign in to reply to this post

Nathon Jones Web Design

Have implemented that and now nothing is being saved to eCart Store Summary In Database. Page attached. Hope you can help. Thank you.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

Nathon Jones Web Design

The site is www.ledwarehouseuk.com and the FTP details are provided above.
Thank you.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

i thank the pound symbol in the rule name was causing the problem.

I changed:
$_SESSION['shipName'] .= "".$LEDCart->RuleLooperName("Shipping")." ";

to:
$_SESSION['shipName'] .= "".htmlentities($LEDCart->RuleLooperName("Shipping"))." ";


I think that should fix it.

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...