Modify price using jquery in Bigcommerce - bigcommerce

I would like to modify Product price dynamically when a button is clicked, using jquery.
For example, if there is a button with value "22" , if i click that button, the price should change to "22". For now, i can change the front end text of price label, but i couldn't pass it when adding to cart. Please help me to resolve this.
Thanks

The price is pulled from the backend and displayed.
It is possible to read the price. It is also possible to have options.
I can see a fairly easy way to do this by setting up options for a product:
Put the options ( %%Product_AddToCartRight%% is the most commonly used options listing) in a div with the style set to "display:none".
Then have your button "click" the options via javascript or jquery.
Since the options are hidden by the display:none, the button "automagically" changes the price...and could do other things, like make a "Congrats" div appear, or make the price text/box change color.
This is good, since it not only draws the users eyes to the price change, but triply rewards the user: Better price, price changes (reacts to users click), and the color changes (another reaction to the users click).
Clicking an option does autoupdate the price, including what gets passed to the shopping cart.
One thing to be aware of is that Google may or may not run any given piece of javascript on your page.
More importantly, googles crawler does NOT click buttons or select options, so any price changes driven by a click or selection will not be indexed by google. Your product will still show, but only at the "base" price.

Related

Track clicks on a button based on preceding button clicks

I need to track clicks on a button at the end of a sequence of selections. As shown in the image, there are five different business plans (circled in red), and each plan can be for three different years (highlighted in blue). The user will checkbox a business plan type (e.g., market trend) and click a year (e.g., 2017), then click the PDF button (highlighted in black) to download that particular plan (market trend for 2017 in this case).
So instead of counting the total clicks of PDF downloads, the task is to count how many times a particular plan is downloaded based on the plan type and year.
The PDF button, the checkbox for each plan type, and the click button for each year all can be tracked individually. They are also all on the same URL.
GTM and GA are used for tracking. Can anyone share some thoughts of how to achieve this type of tracking?
Thanks!
Yao
If you are using google tag manager you can use dataLayer.push() to push to an array which can be used to differentiate the clicks based on the interaction.
Approach is described here
Google Analytics custom dimensions
In your particular case you could have the dataLayer configured to add the different key / values for the different report components and then the trigger will be configured to fire when the download button is clicked.
For example on each of the check boxes you could have:
<input type="checkbox" onclick="dataLayer.push({'plan_component': 'Market Trends'});">
You'd probably better having an array to store this info.
The resultant data can be viewed or aggregated via a custom report download. Described here.
Custom Dimensions and Metrics
It can be a bit tricky to understand and you'll need to change the site so that the dataLayer gets populated with the requisite data but this is the way to go. Best of luck.

Disable radio buttons default in Woocommerce

Sorry for my English. Can I disable the default choice radio buttons for shipping costs and payments in Woocommerce? I would like to have radio buttons blank. In short, the radio buttons are activated only when the user clicks. If a user does not fill in, example, the radio button of the shipment will go a window "Attention, choose the method of delivery." I hope I was clear. Thank you very much!
You can try this code snippet
// To test this code, open a private/incognito window,
add an item to the cart and then go to cart page.
// Once an option is choosen, it will be the default option
from that moment onwards.
// Code to clear default shipping option.
add_filter( 'woocommerce_shipping_chosen_method', '__return_false');
WooCommerce automatically chooses the cheapest shipping method available if you do not have a default setup.
http://i.imgur.com/ANKIUqk.png
See the Automatic option at the bottom of the Shipping Methods section? That ensures that it would always choose a radio button.
I'm not saying this is impossible, but it would involve changing the underlying code.
May I know the reason behind not having a default option set? It sounds inefficient in my opinion. If the user does not like the default option, they can easily change it. At least this way, you no longer have to worry about putting in a "Please Choose A Shipping Method" validation.
The default shipping saves clicks for most of your clients especially if you pick the right option as default. The least clicks the better. ;)
Cheers!
As an update based on our discussion below, here's an option to hide the default shipping option...
Say "Free Shipping" is the default option. All you have to do is to add this code to your css...
#shipping_method_0_free_shipping{
display:none !important;
}
Then, the WooCommerce>Settings>Shipping Methods dashboard, remove the "Free Shipping" label and change it to a "." (if you make it blank, this will not work) so that no label will appear after the shipping button is handled.
However, this just makes sure that the default shipping method does not appear to the user.
http://i.imgur.com/DpGF5wD.png
The system will still consider it existing. You still need to prevent the checkout from proceeding if "Free Shipping" was the chosen shipping method.

