Bring Your Business to Life › Support › Image Store › Adding the products in a drop down?
- AuthorPosts
- March 10, 2015 at 3:39 pm #256484totallytechParticipant
Hey,
I’ve set my images to display as an attachment and I’m editting the theme/ims-image.php page. I’m trying to add a drop down underneath the image with a button that says add to cart instead of the pop up box for adding to cart?
I’m looking to edit quite a bit of this code, I’m trying to make it work similar to this:
http://goo.gl/YAq29vbut with different buttons etc…
Is there a call to the nav bar?
March 11, 2015 at 9:57 pm #256949Xpark MediaKeymasterThe function that renders the entire actions buttons is call store_subnav, you can only use it in the front end.
to use it you need to use the global variable $imStore
echo $ImStore->store_subnav();
March 12, 2015 at 5:58 am #257195totallytechParticipantIs there a good way to edit the pages so they don’t get over written on each update of the script?
I’ve added the code above to image-store/theme/ims-image.php however its not displaying anything.
I tried
echo $imStore->store_subnav();
andecho $ImStore->store_subnav();
but neither display the order form.I get this error though:
Order Form Fatal error: Call to a member function store_subnav() on a non-object in /var/www/vhosts/xxxx.co.uk/clients/wp-content/plugins/image-store/theme/ims-image.php on line 45
March 13, 2015 at 12:07 am #257594Xpark MediaKeymasteryou need to add in to scope the global variable $imStore example:
function my_custom_function(){ global $imStore; echo $imStore->store_subnav(); }
or in your template:
global $imStore; echo $imStore->store_subnav();
the best option to keep you changes is to create a custom module or add the functions in the theme’s functions.php file by using the plugin’s hooks
May 1, 2015 at 9:03 am #283223totallytechParticipantHey,
I’m struggling to add this code still.
I’m trying to make my layout very similar to this:
http://tinypic.com?ref=2lk8u1cI’ve been editting the image-store/theme/ims-image.php file
This is the code below, so you can see how I’m trying to get it look 🙂Can you point me in the right direction to display the product selection in the php 🙂
May 2, 2015 at 5:53 pm #283794totallytechParticipantSorry, see this link for what I’m trying to make my site look like..
May 9, 2015 at 5:03 am #286865totallytechParticipantis there a way to add a product selection form <?php echo $add-to-cart-form; ?> instead of having to click on the add to cart link?
This is what I’m trying to generate 🙂
- AuthorPosts
- You must be logged in to reply to this topic.