Jump to content

Community

Ryan Ashbrook

Nexus Buy Now Link BBCode

Recommended Posts

File Name: Nexus Buy Now Link BBCode

File Submitter: Ryan Ashbrook

File Submitted: 22 May 2012

File Category: Utilities



This BBCode will Produce a Link With The Given Text to Add the Nexus Package to the user's Cart with the Specified Nexus Package ID.
Usage is Simple: [nexus_item=#]My Text[/nexus_item] where # is a Valid Nexus Package ID in Stock.
Is designed to simply return the given text if Nexus is Not installed/enabled, or if the package id is invalid, or the item is out of stock.
As a Note, Post Caching Can cause a Delay in the unparsing of the links to packages invalid or out of Stock, please drop your post caches if this occurs.
Post Caching Friendly.
Externally link to a nexus item without a member form_hash, it auto-supplies it with the included script:


{board_url}addtocart.php?id={package_id}



here to download this file

Share this post


Link to post
Share on other sites

thanks Marcher Technologies ,
very nice .

as a feedback I think you may add extra class in the link code , this will be helpful if someone want to add some css to this link .

as an example about what I mean
http://www.ips-skins.com/index.php?/page/index.html/_/new/rio-skin-r14
the link in bottom of board

thanks

Share this post


Link to post
Share on other sites

thanks

Marcher Technologies

,


very nice .



as a feedback I think you may add extra class in the link code , this will be helpful if someone want to add some css to this link .



as an example about what I mean


http://www.ips-skins...ew/rio-skin-r14


the link in bottom of board



thanks



I actually plan to go a smidgen farther on this one, due to post caching, it really needs to be a dynamic popup, but i will also add a class for skin customization in that process. :D

Share this post


Link to post
Share on other sites

As a note.


cannot use this in forums.


caching kills it /sadface.


Cannot do much about it.... it caches the members form_hash.... this bbcode cannot be cached, sadly, but realistically.



Apparently I can.... an interim until I dig out the fields.
file updated.... goodies. :D

thanks

Marcher Technologies

,


very nice .



as a feedback I think you may add extra class in the link code , this will be helpful if someone want to add some css to this link .





a.bbc_buylink {}

How would I go about adding a product to the cart via the URL ? Similar to the skinchange.php where you simply provide the id as a parameter. Is this possible with Nexus? Reason being, I want links on an external (non-ipb) site capable of adding products directly to the cart. Thanks, Tom.


{board_url}addtocart.php?id={package_id}

Share this post


Link to post
Share on other sites

Is support of product options something in the horizon of this great mod? It will become extra handy when Nexus 1.5 is released which allows the ability to select the duration of subscription via drop down (I assume it's classified as a product option)

Share this post


Link to post
Share on other sites

Is support of product options something in the horizon of this great mod? It will become extra handy when Nexus 1.5 is released which allows the ability to select the duration of subscription via drop down (I assume it's classified as a product option)



Yes... I cannot say when specifically, but yes, it is planned.

Share this post


Link to post
Share on other sites

If anybody is having trouble getting this to work in the latest version of IPB I have a solution:

Find:

@header("Location: " . ipsRegistry::getClass('output')->buildUrl('app=nexus&section=store&do=add&id='.$id.'&k=' . $reg->member()->form_hash) );

And replace with:

$newurl = html_entity_decode("Location: " . ipsRegistry::getClass('output')->buildUrl('app=nexus&section=store&do=add&id='.$id.'&k=' . $reg->member()->form_hash));
	@header($newurl);

I apologise if this isn't the best way to do this - however it seems to work for me.

Hope that helps anyone out!

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy