Jump to content

Nexus Buy Now Link BBCode


Ryan Ashbrook

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

Link to comment
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
Link to comment
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}

Link to comment
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)

Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...

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!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...