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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Coupons/Discounts in PowerStore

Thread began 12/21/2009 2:25 pm by terry164844 | Last modified 1/22/2010 2:13 pm by Jason Byrnes | 2140 views | 11 replies |

terry164844

Coupons/Discounts in PowerStore

I want to deploy a simple coupon system in Powerstore. Is it as simple as following the pdf on this from ecart?

I wanted to make sure there wasn't anything unique about PS I needed to consider before I did this.

Terry

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, you just need to follow the eCart Coupon tutorial.

Sign in to reply to this post

AcquireCom

Connecting PowerStore to rewards card database

We are trying to find a way to link our retail store rewards card to PowerStore. During checkout we would like people to add their rewards card number and have that number be sent to a database where our customers can get credit for their online purchases. Can you please provide a recipe that will allow us to preform this task?

Sign in to reply to this post

Jason ByrnesWebAssist

add a text field to the checkout form on the checkout page:
<input name="rewardsCard" type="text" id="rewardsCard" value="" />

On the confirm page, add a hidden form element of the same name to capture the value posted from the checkout page:
<input name="rewardsCard" type="hidden" id="rewardsCard" value="<?php echo((isset($_POST["rewardsCard"]))?$_POST["rewardsCard"]:"") ?>" />


In your database, edit the order table, create a new column to capture the reward number entered.

On the confirm page, edit the eCart Store Order Summary server behavior. Bind the new rewards Card database column to the rewardsCard form element.

Sign in to reply to this post

terry164844

Jason,

I accomplished the coupon code functionality. Very simple.

Question.

How can I list on the cart.php page the exact PromoCode the customer is getting? Which I guess needs to cascade through to the final checkout-confirm and also the email confirmation page.

For example:

Discount: -$10.30
SessionVariable: (Rule #1) -$5.30
SessionVariable: (Rule #2) -$5.00

I'm using two rules based on the Session Variable.
Rule #1 - Promotional Discount - 25% off
Rule #2 - Free Shipping - Flat Rate Discount

Everything works great. I just need to display (broken down) what discounts the customer is getting.

Terry

Sign in to reply to this post

Jason ByrnesWebAssist

When you create a cart display, On the Third page of the display wizard, you can select how to display discount, shipping and tax charges, select Individually for the discounts to show an itemized list of the discounts.

Sign in to reply to this post

terry164844

The cart display is from Powerstore. Does that matter?

And does that cascade through from cart to email confirmation?

Cart ->Confirm ->Email

Also, is there any other code that gets generated other than this:

/code start

<?php
if (!$WA_Store_Cart->Rules_EOF("Discounts")) {
while (!$WA_Store_Cart->Rules_EOF("Discounts")) {
if ($WA_Store_Cart->RuleLooperValue("Discounts") > 0) {
?>
<tr>
<td class="eC_IndividualLabel"><?php echo $WA_Store_Cart->RuleLooperName("Discounts"); ?></td>
<td class="eC_IndividualCharge">-<?php echo WA_eCart_DisplayMoney($WA_Store_Cart, $WA_Store_Cart->RuleLooperValue("Discounts")); ?></td>
</tr>
<?php
}
$WA_Store_Cart->Rules_MoveNext("Discounts");
}
$WA_Store_Cart->Rules_MoveFirst("Discounts");
}
?>

/code end


Terry

Sign in to reply to this post

Jason ByrnesWebAssist

no the change needs to be made in the email and in thwe cart, anywhere the cart is displayed.


that is the code that is added for looping through the discount rules, you can manually add that to the existing cart display code rather recreating it.

Sign in to reply to this post

terry164844

Thanks Jason,

This worked perfectly. I will copy the code to the confirmation page and email. Works great on the checkout.

EASY way to implement coupons.

Thanks again,

Terry

Sign in to reply to this post

Jason ByrnesWebAssist

Excellent, glad to hear it is working.

Sign in to reply to this post
loading

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