Jump to content

Gift Certificate


mangcreative

Recommended Posts

CubeCart Version 5

 

We have setup the ability to sell gift vouchers but there doesn't appear to be a product listed on the front end.  We have search for the "Product Code", as defined in the setup, but not found.

 

So the question is .... is there a defaulty URL of the product ? For example l know in version 4 it was something like http://www.DOMAIN.co.uk/index.php?_a=giftCert

Link to comment
Share on other sites

In admin, Gift Certificates, set Status to enabled.
 
Once enabled, on the storefront, "Gift Certificates" will be shown in the Navigation (Home, Categories, Gift Certificates, Sale Items).
 
The direct link to the purchase page for a GC is:

http://store.com/index.php?_a=certificates
http://store.com/gift-certificates.html

 
You can set a Product Code (more of a 1-3 word description), but CubeCart does not assign a product_id number. Thus, you won't find it in the CubeCart_inventory table. Sold GC's are in the CubeCart_coupons table. (Not having a product_id number allows CubeCart to treat this shopping basket item differently than other items -- such as not applying a coupon to a GC.)

Link to comment
Share on other sites

  • 1 month later...

Good evening Brian et al,

On the subject of Gift Certificates and SEO.

Traffic Travis shows there are issues with the gift cert. seo (and many other urls) ie there is no H1 tag, no discrete title and no discrete meta description. The description seems to be generic.

 

What solutions are there? If the only solution is a proprietary SEO package, are there any recommendation to a brand/name?

regards

Duncan

Link to comment
Share on other sites

In my opinion, this has been overlooked.

 

The database table, CubeCart_coupons, can have columns added similar to the Inventory table for SEO phrases.

 

The skin file, content.certificates.php (as well as all other content.* files - at least in the Kurouto skin) can have the <h2> tag changed to <h1> (and update the CSS for h2 to include h1).

 

The above would take a competent programmer about 20 minutes to do.

 

Then, we would just have to make sure CubeCart gets the info from the new SEO columns and shows that info in the GC page.

Link to comment
Share on other sites

Code can be added.

 

There would be three new columns in the Coupons database table (see the Inventory table for an example).

 

Then whatever code renders the GC page, a call would be made to the seo meta-tags function.

 

Finally, fields would be added to the Add/Edit Gift Cert admin screen.

Link to comment
Share on other sites

CC5.2.10 has restructured the decision tree a bit on when to send emails.

 

For a Gift Certificate:

1 The order must have entered the "Complete" status

2 The internal setting, skip_order_complete_email, must be false

3 The internal setting, email_enabled, must be true

 

Technically, a GC is a tangible item, yet not processed through the checkout system the same as a shippable item - even though you can ship a GC. In admin, you can identify how the GC is to be treated during checkout: shipped digital only, tangible only, or both. Then, the purchaser can state how the GC is to be delivered: emailed or shipped, but not both.

 

From the above, if a GC could be treated as a digital item, delivered by email, then the following applies...

 

If an order contains digital products only, then the order will go to Complete immediately, but then, in admin Store Settings, if "Force Order Completed Emails" is not enabled, then skip_order_complete_email will be set true - as there is no point to sending such an email - and the GC will not be sent.

 

CubeCart will set email_enabled to false if somehow CubeCart is trying to set the order's status to the status which it already has. (I don't know how that would happen.)

 

So, try setting "Force Order Completed Emails" to enabled.

Link to comment
Share on other sites

OK. I am a bit confused on how to setup Email templates. I used to get emails when someone placed an order on my website but no longer get any notification. Nor does it send an email to the customer. I think this is part of the reason that when folks place orders for gift certificates they don't receive them. I can see all of the default email templates but not sure they are activated or how I activate them. Thanks.

Link to comment
Share on other sites

Oh. Well. Yes.

 

"I used to get emails when someone placed an order."

 

How long ago was that?

 

All email templates are used -- there is no capability (yet) to have more than one template for any one purpose standing by with only one of the group enabled.

 

So, we need to try to discover why emails are not arriving at the destination address.

 

Please review with us the email settings in the Store Settings, Advanced tab.

Link to comment
Share on other sites

It used to do it automatically before last couple of updates. Not sure what has changed. 

 

The Email settings in Store Settings Advanced are"

 

Sending Method:    PHP mail() Function

 

Use SMPT Authentication (normally required):  No

 

Everything else is blank

 

Do I need to set this up with my store email address?

 

Thanks