How to Show categories on BigCommerce

Is it possible to show specific categories in BigCommerce instead of all categories?
We have used the code %%Panel.SideCategoryList%% but it shows all the categories.
Thanks in advance
At this time there is not a way to uniquely control the output of categories using that panel. Depending on your context, you can either
1. Allow all categories to be output and use javascript to selectively hide a few (this is far from ideal, I know).
2. Manually add the categories into that panel and skip the dynamic category insertion.
In the admin, click on Products, then click Product Categories. That page displays all of the categories for your site. On the right of the page you'll see green checkmarks. If you don't want a category to be visible on your site, simply click the green checkmark and it will turn into a red X

Prestashop Sell Option - Preowned Items

I'm completely new to Prestashop.
I have selected Prestashop as my platform for creating my intended shopping site. But I'd like to add one option "Sell" beside "Buy" button.
On clicking the "Sell" button it'll take me to a page, where the user needs to fill up a form, which will designed by me ofcourse with few textbox and dropdowns, And once he goes through the process, the data's will be saved in database.
Now in PHP, I can write this code within minutes, but I don't know and have no idea how to integrate this thing in prestashop.
So if anyone here can please help me out, I'll be glad.
Allow me to let you know, that I want this "Sell" idea on my shopping site, where generally people comes to Buy, is because I want to enable my site for 2nd Hand items, i.e. refurbished items. So I need an option to buy refurbished items through which users can sell me their refurbished items.
I don't know whether any plugin is available for this, though I don't see any normally through basic searching.
You need to develop your own module, which will show the "Sell" button using a hook in Prestashop template file(s), and create a new resource (your page with form) in your shop. Check Prestashop documentation and tutorials, Creating a Prestashop module and adding custom hooks in tpl files can be found at Creating custom hooks ... blog.

Assigning a custom workflow to a work item type in Rational Team Concert

I'm in the process of customizing Rational Team Concert to include a custom work item type. As part of the testing of the work item type as I created it I populated a few of the custom work items with data. As I enhanced the custom work item type and added additional attributes I was able to use the "Check attributes usages in repository" from the "Types and Attributes" to ensure that the new attributes were propagated to my test work items.
Now I've gotten to the point where I need to create a custom workflow for this work item type. I've defined the workflow and and assigned it to the work item type, but my existing test work items can't seem to use it. Clicking on the "Check workflow usages in repository" link says "There are 9 work items in the repository referencing workflow states or resolutions that are not present in the bound workflow. Do you want to show these items in the Work Items view?".
The workitem view then just says that status = 1 for the test work items.
If I select a work to open in the rich client editor all of the process elements are inactive. If I open it in the web editor, it says that the status is "1", as shown below:
Is there any way to fix this and change the workflow of existing work items? I should add that new work items work just fine, but I'm worried about what might happen if I need to update the process again in the future.
In the context of work item customization, you have to manually sync existing work item attributes with the most recent version of the PA in order to take your changes into account.
The steps are detailed here in the manual page "Defining work item types and attributes":
(bottom of the page)
To manually update existing work items with new or modified custom attributes:
Run a query so that the query results contain all the work items that you want to update.
Note: Do not select any relationships to be shown in the query results.
If relationships are shown, the Type icon is not displayed and you cannot complete these steps.
To clear all relationships shown, in the Work Items view menu, select Relationships, click Deselect all, and then click OK.
In the Work Items view, select the work items that you want to modify.
In the row of one of the selected work items, right-click the Type icon and select Synchronize attributes.
Thanks.
Eric.