Jump to content

Adding JavaScript to a CMS Page


iServe USA

Recommended Posts

Hi all,

 

I'm interested in creating a new CMS page and add some JavaScript in it in order to have a t-shirt store integration within it. I'll be selling other products later, but I really want to have this function implemented in my site as well.

 

I noticed this website https://mypresta.eu/en/art/developer/prestashop-product-page-full-rich-editor.html but it is for an older version of prestashop and I had a hard time finding the files mentioned there.

 

 

My t-shirt store is shop.spreadshirt.com/iServeUSA
The provided me with the following code I want to add to my CMS page. Any other easy solution is also appreciated. Please explain BARNEY STYLE. Or "For Dummies" Style

 

 

<div id="myShop"><a href="//shop.spreadshirt.com/iServeUSA">iServeUSA</a></div>

<script>
var spread_shop_config = {
shopName: 'iServeUSA',
locale: 'us_US',
prefix: '//shop.spreadshirt.com',
baseId: 'myShop'
};
</script>

<script type="text/javascript" src="//shop.spreadshirt.com/shopfiles/shopclient/shopclient.nocache.js"></script>The products in this online store are printed with the help of <a href="https://www.spreadshirt.com/custom-umbrellas-C3737">Spreadshirt Inc.</a>. Custom umbrellas, hoodies, and more.



Thanks in advance!

Link to comment
Share on other sites

  • 4 weeks later...

Adding javascript is certainly possible and I'm probably not the best person to help here but since no one else has I will try.

 

First, I don't know if script works. I'm pretty sure you need to make some edits to core files to get past the parser.

 

My solution isn't the best option either but what I have been doing when I need a robust CMS page is just create it like a normal HTML page and then just iframe it into the CMS page -- make sure you redirect the html page to the cms page to prevent people from accessing the HTML page outside of your store.

 

Now that said I don't understand what you are going here. It seems like you want to connect to some other site for a custom product and they offer the ability to customize etc... Not sure how that ever relates to PrestaShop as I don't think you can pass those products to the PrestaShop cart. so what you'll end up with a store within a store which is strange. Customers are going to expect one checkout process not two 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...