Link to comment
Share on other sites

Please try adding a Sender's Name (for example, Marv's Music Ltd.), and the Sender's Email Address.

 

I am confused as to how these presumably existing settings didn't carry over from prior versions.

 

Everything with the word SMTP in it can be ignored.

Link to comment
Share on other sites

Hello,

I received the first Gift Certificate order from a UK customer on my graded 5.2.5.

 

The customer is confused as the receipt they obtain has their postal address as the BILLING and SHIPPING address.

There is no mention of the GC addressee's email, their name or message as entered on the front page of the gift certificate.

 

Is there some code I can enter to give a confirmation receipt to the customer to avoid this confusion? or has this been fixed in the latest version 5.2.10?

regards

Duncan

Link to comment
Share on other sites

The email template Cart: Order Confirmation, which is sent to the purchaser, has details about the product (the Gift Card), but not any details about the recipient of the GC to whom the purchaser wanted you to email (if that method was chosen). The Cart: Order Confirmation template will show the purchaser's address blocks no matter what the order contains.

 

It is possible to add code that will take the place of {$product.product_options} in the template to show the GC's recipient's name and the purchaser's personal message.

 

Is that what you had in mind?

Link to comment
Share on other sites

Brian, yes that is exactly what the customer requires. In this case they thought the gift certificate was going to be sent to them in the UK, not Australia.

 

the GC's recipient's name and the purchaser's personal message and the receipients email address would confirm this..

Link to comment
Share on other sites

This is easier than I thought.

 

The data is already available to the email template. We just need to use it. (This is for CC528, but should apply to CC525 through CC5210.)

 

The GC particulars are held in the product array key 'custom', is an array itself, and is serialized (makes an array into a specially formatted string of characters). We just have to unserialize it and use the array elements.

 

Bring up for editing the Cart: Order Confirmation template for the language(s) you are using. Let's look at the Plain Text tab first. This is the part, with new code added, that we are interested in:

        {foreach from=$PRODUCTS item=product}
        -----------------------------------
        {$product.name}
        {$product.product_options}{if !empty($product.product_options) && !empty($product.custom)}
        {/if}{if !empty($product.custom)}{$custom = unserialize($product.custom)}{$custom.name} <{$custom.email}>
        {$custom.message}{/if}
        
        Part Number: {$product.product_code}
        Unit Price: {$product.price}
        Qty: {$product.quantity}
        
        {/foreach}

The new code starts with testing for the presence of product options and product custom data. If both are present, print a CRLF to start printing on a new line. Then again, if we have custom data, unserialize it, and print out the recipients name, email address, and on the next line, the personal message.

 

