close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

General disposition about the coupon system

Thread began 1/16/2011 4:22 am by kim420431 | Last modified 7/20/2014 3:07 pm by kim420431 | 2931 views | 13 replies

Jason ByrnesWebAssist

Yes, you are correct, the coupon system of power store was created with discounts in mind.


It is not really intended as a means for tracking purposes. a much better tool for tracking is to use Google analytics. This allows you to track incoming links to the store to determine where they are coming from.

We appreciate your feed back and will consider adding more tracking features in a future release.

If there are other features you would like to see considered, please post them to the wishlist forum.



As for the coupon name showing in the order receipt page, that is not something that the power store files do out of the box. you would need to edit the code to achieve this.

to show the coupon code for the order you will need to edit the orders_detail.php, the admin/orders_detail.php

on the orders_detail.php page:
change the recordset code:

php:
$query_WADAorders = sprintf("SELECT * FROM ps4_orders LEFT OUTER JOIN ps4_users ON OrderUserID = UserID WHERE OrderID = %s AND UserID = %s", GetSQLValueString($ParamOrderID_WADAorders, "int"),GetSQLValueString($ParamUserID_WADAorders, "int"));


to:

php:
$query_WADAorders = sprintf("SELECT * FROM ps4_orders LEFT OUTER JOIN ps4_users ON OrderUserID = UserID INNER JOIN ps4_coupons ON ps4_orders.OrderCoupon = ps4_coupons.CouponID WHERE OrderID = %s AND UserID = %s", GetSQLValueString($ParamOrderID_WADAorders, "int"),GetSQLValueString($ParamUserID_WADAorders, "int"));



you can then add the display of the coupon code under the section that shows ho much you saved.


edit the following code:

php:
<tr>
<td class="label">You Saved:</td>
<td>-$<?php echo number_format($totalDiscount2); ?></td>
</tr>



to:

php:
<tr>
<td class="label">You Saved:</td>
<td>-$<?php echo number_format($totalDiscount2); ?></td>
</tr>
<tr>
<td class="label">coupon code:</td>
<td><?php echo $row_WADAorders['CouponCode']; ?></td>
</tr>





you will need to make similar changes on the admin/orders_detail.php. change the recordset code:


to:

php:
$query_WADAorders = sprintf("SELECT * FROM ps4_orders LEFT OUTER JOIN ps4_users ON OrderUserID = UserID INNER JOIN ps4_coupons ON ps4_orders.OrderCoupon = ps4_coupons.CouponID WHERE OrderID = %s OR ( -1= %s AND OrderID= %s)", GetSQLValueString($ParamOrderID_WADAorders, "int"),GetSQLValueString($ParamOrderID2_WADAorders, "int"),GetSQLValueString($ParamSessionOrderID_WADAorders, "int"));





then add the code to display the coupon code under the discount.

change:

php:
<p>
                <label class="readonly-bottom">Discount:</label>
                                <span class="discount errorText">-$<?php echo(number_format($totalDiscount,2)); ?></span>
              </p>



to:

php:
<p>
                <label class="readonly-bottom">Discount:</label>
                                <span class="discount errorText">-$<?php echo(number_format($totalDiscount,2)); ?></span>
              </p>
                <p>
                <label class="readonly-bottom">coupon code::</label>
                                <span class="discount errorText"><?php echo $row_WADAorders['CouponCode']; ?></span>
               </p>





to show the coupon code in the recipt email, you could edit the line of code that shows the discount:

php:
<tr>
          <td style="text-align:left; font-weight:bold; color:#2D2B2E; /* Text_Dark */ padding: 10px 5px 10px 7px; border-top:solid 1px #FFFFFF; /* Global_White */">Discounts</td>
          <td style="text-align:right; padding: 10px 14px 10px 5px; border-top:solid 1px #FFFFFF; /* Global_White */     color: #666666; /* Global_Gray */">-<?php echo WA_eCart_DisplayMoney($WA_Store_Cart$WA_Store_Cart->GetDiscounts()); ?></td>
        </tr>




to also show the code used:

php:
<tr>
          <td style="text-align:left; font-weight:bold; color:#2D2B2E; /* Text_Dark */ padding: 10px 5px 10px 7px; border-top:solid 1px #FFFFFF; /* Global_White */">Discounts <?php echo(isset($_SESSION['WA_ECart_Coupons'])?"Code Used: ".$_SESSION['WA_ECart_Coupons']."":""); ?></td>
          <td style="text-align:right; padding: 10px 14px 10px 5px; border-top:solid 1px #FFFFFF; /* Global_White */     color: #666666; /* Global_Gray */">-<?php echo WA_eCart_DisplayMoney($WA_Store_Cart$WA_Store_Cart->GetDiscounts()); ?></td>
        </tr>



you would need to make this change in the WA_UniversalEmail/Email_Tempaltes/recipt.php, pp_recipt.php and admin_recipt.php files.

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