Archives

All posts by Ben

How to include videos in eBay listings 2017

Ebay is blocking active content in listings starting in June 2017. Still, with just weeks to go, their instructions for including videos in your eBay descriptions tell you to use flash.  After speaking with customer support, I was directed to this web page: http://pages.ebay.com/sell/itemdescription/bestpractices.html
There, in the “Including a Product Video” section the following instructions can be found:

 <video width="320" height="240">
 <source src="movie.mp4" type="video/mp4">
 <p>Here is a video of the product</p>
 </video>

This is unacceptable

1) It’s ridiculously small 320 x 240

2) In Chrome at least, all it does it place a black rectangle on the screen and you have to right click to turn on controls before you can press play.  Regular eBay users would NEVER figure that out.

3) “Here is a video of the product” will only display if the browser cannot show the video…???

You can tell eBay is really interested in helping people display video in their descriptions…..

Below is the improved code I eventually settled on

Of course you can adjust to any size you like.

<video width="640" height="480" controls="true" poster="http://YOUR-URL.com/poster.jpg">
 <source src="http://YOUR-URL.com/YOUR-VIDEO.mp4" type="video/mp4">
 Your browser does not support embedded video
</video>

In the VIDEO tag, controls=”true” is added to turn on the play, pause, volume, etc… (kind of important)!! And the poster tag links to a photo that you want to show in place of the black rectangle. I recommend making your own images the same size as the video and including text of some kind telling people to press play. Since the play button look and location can change depending on code and browser make sure you photo does not point to specific places for the controls.

Unfortunately I did not find any way to display YOUTUBE videos with this method. You need to upload the video files to your own server or find a video hosting site that allows you to link directly to the video file (mp4)

It took me some time to find out why SSL was not working. I had an installed security certificate but I was not getting the little green security lock icon and my checkout pages were not using HTTPS:// locations.

I edited config.php and admin/config.php
In both you just need to change the http://YOUR-URL to https://

// HTTPS
define('HTTPS_SERVER', 'https://YOUR-URL/admin/');
define('HTTPS_CATALOG', 'https://YOUR-URL/');

Then in settings you need to enable SSL

SSL_Settings OpenCart

STILL…. SSL was not working. After some digging I found there are 2 more files that need editing

system/config/catalog.php
system/config/admin.php

In both you need to change the following:

$_['site_ssl'] = false;

To:

$_['site_ssl'] = true;

That’s it!

I needed to add the Order ID for guest checkout in the success page for my OpenCart installation v2.2.0.0

I did not find an extension to do this and the first set of instructions I found did not work. Eventually I got it working using a combination of solutions.

First, you need to edit the success.php file in  catalog\controller\checkout\

Change this:

if (isset($this->session->data['order_id'])) {
 $this->cart->clear();

Into this:

if (isset($this->session->data['order_id'])) {
 $this->load->model('checkout/order');
 $data['orderDetails'] = $this->model_checkout_order->getOrder($this->session->data['order_id']);
 $this->cart->clear();

Next, you need to edit success.tpl in catalog\view\theme\YOUR-THEME\template\common\

Under the line <h1><?php echo $heading_title; ?></h1>  I added the following:

 <?php if(!empty($orderDetails['order_id'])): ?>
 <h2>OrderID=<?php echo $orderDetails['order_id']; ?></h2>
 <?php endif; ?>

That’s it! When a new order is placed the success page will display the Order ID under Your order has been placed! If the page is refreshed the information goes away because the variable no longer has any value and would generate an error.