Depending on the version of CC5, the HTML tab contents may show the contents, or may show something that looks corrupted -- especially for CC528. To edit the HTML, it would be best to switch the editor to Source mode anyway. Here is what that order details table should look like in CC528 (but it won't - and see below for earlier versions of CC5), with the new code added:

<p>
 </p>
<table border="0" cellpadding="3" cellspacing="0" width="100%">
    <tbody>
        <tr>
            <td>
                <strong>Item</strong></td>
            <td>
                <strong>Quantity</strong></td>
            <td>
                <strong>Cost</strong></td>
        </tr>
<prot>{foreach from=$PRODUCTS item=product}</prot>
        <tr>
            <td>
                {$product.name}<br />
                {$product.product_options}{if !empty($product.product_options) && !empty($product.custom)}<br />
                {/if}{if !empty($product.custom)}{$custom = unserialize($product.custom)}{$custom.name} <{$custom.email}><br />
                {$custom.message}{/if}</td>
            <td>
                {$product.quantity}</td>
            <td>
                {$product.price}</td>
        </tr>
<prot>{/foreach}</prot>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                Shipping: {if $DATA.ship_method}({$DATA.ship_method}){/if}</td>
            <td>
                {$DATA.shipping}</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                Discount:</td>
            <td>
                {$DATA.discount}</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                Subtotal:</td>
            <td>
                {$DATA.subtotal}</td>
        </tr>
<prot>{foreach from=$TAXES item=tax}</prot>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                {$tax.tax_name}: ({$tax.tax_percent}%)</td>
            <td>
                {$tax.tax_amount}</td>
        </tr>
<prot>{/foreach}</prot>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <strong>Order Total: </strong></td>
            <td>
                <strong>{$DATA.total}</strong></td>
        </tr>
    </tbody>
</table>

I don't know if the contents will stay that way, but try saving the contents while the editor is still in Source View mode.

 

CC527 and earlier uses HTML <!-- comment tags --> instead of <prot> tags to "hide" the Smarty loop statements.

Link to comment
Share on other sites

I tried adding my email as you described above but still I do not receive or send any emails as far as orders are concerned. Not sure what changed in the last couple of updates. Do I need to input info into SMPT?

Link to comment
Share on other sites

If no emails are being sent using the mail() setting, I would say that either your hosting provider isn't letting you do this, or someone in path of where these emails are traveling is dumping them because of, well, technical reasons that have nothing to do with CubeCart (we can discuss that later).

 

Let's try using the SMTP method. If you are using GMail, >this conversation is from a year ago, and CubeCart is using a newer version of PHPMailer. I think, however, the edit may still be needed.

 

If not, enter the information pertinent to your email account and see what happens.

 

You can make a quick test to see if any email is getting sent by creating a Newsletter. Use the Send Test Email to send a test newsletter to yourself.

Link to comment
Share on other sites

In some types of hosting accounts, where your MX Record points to this account, you may have some folders that act as a queue for sending, sent, and received emails for your domain.

 

I discovered a problem with a certain CubeCart user's email having sporadic delivery because some recipients' email providers did not find an SPF Record associated with that domain. The recipient's ISP was bouncing the emails back as probable spam, and the Non-Delivery Reports (NDR) were sitting in the .mail folder of the hosting account.

 

You haven't mentioned what your hosting provider has said about this. They will probably be able to help.

Link to comment
Share on other sites

  • 2 months later...

Hi Brian,

regarding #4.  Seeing as though you have provided the code to provide meta data ... see '?do=embed' frameborder='0' data-embedContent>>

 

Now, I have changed the skin file content.certificates.php (as well as all other content.* files - at least in the Kurouto skin) and have the <h2> tag changed to <h1>.

 

Now to the next part:

(and update the CSS for h2 to include h1). Where is the CSS file please?

And the database table, CubeCart_coupons, can have columns added similar to the Inventory table for SEO phrases. Where is this and how to change please?

best regards

Duncan

Link to comment
Share on other sites

Ok, have found the files:

/skins/NAME_OF_SKIN/styles/common.css

/skins/NAME_OF_SKIN/styles/SUB_STYLE/layout.css

 

and I can find h1 on line 180 of common.css

#announcement > h1 {

margin-bottom: 15px;
}
 
Do I change that to h2?
 
regarding CubeCart Gift Certs SEO phrases? All entered in #8 and #10.
Link to comment
Share on other sites

Brian, I think I have solved the issue.

The issue was: there was initially no h1 tags for the products. Then I changed all the content skin files ie content.certificates.php (as well as all other content.* files - at least in the Kurouto skin) and have the <h2> tag changed to <h1>.

However in the content.product.php file there was several h2 and h1 tags. 

Now I have changed the initial <h2>{$PRODUCT.name}</h2> from to <h1>{$PRODUCT.name}</h1> and all the other tags from h1 to h2.

Now I am happy and the SEO should be too.

No need to change css or the database tables.

Duncan

Link to comment
Share on other sites

  • 11 months later...

Hi Brian et al,

Now that we have moved on to 6.0.6 it seems the mods we made to content.product.php have been made in Foundation.

I have made a change this evening to content.category.php, changing h2 to h1. and note there is no TITLE in  content.certificate.php or the GC page.

Are there any other suggestions regarding h1 tags and SEO?

How do you insert a title into the GC page. ie <title>{$META_TITLE}</title>

Edited by harrisorganic
Link to comment
Share on other sites

If no emails are being sent using the mail() setting, I would say that either your hosting provider isn't letting you do this, or someone in path of where these emails are traveling is dumping them because of, well, technical reasons that have nothing to do with CubeCart (we can discuss that later).

Let's try using the SMTP method. If you are using GMail, >this conversation is from a year ago, and CubeCart is using a newer version of PHPMailer. I think, however, the edit may still be needed

You can make a quick test to see if any email is getting sent by creating a Newsletter. Use the Send Test Email to send a test newsletter to yourself.

SMTP should ALWAYS be used rather than phpmail(). Sending emails via phpmail can be blocked by your hosting company especially as they are not authenticated and even if they are sent the receiving email server is much more likely to reject completely or put it into spam. In my view, the phpmail() option should be removed from CubeCart

Ian

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