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.
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
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
http://www.yoursite.com/index.php?app=ecom&ns=prodshow&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
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
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
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
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:
http://www.yoursite.com/index.php?app=ecom&ns=addcart&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
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
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