Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 03-16-2012 20:15:06

Lin
Member
Registered: 09-26-2008
Posts: 61

locate a product / add a cart from my own pages

In my previous ccp51 version I can locate a product from ccp by building up a hard link to a product image or a text description in my own page, also can build a button to 'add a cart' from my own page directly. I tried the same way in my version 7, but it didn't work.  I have also turned on the system receiving the remote URLs and POST pages, but it still didn't work. Following some posts from this Forum, it seems I need to add some php code as follows:

<?php echo $this->link_namespace($app,'prodshow',array('ref' => 'Product Identifier')); ?>,

but I couldn't figure this out. How can I add the code , say, for a image link, in my own page please ? Can I also put a 'add to cart ' button in my own page to add a item into CCP shopping Cart please? Any helps would be highly appreciated. Thank you in advance.

Offline

 

#2 03-16-2012 23:54:35

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: locate a product / add a cart from my own pages

The ccp php code you posted will only work within a ccp generated page, you can not us it out side of ccp as the functions (of ccp) that are called to build the link will not be present and  thus will not work. Outside webpages would need a hard coded link to work

Code:

http://www.yoursite.com/index.php?app=ecom&amp;ns=prodshow&amp;ref=productid
 
or 

http://www.yoursite.com/ecom-prodshow/productid.html

ccp 6 and 7 have the remote add to cart function much the same as ccp 5.1 but you need the correct information coded into the page, this information can be found in the html coding for the remote product html page located in your public_dir/media/ecom/examples/productform.html, just view the source code in your browser.

John

Offline

 

#3 03-17-2012 06:49:01

Lin
Member
Registered: 09-26-2008
Posts: 61

Re: locate a product / add a cart from my own pages

Hi John thanks, after added the code http://www.mysite.com/index.php?app=eco … ref=dw001, a Web page poped up and showed me a message as follws:

The page requested could not be located. Please make a selection from the menu to continue.

but the 'add a cart' function works fine now. I also noticed that there is a difference between the item added from my own page and the item added from ccp online store, which is, there was no image to display from my own page on Shopping Cart page, where the item/product added from my own page actually is located from the ccp store rather than something else, the item added from online store has image to display. I like the way of the presenting both image and item description in the Shopping cart page, so I will not turn it off to display image.  Any ideas please? thank you.

Last edited by Lin (03-17-2012 07:12:16)

Offline

 

#4 03-18-2012 13:35:16

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: locate a product / add a cart from my own pages

Items add to the cart from off site (remote webpage) are added to the cart with a pre-heading of "REMOTE-", any item in the cart with this will not be looked up in the database as ccp thinks that it is not there so it is just skipped, there is no checking of inventory or quantities for these products.

John

Offline

 

#5 03-18-2012 14:42:58

Lin
Member
Registered: 09-26-2008
Posts: 61

Re: locate a product / add a cart from my own pages

Hi John thanks, but all my products actually are not from 'REMOTE' website/web pages, they are just from the web pages outside the ccp. In my previous version of CCP5.1, there was no any problems to call a product outside the ccp and was also able to add  the product into the shopping cart with the inventory  quantities checking. Does CCP7 still support this function or not please?

Offline

 

#6 03-18-2012 17:02:11

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: locate a product / add a cart from my own pages

I would say if you could do it in ccp5.1 then you can do it in 6 or 7 as they  are basically the same method,  you can just pass the ccp standard link for adding items to the cart from an outside webpage like:

Code:

http://www.yoursite.com/index.php?app=ecom&amp;ns=addcart&amp;ref="Product_id"

which should pull the information from the database and place it in the cart just as if it where called from within ccp.

John

Offline

 

#7 03-19-2012 18:20:51

Lin
Member
Registered: 09-26-2008
Posts: 61

Re: locate a product / add a cart from my own pages

Hi John thanks, it is now working  with the code above you provided but ref uses ref=Product_id. Thank you very much. Any way,  I will still need to see if i can implement a 'add a cart' button in my own page to add  a product into the shopping cart with the inventory  quantities checking, and will let you update. Thank you.

Last edited by Lin (03-21-2012 10:47:45)

Offline

 

#8 03-23-2012 16:10:33

Lin
Member
Registered: 09-26-2008
Posts: 61

Re: locate a product / add a cart from my own pages

just sorted out the SSL certificate installation problem on my new windows server, not really work on the issue of  'add a cart' function in my own page, but I could use the product page call instead.

Last edited by Lin (03-23-2012 16:31:00)

Offline

 

Board footer